AlexZahar/claude-code
Setup Claude Code using my workflow
ARCHETYPE
Automator
Hooks on every lifecycle event: format, lint, notify, log.
Copy this rig
# review before running: this installs third-party code $ npx degit AlexZahar/claude-code/commands ./rig-claude-code/commands $ npx degit AlexZahar/claude-code/hooks ./rig-claude-code/hooks
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": "Grep|Search|Glob|Read",
"hooks": [
{
"type": "command",
"command": "HOOK_TYPE=wrong-tool $HOME/.claude/serena-hooks.sh"
}
]
},
{
"matcher": "Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "HOOK_TYPE=pre-edit $HOME/.claude/gemini-hooks.sh"
},
{
"type": "command",
"command": "HOOK_TYPE=pre-edit $HOME/.claude/serena-hooks.sh"
}
]
},
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "HOOK_TYPE=pre-write $HOME/.claude/gemini-hooks.sh"
}
]
},
{
"matcher": "WebSearch|WebFetch",
"hooks": [
{
"type": "command",
"command": "HOOK_TYPE=pre-websearch $HOME/.claude/documentation-hooks.sh"
}
]
}
]
}
} MCP servers (1)
| server | source | est. tokens |
|---|---|---|
| multi-mcp-proxy | local / custom · remote | 2.5k |
Hooks (15)
| event | matcher | runs |
|---|---|---|
| SessionStart | * | $HOME/.claude/boardlens-dev-startup-hook-multi.sh |
| SessionStart | * | $HOME/.claude/mcp-session-hook-multi.sh |
| PreToolUse | Grep|Search|Glob|Read | HOOK_TYPE=wrong-tool $HOME/.claude/serena-hooks.sh |
| PreToolUse | Edit|MultiEdit | HOOK_TYPE=pre-edit $HOME/.claude/gemini-hooks.sh |
| PreToolUse | Edit|MultiEdit | HOOK_TYPE=pre-edit $HOME/.claude/serena-hooks.sh |
| PreToolUse | Write | HOOK_TYPE=pre-write $HOME/.claude/gemini-hooks.sh |
| PreToolUse | WebSearch|WebFetch | HOOK_TYPE=pre-websearch $HOME/.claude/documentation-hooks.sh |
| PostToolUse | Edit|MultiEdit|Write | sh -c 'if echo "$TOOL_OUTPUT" | grep -q "successfully"; then HOOK_TYPE=post-edit $HOME/.claude/gemini-hooks.sh; fi' |
| PostToolUse | Edit|MultiEdit|Write | sh -c 'FILE=$(echo "$TOOL_INPUT" | jq -r .file_path 2>/dev/null); ACTION="edited"; if echo "$TOOL_NAME" | grep -q "Write"; then ACTION="created"; fi; if [ -n "$FILE" ] && echo "$TOOL_OUTPUT" | grep -q "successfully"; then $HOME/.claude/grap |
| PostToolUse | Bash | sh -c 'CMD=$(echo "$TOOL_INPUT" | jq -r .command 2>/dev/null); if echo "$CMD" | grep -qE "npm test|jest|vitest|pytest"; then HOOK_TYPE=test-run $HOME/.claude/gemini-hooks.sh; elif echo "$CMD" | grep -qE "git commit"; then HOOK_TYPE=commit $ |
| PostToolUse | Bash | sh -c 'CMD=$(echo "$TOOL_INPUT" | jq -r .command 2>/dev/null); EXIT_CODE=$(echo "$TOOL_OUTPUT" | grep -oE "exit code: [0-9]+" | grep -oE "[0-9]+" || echo "0"); if [ -n "$CMD" ] && ! echo "$CMD" | grep -qE "^(ls|cd|pwd|echo|cat|which|clear)( |
| Stop | * | echo "💡 Tip: Use 'gemini -p' for analysis or '~/.claude/graphiti-hook.sh search' for memories!" |
| Stop | * | $HOME/.claude/mcp-cleanup-hook-multi.sh cleanup |
| UserPromptSubmit | /compact | $HOME/.claude/compact-memory-hook.sh |
| UserPromptSubmit | /mcp-status | $HOME/.claude/multi-mcp-service.sh status |
Slash commands (14)
/compact/context7-docs/gemini-analyze/gemini-architecture/gemini-deps/gemini-feature/gemini-find/gemini-help/gemini-overview/gemini-performance/gemini-review/gemini-security/recall/remember
Permissions
deny (0)
—
ask (0)
—
allow (1)
*
Similar rigs
cocoindex-io/cocoindex
Incremental engine for long horizon agents 🌟 Star if you like it!
Automator 7.3k tok ·
FailproofAI/failproofai
Observability and enforcement for AI agent harnesses. Capture every run and runtime reliability with policy enforcement.
Automator 22.9k tok ·
caliber-ai-org/ai-setup
Continuously sync your AI setups with one command. Codebase tailor suited agent skills, MCPs and config files for Claude Code, Cursor, and Codex.
Automator 3.2k tok ·
asklokesh/loki-mode
Autonomous software factory. Give it a GitHub issue, a spec or a one-line task; get back a pull request with a signed receipt anyone can re-check offline. Runs on your machine with your own keys: Claude, Codex, OpenCode.
Automator 8.2k tok ·