Manage auto-approve hook for Claude Code - reduces permission prompts using Haiku as security reviewer
Status: not installed
Show this menu and wait for the user to choose:
View config: Read and display merged config from:
~/.claude/auto-approve/config.md.claude/auto-approve.md (if exists)Add to Always Allow:
.claude/auto-approve.md)## Always Allow sectionAdd to Always Ask:
## Always Ask sectionAdd Safe Tool:
## Safe Tools sectionAdd Custom Rule:
## Custom Rules sectionView recent activity:
Read ~/.claude/auto-approve/audit.log, show recent decisions.
Suggest patterns: Parse audit.log for frequently manually-approved patterns, suggest adding to config.
Clear cache:
rm -rf ~/.claude/auto-approve/cache/*
Show cache stats:
ls ~/.claude/auto-approve/cache/ | wc -l
Check for newer version:
grep "^VERSION=" ~/.claude/auto-approve/auto-approve.shgrep "^VERSION=" "$SKILL_DIR/auto-approve.sh"**Status: not installed**| Scope | File | When to use |
|---|---|---|
| Global | ~/.claude/auto-approve/config.md |
User-wide defaults |
| Project | .claude/auto-approve.md |
Project-specific rules |
Default to project level when adding patterns, unless:
.claude/ directory in projectQ: Why did I have to approve that command? A: Check audit.log for the decision reason. The command either:
Q: What's the difference between Safe Tools and Always Allow? A: Safe Tools matches exact tool names (Read, Glob, etc.). Always Allow matches patterns in the full tool_name:tool_input string.
Q: How do I always approve npm commands?
A: Add npm to Always Allow section (matches any command containing "npm").
Q: How do I make Haiku more permissive for this project? A: Add Custom Rules like "Always approve writes to src/ and test/"
Run these steps only if the Status line above says "not installed":
mkdir -p ~/.claude/auto-approve/cache
cp "$SKILL_DIR/auto-approve.sh" ~/.claude/auto-approve/auto-approve.sh
chmod +x ~/.claude/auto-approve/auto-approve.sh
cp "$SKILL_DIR/config.md" ~/.claude/auto-approve/config.md
Read existing settings and merge this hook config. Use the expanded absolute path (not ~):
{
"hooks": {
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "/home/username/.claude/auto-approve/auto-approve.sh",
"timeout": 35000
}
]
}
]
}
}
Replace /home/username with the actual home directory path (use $HOME to determine it).
Update this skill file: Change the Status line to **Status: installed** so future invocations skip installation.
Confirm installation complete.