.claude/settings.json hooks work as-is.
Quick example
Auto-format every TypeScript file the agent edits:.soulforge/config.json
/hooks inside SoulForge lists active hooks and toggles them per session.
Events
Rule schema
if field narrows by first string arg: Bash(rm *), Edit(*.ts), etc. * matches any sequence, ? one char.
Tool names use Claude Code conventions (Bash, Edit, Write, Read, Grep, Glob, WebSearch, Agent). SoulForge maps its internal names automatically.
Config sources (merged in order)
~/.claude/settings.json.claude/settings.json.claude/settings.local.json~/.soulforge/config.json.soulforge/config.json
"disableAllHooks": true in any file to kill all hooks.
Recipes
Block `rm -rf`
Block `rm -rf`
PreToolUse. Exit code 2 denies the call.Log every tool call
Log every tool call
PreToolUse. No matcher = all tools.Notify when done (macOS)
Notify when done (macOS)
Stop.Protocol
Hooks read JSON from stdin, optionally write JSON to stdout. Exit code0 = success, 2 = block, anything else = log warning.
stdin
PreToolUse can deny, modify input, inject context)
PostToolUse can inject additionalContext β no deny.
Safety
- Hooks die on
Ctrl+Xalong with the agent. - Default timeout 10s β hooks should be fast.
- Non-blocking errors (non-zero exit β 2) log a warning, donβt stop the agent.

