~ / rigs / e1roy / easyCcHooks

e1roy/easyCcHooks

create claude code hooks by python

↗ GitHub ★ 1 no license updated 7mo ago project Claude Code
share on X
ARCHETYPE
Minimalist
Lean instructions, few tools, tiny context tax. Lets the model think.
CONTEXT TAX · EVERY TURN
~774 tokens
Featherweight · median rig: 2.3k · breakdown
GUARDRAILS
3/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · details

Copy this rig

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

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

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/easyCcHooks.py execute ValidateBashCommand"
          }
        ]
      },
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/easyCcHooks.py execute WatchPreToolUse"
          }
        ]
      }
    ]
  }
}

Hooks (3)

eventmatcherruns
PreToolUseBashpython3 "$CLAUDE_PROJECT_DIR"/.claude/hooks/easyCcHooks.py execute ValidateBashCommand
PreToolUse*python3 "$CLAUDE_PROJECT_DIR"/.claude/hooks/easyCcHooks.py execute WatchPreToolUse
SessionStart*python3 "$CLAUDE_PROJECT_DIR"/.claude/hooks/easyCcHooks.py execute InjectContext

Similar rigs

copied ✓