~ / rigs / mohamed-abdelsattar92 / codetrail

mohamed-abdelsattar92/codetrail

Your onboarding guide to any codebase, whether you’re new or coming back. Local, grounded in the code, for you and your coding agent, on your own subscription.

↗ GitHub ★ 7 Apache-2.0 updated 7d ago project Claude CodeCodex
field: AI / ML workflow: Git & commitsDocs
share on X
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
CONTEXT TAX · EVERY TURN
~2.8k tokens
Moderate · 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 71/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ npx degit mohamed-abdelsattar92/codetrail/.claude ./rig-codetrail  # 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.

$ curl -fsSL --create-dirs -o .claude/agents/security-reviewer.md https://raw.githubusercontent.com/mohamed-abdelsattar92/codetrail/develop/.claude/agents/security-reviewer.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": [
      "Bash(git push:*)",
      "Bash(git send-pack:*)",
      "Bash(git subtree push:*)",
      "Bash(git remote set-url:*)",
      "Bash(git credential:*)",
      "Bash(gh pr create:*)",
      "Bash(gh pr merge:*)",
      "Bash(gh repo sync:*)",
      "Bash(gh auth token:*)",
      "Bash(gh auth git-credential:*)",
      "Bash(gh auth setup-git:*)",
      "Bash(gh pr new:*)",
      "Bash(gh repo new:*)",
      "Bash(az account get-access-token:*)",
      "Bash(glab config get token:*)",
      "Read(./.env)",
      "Read(./**/.env)",
      "Read(./**/.env.*)",
      "Read(!**/.env.example)",
      "Read(~/.ssh/**)",
      "Read(./**/.dev.vars)",
      "Read(./**/*.p8)",
      "Read(./**/*.p12)",
      "Read(./**/*.pem)",
      "Read(./**/*.keystore)",
      "Read(./**/*.jks)",
      "Read(./**/*.tfstate)",
      "Read(./**/*.tfstate.backup)",
      "Read(~/.config/gh/**)",
      "Read(~/.config/gcloud/**)",
      "Read(~/Library/Preferences/.wrangler/**)",
      "Read(~/.wrangler/**)",
      "Read(~/.netrc)",
      "Read(~/.npmrc)",
      "Read(~/.docker/config.json)",
      "Read(~/.aws/**)",
      "Read(~/.git-credentials)",
      "Read(~/.config/git/credentials)",
      "Read(~/.terraform.d/**)",
      "Read(./**/*.tfvars)",
      "Read(./**/*.tfvars.json)",
      "Read(./**/*.key)",
      "Read(~/.pypirc)",
      "Read(~/.codex/**)",
      "Read(~/.azure/**)",
      "Read(~/.config/glab-cli/**)",
      "Read(~/Library/Application Support/glab-cli/**)",
      "Edit(./.git/**)",
      "Write(./.git/**)"
    ],
    "ask": [
      "Edit(//**/AGENTS.md)",
      "Edit(//**/CLAUDE.md)",
      "Edit(//**/CLAUDE.local.md)",
      "Edit(//**/.mcp.json)",
      "Edit(//**/.claude/settings.json)",
      "Edit(//**/.claude/settings.local.json)",
      "Edit(//**/.claude/hooks/**)",
      "Edit(//**/.claude/agents/**)",
      "Edit(//**/.claude/commands/**)",
      "Edit(//**/.claude/skills/**)",
      "Edit(//**/.claude/rules/**)",
      "Edit(//**/.codex/**)",
      "Edit(//**/docs/security/**)",
      "Edit(//**/.github/**)",
      "Edit(//**/commitlint*.mjs)",
      "Edit(//**/justfile)",
      "Edit(//**/*lefthook*)",
      "Edit(//**/*lefthook*/**)",
      "Edit(//**/*mise*.toml)",
      "Edit(//**/mise.lock)",
      "Edit(//**/.mise/**)",
      "Edit(//**/mise/**)",
      "Edit(//**/tools/git-hooks/**)",
      "Edit(//**/tools/hooks/**)",
      "Edit(//**/tools/tests/**)",
      "Edit(//**/.gitleaks.toml)",
      "Edit(//**/.gitleaksignore)",
      "Edit(~/.claude/settings.json)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/block_push.py\""
          },
          {
            "type": "command",
            "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/block_secret_reads.py\""
          }
        ]
      }
    ]
  }
}

