Agent skill

Guard Git

by danielvm-git in danielvm-git/bigpowers

Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them.

MITAuto-check passedDevelopment

Install Guard Git

skills CLI
$ npx skills add danielvm-git/bigpowers --skill guard-git -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install danielvm-git/bigpowers guard-git --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/danielvm-git/bigpowers.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/guard-git .claude/skills/guard-git && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
guard-git
GitHub stars
256
Token cost
~714 tokens
SKILL.md length
265 words
Files
4 (incl. scripts)
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them.

  • Works in 5 steps: Scope: ask project-only vs global (paths… → Write the hook bundle from REFERENCE.md… → Run chmod +x on pre-tool-use.sh. → …
  • The user wants git safety hooks
  • SKILL.md covers What gets blocked/enforced, Quick start, Customization and Advanced
  • Runs Shell scripts from its folder; calls git

What it does

Guard Git is an agent skill from danielvm-git/bigpowers. Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them. Installs hook scripts for Claude Code, Cursor, Cursor CLI, and Gemini CLI; documents Google Antigravity Terminal deny lists. Use when the user wants git safety hooks, to block git push or destructive git in agents, or to mirror the same policy across AI coding tools.

Its SKILL.md is about 710 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `REFERENCE.md`, `scripts/block-dangerous-git.sh` and `scripts/lib/git-guardrails-core.sh`).

It sits in Development, covering Git workflow and Commit messages. It works with Git. The repository describes itself as: Agent skills synthesizing years of software engineering discipline into a prescriptive methodology for solo developers. The licence is MIT.

When your agent uses it

  • The user wants git safety hooks
  • Destructive git in agents
  • Mirror the same policy across AI coding tools

Example prompts

  • “/guard-git”

Requirements

  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Scope: ask project-only vs global (paths differ per product).
  2. Write the hook bundle from REFERENCE.md into the client's hooks directory.
  3. Run chmod +x on pre-tool-use.sh.
  4. Merge the hook snippet from REFERENCE.md into the right settings file — do not wipe unrelated keys.
  5. Verify with the tests in REFERENCE.md.

What it can do on your machine

Read from SKILL.md and the folder at commit 812d57a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • conventionalcommits.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Guard Git loads about 714 tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 265 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~714

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from danielvm-git/bigpowers at commit 812d57a, republished under its MIT licence (© danielvm-git). 265 words, ~714 tokens.

Download SKILL.mdSave it as .claude/skills/guard-git/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
guard-git
description
Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them. Installs hook scripts for Claude Code, Cursor, Cursor CLI, and Gemini CLI; documents Google Antigravity Terminal deny lists. Use when the user wants git safety hooks, to block git push or destructive git in agents, or to mirror the same policy across AI coding tools.
model
haiku
effort
standard

Guard Git

HARD GATE — HARD GATE — Before committing, verify: branch is not main/master, author is correct, git user is configured. Bad commits are hard to fix.

Installs a shared hook that blocks destructive git operations and enforces workflow discipline. Requires jq on the agent's PATH when the hook runs.

What gets blocked/enforced

  • Safety: git push --force, git reset --hard, git clean -f, git branch -D, git checkout ., git restore ..
  • Discipline: Blocks direct commits or pushes to protected branches (main, master) unless GIT_BIGPOWERS_LAND=1 (set only by scripts/land-branch.sh).
  • Allows: git push origin <feature-branch> for backup/CI; solo land push to main only inside land-branch.sh.
  • Standardization: Enforces Conventional Commits for all git commit commands.
  • Secrets: Blocks commits containing common secret patterns (sk-, ghp_, AKIA, xoxb-, -----BEGIN private keys) — see REFERENCE.md.

Quick start

  1. Scope: ask project-only vs global (paths differ per product).
  2. Write the hook bundle from REFERENCE.md into the client's hooks directory.
  3. Run chmod +x on pre-tool-use.sh.
  4. Merge the hook snippet from REFERENCE.md into the right settings file — do not wipe unrelated keys.
  5. Verify with the tests in REFERENCE.md.
ClientMechanismConfig
Claude CodePreToolUse (Bash).claude/settings.json or ~/.claude/settings.json
Cursor / Cursor CLIbeforeShellExecution.cursor/hooks.json or ~/.cursor/hooks.json
Gemini CLIBeforeTool + run_shell_command.gemini/settings.json or ~/.gemini/settings.json
Google AntigravityBuilt-in Terminal Deny listSettings UI (no shell hook)

Modes (env on the hook command): GIT_GUARDRAILS_MODE is claude (default) or cursor → stderr + exit 2 on block. Set gemini for Gemini CLI → JSON decision on stdout.

