Git Guardrails

Use when configuring repository-scoped safeguards that detect and gate destructive or externally visible Git commands before execution.

9 stars 3 forksGit & Code Review

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sandbaseai/workbuddy-skill --skill git-guardrails
Manual install
git clone --depth 1 https://github.com/sandbaseai/workbuddy-skill.git /tmp/workbuddy-skill
mkdir -p ~/.claude/skills
cp -r /tmp/workbuddy-skill/skills/git-guardrails ~/.claude/skills/git-guardrails

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Git Guardrails

Use this Skill when a repository needs a visible safety layer around Git commands. Guardrails should prevent accidental data loss, credential exposure, or unreviewed external changes while preserving an explicit path for authorized work. They are policy enforcement, not a replacement for branch protection, code review, backups, or human ownership.

## Define scope and authority

Inspect repository instructions, supported hook/policy mechanisms, branch protection, CI gates, and the user's declared workflow before writing configuration. Prefer repository-scoped policy over global configuration. Record the policy owner, protected refs, allowed actors, audit location, and recovery method. Never install global hooks or modify another project without explicit authorization.

Classify commands by effect:

- **Destructive local**: `reset --hard`, `clean -f/-fd`, `checkout .`, `restore .`, deleting branches, overwriting uncommitted files, or rewriting history.
- **External/irreversible**: `push`, especially force pushes, tag deletion, remote deletion, or commands that publish credentials or artifacts.
- **Potentially unsafe**: scripts from repository content, credential helpers, submodule changes, hooks, or commands whose target is unresolved.
- **Read-only**: status, diff, log, show, ls-files, and bounded inspection that does not execute repository-provided code.
Read the full skill on GitHub

Details

Skill name
git-guardrails
Path
skills/git-guardrails/SKILL.md
License
MIT
Repo updated
8 September 2026

FAQ

What does the Git Guardrails skill do?

Use when configuring repository-scoped safeguards that detect and gate destructive or externally visible Git commands before execution.

How do I install the Git Guardrails skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add sandbaseai/workbuddy-skill --skill git-guardrails. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Git Guardrails popular?

It lives in sandbaseai/workbuddy-skill, which has 9 GitHub stars and 3 forks.

Related skills

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.