Subagents (1)

security-reviewer
model: opus
Reviews a feature branch's commits for security before the branch is finished, following docs/security/review-checklist.md. Use it on every feature branch once its work is committed, before `git flow

Hooks (2)

eventmatcherruns
PreToolUseBashpython3 "$CLAUDE_PROJECT_DIR/.claude/hooks/block_push.py"
PreToolUseBashpython3 "$CLAUDE_PROJECT_DIR/.claude/hooks/block_secret_reads.py"

Permissions

deny (49)
Bash(git push:*)
Bash(git send-pack:*)
Bash(git subtree push:*)
Bash(git remote set-url:*)
Bash(git credential:*)
Bash(gh pr create:*)
Bash(gh pr merge:*)
Bash(gh repo sync:*)
Bash(gh auth token:*)
Bash(gh auth git-credential:*)
Bash(gh auth setup-git:*)
Bash(gh pr new:*)
Bash(gh repo new:*)
Bash(az account get-access-token:*)
Bash(glab config get token:*)
Read(./.env)
Read(./**/.env)
Read(./**/.env.*)
Read(!**/.env.example)
Read(~/.ssh/**)
Read(./**/.dev.vars)
Read(./**/*.p8)
Read(./**/*.p12)
Read(./**/*.pem)
Read(./**/*.keystore)
Read(./**/*.jks)
Read(./**/*.tfstate)
Read(./**/*.tfstate.backup)
Read(~/.config/gh/**)
Read(~/.config/gcloud/**)
Read(~/Library/Preferences/.wrangler/**)
Read(~/.wrangler/**)
Read(~/.netrc)
Read(~/.npmrc)
Read(~/.docker/config.json)
Read(~/.aws/**)
Read(~/.git-credentials)
Read(~/.config/git/credentials)
Read(~/.terraform.d/**)
Read(./**/*.tfvars)
Read(./**/*.tfvars.json)
Read(./**/*.key)
Read(~/.pypirc)
Read(~/.codex/**)
Read(~/.azure/**)
Read(~/.config/glab-cli/**)
Read(~/Library/Application Support/glab-cli/**)
Edit(./.git/**)
Write(./.git/**)
ask (28)
Edit(//**/AGENTS.md)
Edit(//**/CLAUDE.md)
Edit(//**/CLAUDE.local.md)
Edit(//**/.mcp.json)
Edit(//**/.claude/settings.json)
Edit(//**/.claude/settings.local.json)
Edit(//**/.claude/hooks/**)
Edit(//**/.claude/agents/**)
Edit(//**/.claude/commands/**)
Edit(//**/.claude/skills/**)
Edit(//**/.claude/rules/**)
Edit(//**/.codex/**)
Edit(//**/docs/security/**)
Edit(//**/.github/**)
Edit(//**/commitlint*.mjs)
Edit(//**/justfile)
Edit(//**/*lefthook*)
Edit(//**/*lefthook*/**)
Edit(//**/*mise*.toml)
Edit(//**/mise.lock)
Edit(//**/.mise/**)
Edit(//**/mise/**)
Edit(//**/tools/git-hooks/**)
Edit(//**/tools/hooks/**)
Edit(//**/tools/tests/**)
Edit(//**/.gitleaks.toml)
Edit(//**/.gitleaksignore)
Edit(~/.claude/settings.json)
allow (0)
—

Similar rigs

copied ✓