Customization

To add or remove patterns or protected branches, edit pre-tool-use.sh.

Advanced

Full JSON examples, merge rules, Antigravity deny-list entries, and test commands: REFERENCE.md.

<!-- story: e01s03 -->

© danielvm-git, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in skills/guard-git of danielvm-git/bigpowers.

  • SKILL.md
  • REFERENCE.md
  • scripts/block-dangerous-git.sh
  • scripts/lib/git-guardrails-core.sh

Open the folder on GitHubat commit 812d57a

Compare with similar skills

Guard Git next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Guard Git compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Guard Git this skilldanielvm-git/bigpowers256—~714Automated safety check: PassMIT
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills102k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Emoji Commit ConventionsbaptisteArno/typebot.io11k—~424Automated safety check: PassCustom licence

Similar skills

  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    102k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Emoji Commit Conventions

    baptisteArno/typebot.io

    Sets the repository's convention for commit messages and pull request titles: one emoji prefix for the main intent, a concise title and clean follow-up commits.

    11k GitHub stars~424 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated yesterday
    DevelopmentAuto-check: notes

More from danielvm-git/bigpowers

All 39 skills in this repo
  • Extract Design

    danielvm-git/bigpowers

    Extract a Google DESIGN.md file from an HTML prototype (claude.ai/design or any styled page) using Puppeteer, producing machine-readable tokens and AI-generated prose.

    256 GitHub stars~1k tokensUpdated 16 days ago
    Auto-check passed
  • Align Grid

    danielvm-git/bigpowers

    Build editorial/magazine/report webpages on a GENUINE Müller-Brockmann modular grid (International Typographic Style) — not a decorative one.

    256 GitHub stars~3k tokensUpdated 16 days ago
    Auto-check passed
  • Assess Impact

    danielvm-git/bigpowers

    Analyze the blast radius of a proposed change before any code is written.

    256 GitHub stars~766 tokensUpdated 16 days ago
    Auto-check passed
  • Audit Code

    danielvm-git/bigpowers

    Self-review checklist for the coding agent to run before dispatching a reviewer.

    256 GitHub stars~1.6k tokensUpdated 16 days ago
    Auto-check: notes
  • Audit Plan

    danielvm-git/bigpowers

    Evaluate an incoming project plan against bigpowers principles and conventions, surface gaps, and produce a READY/NOT READY verdict before engagement begins.

    256 GitHub stars~880 tokensUpdated 16 days ago
    Auto-check passed
  • Compose Workflow

    danielvm-git/bigpowers

    Chain multiple bigpowers skills into a custom workflow recipe saved in specs/.

    256 GitHub stars~723 tokensUpdated 16 days ago
    Auto-check passed

Works with

Categories

Questions about Guard Git

What does Guard Git do?

Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them. Guard Git is an agent skill from danielvm-git/bigpowers.) and enforce Conventional Commits & Branch Protection before an AI agent runs them.

When should I use Guard Git?

Guard Git fits situations like: the user wants git safety hooks; destructive git in agents; mirror the same policy across AI coding tools.

How do I install Guard Git in Claude Code?

Run `npx skills add danielvm-git/bigpowers --skill guard-git -a claude-code`. Or copy the skill folder (skills/guard-git in danielvm-git/bigpowers) into .claude/skills/guard-git in your project. Claude Code loads it when a task matches its description.

How do I install Guard Git in Codex?

Run `npx skills add danielvm-git/bigpowers --skill guard-git -a codex`. Or copy the skill folder (skills/guard-git in danielvm-git/bigpowers) into .agents/skills/guard-git in your project. Codex loads it when a task matches its description.

Can I use Guard Git in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add danielvm-git/bigpowers --skill guard-git -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/guard-git, .gemini/skills/guard-git, .github/skills/guard-git and .opencode/skills/guard-git in your project.

What does Guard Git need to run?

Going by SKILL.md and its folder, Guard Git needs a shell for the scripts in its folder and the command-line tools its instructions call (git). Our summary lists: A Bash shell.

Does Guard Git access the network?

SKILL.md names 1 domain. As links in the text: conventionalcommits.org. This is read from the text; nothing was executed.

Is Guard Git safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Guard Git use?

Guard Git is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Guard Git use?

About 714 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Guard Git?

Skills that share tags, products or a category with Guard Git: ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars), Git Workflow and Versioning (addyosmani/agent-skills, 102k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Saleor Commit Workflow (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Guard Git?

danielvm-git (a GitHub user) maintains it in danielvm-git/bigpowers, which has 256 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on September 21, 2026.

Source: danielvm-git/bigpowers on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.