
Git Guardrails Claude Code
by vinvcnbf98e53f9208No license4.6K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated today
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。
Add to a SourceWeft workspace
- Open the skill in your dashboard and add it to a workspace.
- Enable it for the chats that should use it.
This skill includes scripts. They run in your workspace sandbox when the skill is used — review the file list and source before adding it.
Add to SourceWeftYou will be asked to sign in first, then taken straight to this skill.
Ask your agent to install it
Paste this prompt into Claude Code, Codex, Cursor or another agent that can run commands — or into SourceWeft chat. The agent reads this skill's install guide, shows you its source, license and scripts, and installs it with the SourceWeft CLI once you agree.
Read https://sourceweft.com/skills/gh-vinvcn-mattpocock-skills-zh-cn-git-guardrails-claude-code/install.md and install the skill it describes. Before installing, show me its source, license and whether it ships scripts, and wait for my OK. Ask me before changing anything else on my machine.Install it yourself from a terminal
For Claude Code, Codex, Cursor and other local agents. The SourceWeft CLI fetches the skill from its source repository at the commit scanned here, and verifies every file against the hashes recorded when the skill was scanned. If anything differs, nothing is written.
npx @sourceweft/cli skills install gh-vinvcn-mattpocock-skills-zh-cn-git-guardrails-claude-codeAdd --agent claude-code, codex, cursor or universal to choose which agent gets it (Claude Code by default).
Installed locally, this skill's scripts run on your machine, not in a sandbox. Read them first — the CLI asks before installing.
Upstream installer — not verified by SourceWeft
The open-source skills installer fetches the same pinned commit, but does not check the files against the hashes SourceWeft recorded.
npx skills add https://github.com/vinvcn/mattpocock-skills-zh-cn/tree/bf98e53f92089fec9b4885f128a565d7eac0337f/skills/misc/git-guardrails-claude-codeSource and attribution
Source:vinvcn/mattpocock-skills-zh-cninskills/misc/git-guardrails-claude-codeat commitbf98e53
License: No license
Content belongs to its original authors. SourceWeft indexes it from a public repository.
More from vinvcn/mattpocock-skills-zh-cn

Wayfinder
vinvcn
Plans large, foggy efforts as a shared map of decision tickets on an issue tracker, resolving them until the route is clear.

Triage
vinvcn
Triages project issues and external pull requests through a role-based state machine, producing agent-ready briefs.

To Tickets
vinvcn
Splits a plan, spec, or conversation into tracer-bullet tickets with blocking edges and publishes them to a tracker.

To Spec
vinvcn
Turns the current conversation into a spec document and publishes it to the project issue tracker.

Setup Matt Pocock Skills
vinvcn
Configures per-repository engineering skills setup: issue tracker, triage labels, and domain docs layout.

Resolving Merge Conflicts
vinvcn
Guides an agent through resolving an in-progress git merge or rebase conflict step by step.
More in Security

Compliance Tracking
anthropics
Tracks compliance requirements, audit readiness, and evidence for frameworks such as SOC 2, ISO 27001, GDPR, HIPAA, and PCI DSS.

Dpop Adoption
Guides implementation of OAuth 2.0 DPoP (RFC 9449) sender-constrained refresh tokens for Google's OAuth platform.

Secops Triage
Guides SOC analysts through triaging Google SecOps security alerts, from investigation to closure or escalation.

Secops Investigate
Guides SOC analysts through deep security incident and entity investigations in Google SecOps using UDM queries and timelines.

Secops Hunt
Guides proactive threat hunting in Google SecOps using UDM queries, IoC lookback, prevalence and outlier analysis.

Secops Cases
Manages Google Security Operations SOAR cases across their lifecycle via MCP tools.