一键导入
git-guardrails-claude-code
Install Claude hooks blocking dangerous git commands before execution.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Install Claude hooks blocking dangerous git commands before execution.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate Codex hooks.json and AGENTS.md from Claude Code hooks. Maps supported hooks directly, including Edit|Write apply_patch aliases, and keeps Stop batch checks only as fallback. Use when setting up Codex compatibility or dual-agent support.
Question changed code as liability and remove unjustified surface area. Use before commit, push, PR, merge, or when a change feels overbuilt or low-value.
Reviews diffs for over-engineering only. Use when reviewing, desloping, or asking what to delete, inline, shrink, or replace with stdlib/native code.
Resilience Review checks resilience. Use when edge cases, errors, fallback, async/data, state, or polish matter.
Reviews a diff since a fixed point across Standards, Spec, and risk gates. Use when reviewing a branch, PR, WIP, or "review since X".
parallel executor. Use /swarm.
| name | git-guardrails-claude-code |
| description | Install Claude hooks blocking dangerous git commands before execution. |
Install PreToolUse Bash hook blocking dangerous git before Claude runs it.
Blocks: git push, git reset --hard, git clean -f/-fd, git branch -D, git checkout ., git restore ..
.claude/settings.json or global ~/.claude/settings.json.scripts/block-dangerous-git.sh to:
.claude/hooks/block-dangerous-git.sh~/.claude/hooks/block-dangerous-git.shchmod +x hook.{"hooks":{"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":".claude/hooks/block-dangerous-git.sh"}]}]}}