vinvcn/mattpocock-skills-zh-cn/git-guardrails-claude-code
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。
Agent skill · version 1.3.2 · from vinvcn/mattpocock-skills-zh-CN
Install
npx yarkr-cli add skill:vinvcn/mattpocock-skills-zh-cn/git-guardrails-claude-codeWithout Node.js, on macOS and Linux (curl or wget):
curl -fsSL https://yarkr.com/install.sh | sh -s -- add skill:vinvcn/mattpocock-skills-zh-cn/git-guardrails-claude-code
wget -qO- https://yarkr.com/install.sh | sh -s -- add skill:vinvcn/mattpocock-skills-zh-cn/git-guardrails-claude-codeOn Windows, in PowerShell:
irm https://yarkr.com/install.ps1 | iex; yarkr add skill:vinvcn/mattpocock-skills-zh-cn/git-guardrails-claude-codeWorks with Claude Code, Codex, opencode, Cursor, any harness over MCP.