How this skill is triggered — by the user, by Claude, or both
Slash command
/cc-bridle:githooksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configures protections for Claude Code's git operations.
Configures protections for Claude Code's git operations.
These guards only apply when Claude Code executes git commands via the Bash tool. Your own manual git commands (in terminal) are NOT affected.
Run: node ${CLAUDE_PLUGIN_ROOT}/scripts/git-guard-wizard.js --show
This outputs JSON with all guard keys and their current enabled state.
Use AskUserQuestion with multiSelect=true to let the user pick which guards to enable.
Available guards:
block_force_push — force push ブロック (git push --force / -f)block_push_main — main/master への直接 push ブロックblock_secret_files — 機密ファイルのステージングをブロック (.env, *.key 等)check_commit_message — Conventional Commits 検証block_large_files — 1MB 超ファイルのステージングをブロックShow current status to the user. Present a single multiSelect question with these as options. Note: AskUserQuestion supports max 4 options, so split into 2 questions if needed (e.g. question 1: force_push, push_main, secret_files; question 2: commit_message, large_files).
Build a comma-separated key=on / key=off string from user selections and run:
node ${CLAUDE_PLUGIN_ROOT}/scripts/git-guard-wizard.js --set key1=on,key2=off,...
Show the saved configuration to the user.
npx claudepluginhub rozwer/cc-bridle --plugin cc-bridleSets up PreToolUse hooks in Claude Code to block dangerous git commands (push, reset --hard, clean, branch -D). Useful when you want to prevent accidental destructive git operations.
Installs PreToolUse hooks that block destructive git/shell commands (force-push to protected branches, git reset --hard with unstaged work, rm -rf outside worktree). Useful before unattended runs or after a near-miss.
Automates Git hooks setup with Husky, lint-staged, and commitlint to enforce code quality before commits and pushes.