~ / rigs / pexon-consulting / claude-code-best-practices

pexon-consulting/claude-code-best-practices

Claude Code Best Practices auf Deutsch: Vorlagen und Anleitungen für CLAUDE.md, settings.json, Berechtigungen, Hooks gegen Secrets und personenbezogene Daten, Skills, Subagents, Plugins, MCP, Team-Rollout, DSGVO, Bedrock, Vertex AI, Azure,

↗ GitHub ★ 1 MIT updated 28d ago project Claude CodeCodex Claude plugin
field: unknown workflow: Testing & TDDSecurity reviewData / ETLPR / code review runs claude in CI
stack: pytestPython
share on X
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
CONTEXT TAX · EVERY TURN
~1.3k tokens
Featherweight · median rig: 2.3k · breakdown
GUARDRAILS
5/5
Blocks destructive commands · Protects secrets · Pre-tool screening hook · No YOLO mode · Sandbox or ask-first rules · details
Quality 38/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ npx degit pexon-consulting/claude-code-best-practices/.claude ./rig-claude-code-best-practices  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

$ npx degit pexon-consulting/claude-code-best-practices/.agents/skills/claude-code-audit .claude/skills/claude-code-audit
$ npx degit pexon-consulting/claude-code-best-practices/.agents/skills/claude-code-einrichten .claude/skills/claude-code-einrichten
$ npx degit pexon-consulting/claude-code-best-practices/.agents/skills/claude-md-schreiben .claude/skills/claude-md-schreiben
$ npx degit pexon-consulting/claude-code-best-practices/.agents/skills/hook-schreiben .claude/skills/hook-schreiben
$ npx degit pexon-consulting/claude-code-best-practices/src/claude_team/vorlage/.claude/skills/commit .claude/skills/commit
$ npx degit pexon-consulting/claude-code-best-practices/src/claude_team/vorlage/.claude/skills/handoff .claude/skills/handoff
$ curl -fsSL --create-dirs -o .claude/agents/code-reviewer.md https://raw.githubusercontent.com/pexon-consulting/claude-code-best-practices/main/src/claude_team/vorlage/.claude/agents/code-reviewer.md
$ curl -fsSL --create-dirs -o .claude/agents/datenschutz-check.md https://raw.githubusercontent.com/pexon-consulting/claude-code-best-practices/main/src/claude_team/vorlage/.claude/agents/datenschutz-check.md
$ curl -fsSL --create-dirs -o .claude/agents/code-reviewer.md https://raw.githubusercontent.com/pexon-consulting/claude-code-best-practices/main/agents/code-reviewer.md
$ curl -fsSL --create-dirs -o .claude/agents/datenschutz-check.md https://raw.githubusercontent.com/pexon-consulting/claude-code-best-practices/main/agents/datenschutz-check.md

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "permissions": {
    "deny": [
      "Read(.env)",
      "Read(.env.*)",
      "Read(!.env.example)",
      "Read(**/*.pem)",
      "Read(**/*.key)",
      "Edit(.env)",
      "Edit(.git/**)",
      "Bash(git push --force *)",
      "Read(.env)",
      "Read(.env.*)",
      "Read(!.env.example)",
      "Read(**/*.pem)",
      "Read(**/*.key)",
      "Read(**/*.p12)",
      "Read(**/*.pfx)",
      "Read(**/id_rsa*)",
      "Read(**/id_ed25519*)",
      "Read(**/*.tfstate)",
      "Read(**/*.tfstate.*)",
      "Read(secrets/**)",
      "Read(~/.aws/**)",
      "Read(~/.ssh/**)",
      "Read(~/.kube/**)",
      "Read(~/.config/gcloud/**)",
      "Read(~/.azure/**)",
      "Read(~/.netrc)",
      "Read(~/.npmrc)",
      "Read(~/.pypirc)",
      "Read(~/.docker/config.json)",
      "Read(~/.claude/.credentials.json)",
      "Edit(.env)",
      "Edit(.env.*)",
      "Edit(!.env.example)",
      "Edit(.git/**)",
      "Bash(sudo *)",
      "Bash(curl * | sh)",
      "Bash(curl * | bash)",
      "Bash(wget * | sh)",
      "Bash(git push --force *)",
      "Bash(git push -f *)",
      "Bash(git diff *--output*)",
      "Bash(git log *--output*)",
      "Bash(git show *--output*)",
      "Bash(rm -rf /)",
      "Bash(rm -rf ~)",
      "Bash(printenv *)",
      "Bash(env)"
    ],
    "ask": [
      "Bash(git push *)",
      "WebFetch",
      "Bash(git push *)",
      "Bash(git reset *)",
      "Bash(git rebase *)",
      "Bash(npm publish *)",
      "Bash(docker push *)",
      "Bash(terraform apply *)",
      "Bash(kubectl apply *)",
      "Bash(kubectl delete *)",
      "WebFetch"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Read|Edit|Write|MultiEdit|NotebookEdit|Grep|Glob|Bash|PowerShell",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/secrets_schutz.py\""
          },
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/secrets_schutz.py\""
          }
        ]
      },
      {
        "matcher": "Edit|Write|MultiEdit|NotebookEdit|Bash|PowerShell",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/pii_schutz.py\""
          },
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/pii_schutz.py\""
          }
        ]
      },
      {
        "matcher": "Bash|PowerShell",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/befehle_schutz.py\""
          },
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/befehle_schutz.py\""
          }
        ]
      }
    ]
  }
}

