git-guardrails-claude-code

This skill sets up Claude Code PreToolUse hooks to intercept and block dangerous git commands before they execute. It guides the agent through installing a shell script hook at either the project or global scope, configuring the appropriate settings.json, and optionally customizing the blocked command list. Covered commands include git push, reset --hard, clean -f, branch -D, and checkout/restore variants.

Domains: cloud-devops, tools · Tags: devops, security, git-safety, hooks · 1 downloads

Install this skill

mkdir -p .claude/skills
curl -sSL https://skillpatch.dev/install_skill/git-guardrails-claude-code | tar -xz -C .claude/skills/

Works with Claude Code, Cursor, GitHub Copilot, Codex and any agent that reads the open SKILL.md standard. Every skill on SkillPatch passes an automated 6-dimension security review before it is published.

Browse all skills · What are agent skills? · Quick setup guide