The installer (`installIndividualHook` in index.js) places companion
Python scripts in `.claude/hooks/`, but the hook config referenced
`.claude/scripts/`. This meant the hook would always fail with a
"file not found" error at runtime, silently rendering it non-functional.
Also removed the `2>&1` stderr redirect which masked the error by
merging stderr into stdout, causing the hook runner to report the
unhelpful "No stderr output" message instead of the actual cause.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- Update description to list 30+ supported providers
- Simplify hook command by removing git commit grep filter
- Parse Claude Code JSON input from stdin to detect git commit
- Handle git commit -a and chained git add && git commit scenarios
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add new security hook to prevent accidental execution of dangerous shell
commands like rm -rf, dd, mkfs, and other destructive operations.
Features:
- Blocks rm with dangerous flags (recursive, force) on critical paths
- Detects wildcards and system directory targets (/, ~, *)
- Prevents disk operations (dd, mkfs, format)
- Blocks fork bombs and direct disk device access
- Provides clear safety guidelines in error messages
- Allows safe operations (e.g., rm -rf /tmp/specific-folder)
Reviewed by component-reviewer agent.
Co-authored-by: Claude <noreply@anthropic.com>
- Update all 14 hooks to use proper Claude Code array/matcher format
- Fix CLI merge logic to handle new hook structure correctly
- Add support for both old and new hook formats during migration
- Remove conflict detection for hooks (Claude Code arrays support multiple entries)
- Ensure hooks follow proper structure:
{
"hooks": {
"EventName": [
{
"matcher": "ToolPattern",
"hooks": [
{"type": "command", "command": "bash-command"}
]
}
]
}
}
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>