Skills (6)

Subagents (4)

code-reviewer
model: sonnet
Prüft die aktuellen Änderungen auf Fehler, Sicherheitslücken und fehlende Tests. Nach jeder größeren Änderung und vor jedem Pull Request einsetzen.
datenschutz-check
model: sonnet
Prüft Code und Änderungen auf personenbezogene Daten nach DSGVO, etwa in Logs, Tests, Fixtures, Analytics und Fehlermeldungen. Einsetzen, wenn Kundendaten, Formulare, Logging oder Exporte betroffen si
code-reviewer
model: sonnet
Prüft die aktuellen Änderungen auf Fehler, Sicherheitslücken und fehlende Tests. Nach jeder größeren Änderung und vor jedem Pull Request einsetzen.
datenschutz-check
model: sonnet
Prüft Code und Änderungen auf personenbezogene Daten nach DSGVO, etwa in Logs, Tests, Fixtures, Analytics und Fehlermeldungen. Einsetzen, wenn Kundendaten, Formulare, Logging oder Exporte betroffen si

Hooks (12)

eventmatcherruns
UserPromptSubmit*python3 "${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/pii_schutz.py"
PreToolUseRead|Edit|Write|MultiEdit|NotebookEdit|Grep|Glob|Bash|PowerShellpython3 "${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/secrets_schutz.py"
PreToolUseEdit|Write|MultiEdit|NotebookEdit|Bash|PowerShellpython3 "${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/pii_schutz.py"
PreToolUseBash|PowerShellpython3 "${CLAUDE_PROJECT_DIR}/src/claude_team/vorlage/.claude/hooks/befehle_schutz.py"
SessionStart*python3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/sitzungsstart.py"
UserPromptSubmit*python3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/pii_schutz.py"
PreToolUseRead|Edit|Write|MultiEdit|NotebookEdit|Grep|Glob|Bash|PowerShellpython3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/secrets_schutz.py"
PreToolUseEdit|Write|MultiEdit|NotebookEdit|Bash|PowerShellpython3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/pii_schutz.py"
PreToolUseBash|PowerShellpython3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/befehle_schutz.py"
PostToolUseEdit|Write|MultiEditpython3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/format_nach_edit.py"
PostToolUse*python3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/protokoll.py"
Stop*python3 "${CLAUDE_PROJECT_DIR}/.claude/hooks/stopp_tests.py"

Permissions

deny (47)
Read(.env)
Read(.env.*)
Read(!.env.example)
Read(**/*.pem)
Read(**/*.key)
Edit(.env)
Edit(.git/**)
Bash(git push --force *)
Read(.env)
Read(.env.*)
Read(!.env.example)
Read(**/*.pem)
Read(**/*.key)
Read(**/*.p12)
Read(**/*.pfx)
Read(**/id_rsa*)
Read(**/id_ed25519*)
Read(**/*.tfstate)
Read(**/*.tfstate.*)
Read(secrets/**)
Read(~/.aws/**)
Read(~/.ssh/**)
Read(~/.kube/**)
Read(~/.config/gcloud/**)
Read(~/.azure/**)
Read(~/.netrc)
Read(~/.npmrc)
Read(~/.pypirc)
Read(~/.docker/config.json)
Read(~/.claude/.credentials.json)
Edit(.env)
Edit(.env.*)
Edit(!.env.example)
Edit(.git/**)
Bash(sudo *)
Bash(curl * | sh)
Bash(curl * | bash)
Bash(wget * | sh)
Bash(git push --force *)
Bash(git push -f *)
Bash(git diff *--output*)
Bash(git log *--output*)
Bash(git show *--output*)
Bash(rm -rf /)
Bash(rm -rf ~)
Bash(printenv *)
Bash(env)
ask (11)
Bash(git push *)
WebFetch
Bash(git push *)
Bash(git reset *)
Bash(git rebase *)
Bash(npm publish *)
Bash(docker push *)
Bash(terraform apply *)
Bash(kubectl apply *)
Bash(kubectl delete *)
WebFetch
allow (16)
Bash(git status *)
Bash(git diff *)
Bash(git log *)
Bash(.venv/bin/pytest *)
Bash(.venv/bin/claude-team audit *)
Bash(python3 scripts/sync_skills.py *)
Bash(python3 scripts/beispiele_bauen.py *)
Bash(git status *)
Bash(git diff *)
Bash(git log *)
Bash(git show *)
Bash(git branch --show-current)
Bash(ls *)
Bash(pwd)
Bash(ruff check *)
Bash(ruff format *)

Similar rigs

copied ✓