npx claudepluginhub steeef/claude-hooksCommand safety hooks: rm (with git-ignore support), kubectl, terraform
Git safety hooks: branch workflow, add/checkout/no-verify/commit-message guards, worktree suggestions
File protection hooks: file length limits, read length limits, worktree edit guard
Desktop notifications for Claude Code events (Stop, Notification)
Blocks access to .env files, preventing accidental secret exposure
Bare-container worktrees under ~/wt (clone-on-demand, env-file copy)
Rejoins hard-wrapped PR body prose before gh submits it
Enforces PR draft-first workflow: requires --draft on gh pr create, asks for confirmation on gh pr ready
Blocks multi-line or >7-word comments in new/edited code
7-day visitors to each marketplace page
Safety and automation hooks for Claude Code.
| Plugin | Type | Purpose |
|---|---|---|
| command-safety | PreToolUse | Blocks dangerous commands (rm, kubectl delete, terraform destroy) |
| git-hooks | PreToolUse/PostToolUse | Enforces git safety (no commits to main, blocks dangerous checkout/add patterns) |
| file-protection | PreToolUse | Worktree edit guard, blocks edits to CLAUDE.md, warns on very large files |
| env-protection | PreToolUse | Blocks access to .env files, prevents accidental secret exposure |
| notifications | Stop/Notification | Desktop notifications on macOS |
| git-worktree-hooks | Various | Bare-container worktrees under ~/wt (clone-on-demand, env-file copy) |
| gh-formatting | PreToolUse | Rejoins hard-wrapped PR body prose before gh submits it |
| gh-workflow | PreToolUse | Requires --draft on gh pr create, asks for confirmation on gh pr ready |
| comment-style | PreToolUse | Blocks multi-line or >7-word comments in new/edited code |
/plugin marketplace add steeef/claude-hooks
/plugin install command-safety@steeef/claude-hooks
/plugin install git-hooks@steeef/claude-hooks
/plugin install file-protection@steeef/claude-hooks
/plugin install notifications@steeef/claude-hooks
git clone https://github.com/steeef/claude-hooks.git
cd claude-hooks
CLAUDE_HOOKS_DIR environment variable (add to your shell rc file):export CLAUDE_HOOKS_DIR="$HOME/code/claude-hooks"
~/.claude/settings.json:{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "$CLAUDE_HOOKS_DIR/plugins/command-safety/hooks/command_hook.py"
},
{
"type": "command",
"command": "$CLAUDE_HOOKS_DIR/plugins/git-hooks/hooks/git_pre_hook.py"
}
]
},
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "$CLAUDE_HOOKS_DIR/plugins/file-protection/hooks/file_hook.py"
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "$CLAUDE_HOOKS_DIR/plugins/git-hooks/hooks/cleanup_hook.py"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_HOOKS_DIR/plugins/notifications/hooks/notification_hook.sh"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_HOOKS_DIR/plugins/notifications/hooks/notification_hook.sh"
}
]
}
]
}
}
Blocks potentially destructive commands:
rm on git-tracked files (allows removal of ignored files like build artifacts)kubectl delete, kubectl scale --replicas=0, kubectl cordon, kubectl drainterraform destroyWhen rm is blocked, the "what to do instead" guidance comes from a pluggable
handler script, not hardcoded text. By default that's the bundled
plugins/command-safety/hooks/rm_handlers/trash_handler.sh, which reproduces
this plugin's original behavior (move to TRASH/, log to TRASH-FILES.md).
To use a different tool instead, set CLAUDE_HOOKS_RM_HANDLER to the path of
your own executable:
export CLAUDE_HOOKS_RM_HANDLER="$HOME/.claude/hooks/my_rm_handler.sh"
Handler contract:
<handler> <target1> <target2> ... — the blocked target paths as argv (may be empty).0.If the configured handler is missing, non-executable, errors, times out (5s), or prints nothing, the hook falls back to the bundled default handler, then to a generic notice if even that fails — so a broken handler config never silently shows guidance for a tool you're not using.
Enforces safe git workflows:
Anthropic's Claude Code plugins, installed from the claude-plugins-official repository
RuFlo Marketplace: Claude Code native agents, swarms, workers, and MCP tools for continuous software engineering
Claude Code marketplace entries for the plugin-safe Agentic Awesome Skills library and its compatible editorial bundles.