From guard-hooks
Install guard hooks into user-scoped ~/.claude/settings.json. Use when the user says "install guard hooks", "set up guard hooks", or "enable guard hooks".
How this skill is triggered — by the user, by Claude, or both
Slash command
/guard-hooks:installThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill installs the guard-destructive and guard-edits hooks into the user's `~/.claude/settings.json`.
This skill installs the guard-destructive and guard-edits hooks into the user's ~/.claude/settings.json.
jq must be installed and available in the user's PATH (the hooks use it to parse tool input)Check if jq is available by running jq --version. If not found, tell the user to install it first (winget install jqlang.jq on Windows, brew install jq on macOS, apt install jq on Linux).
Read ~/.claude/settings.json to check if hooks are already configured.
If no hooks key exists, add the following to the top level of the settings JSON:
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash \"$HOME/.claude/hooks/guard-destructive.sh\""
}
]
},
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "bash \"$HOME/.claude/hooks/guard-edits.sh\""
}
]
}
]
}
Copy the hook scripts from the plugin to ~/.claude/hooks/:
guard-destructive.shguard-edits.shTell the user to restart their Claude Code session for the hooks to take effect.
If ~/.claude/settings.json already has a hooks.PreToolUse array, append the guard hook entries to the existing array rather than overwriting. Check for duplicates first — skip any matcher that already has a guard hook configured.
npx claudepluginhub gruku/claude-tools --plugin guard-hooksInstalls plugin hooks into a project's .claude/ directory for persistent use without the plugin loaded. Supports selective or bulk install, dry-run, and conflict resolution.
Develops Claude Code hooks to run shell commands or LLM prompts on events like PreToolUse for automations, guardrails, quality checks, and pre-push tests.
Configures Claude Code lifecycle hooks (PreToolUse, PostToolUse, Stop, Notification) for tool validation, auto-approval, and context injection.