How this skill is triggered — by the user, by Claude, or both
Slash command
/cc-bridle-ja:githooksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Claude Code の git 操作に対する保護を設定します。
Claude Code の git 操作に対する保護を設定します。
ガードは Claude Code が Bash ツール経由で git コマンドを実行する場合のみ適用されます。 ターミナルで手動実行する git コマンドには影響しません。
実行: node ${CLAUDE_PLUGIN_ROOT}/scripts/git-guard-wizard.js --show
全ガードキーと現在の有効/無効状態が JSON で出力されます。
AskUserQuestion を multiSelect=true で使用して、有効にするガードをユーザーに選択してもらいます。
利用可能なガード:
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 超ファイルのステージングをブロック現在の状態をユーザーに示し、これらをオプションとして単一の multiSelect 質問で提示します。 注意: AskUserQuestion は最大4オプションまでのため、必要に応じて2回に分けてください (例: 質問1: force_push, push_main, secret_files; 質問2: commit_message, large_files)。
ユーザーの選択から key=on / key=off のカンマ区切り文字列を構築して実行:
node ${CLAUDE_PLUGIN_ROOT}/scripts/git-guard-wizard.js --set key1=on,key2=off,...
保存された設定をユーザーに表示します。
npx claudepluginhub rozwer/cc-bridle --plugin cc-bridle-jaSets 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.