git-guardrails-claude-code

git-guardrails-claude-code is a skill for Claude Code from qhuang20/shazam. It costs 62 tokens per session (624 once invoked), scanned B, original, no licence file.

A set of Claude Code hooks that blocks selected dangerous Git commands before they run. Git is a tool for tracking code changes.

In plain words
What is it for?
Use it to add Git safety checks that block commands including push, reset --hard, clean, and branch -D.
Why use it?
It helps prevent accidental commands such as forceful resets, branch deletion, cleaning files, or pushing changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the shazam plugin — 18 skills shipped together

Good fit Use it to add Git safety checks that block commands including push, reset --hard, clean, and branch -D.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qhuang20/shazam/git-guardrails-claude-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add qhuang20/shazam --skill git-guardrails-claude-code
Clone the repo
git clone --depth 1 https://github.com/qhuang20/shazam

Made for: Claude Code.

Or install shazam, the plugin that ships this one along with the rest of its 18 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-guardrails-claude-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/qhuang20/shazam/git-guardrails-claude-code/github.svg)](https://agentmods.dev/skills/qhuang20/shazam/git-guardrails-claude-code)
Your own site
<a href="https://agentmods.dev/skills/qhuang20/shazam/git-guardrails-claude-code"><img src="https://agentmods.dev/badge/skills/qhuang20/shazam/git-guardrails-claude-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-guardrails-claude-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/qhuang20/shazam/git-guardrails-claude-code"><img src="https://agentmods.dev/badge/skills/qhuang20/shazam/git-guardrails-claude-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 624 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.00624
Opus 5 $0.00031 $0.00312
Sonnet 5 $0.00012 $0.00125
Haiku 4.5 $0.00006 $0.00062

Measured 9d ago against content hash 40c58e4580e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

git-guardrails-claude-code scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/block-dangerous-git.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Ask the user: install for **this project only** (`.claude/settings.json`) or **all projects** (`~/.claude/settings.json`)?
skills/git-guardrails-claude-code/SKILL.md · 100 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 100 lines · 62 tokens per session scan B 40c58e4580e5

Subscribe to this mod's changes

git-guardrails-claude-code is a skill published in the GitHub repository qhuang20/shazam (4 stars, last pushed 5mo ago), with no licence file. It adds 62 tokens to every session and 624 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

code-history

Trace the git history of specific code — when a function, pattern, or file was added, modified, or removed, and the intent behind each change. Use when the user asks when or why a piece of code changed, wants the evolution of a function, or needs the commit or PR that introduced a behavior. Read-only; not for plain…

2ykwang/agent-skills · 82 tokens

quick-pr

Split a minor change from the current work into a separate worktree and open a PR without interrupting your flow. Use when an unrelated small fix (typo, lint rule, config tweak) is sitting in a feature branch and the user wants it shipped on its own — "quick PR", "split this out", "ship this separately". Requires…

2ykwang/agent-skills · 89 tokens

openclaw-parallels-smoke

End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip…

SafeAI-Lab-X/ClawKeeper · 85 tokens

openclaw-ghsa-maintainer

Maintainer workflow for OpenClaw GitHub Security Advisories (GHSA). Use when Codex needs to inspect, patch, validate, or publish a repo advisory, verify private-fork state, prepare advisory Markdown or JSON payloads safely, handle GHSA API-specific publish constraints, or confirm advisory publish success.

SafeAI-Lab-X/ClawKeeper · 71 tokens

openclaw-release-maintainer

Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

SafeAI-Lab-X/ClawKeeper · 64 tokens

write-pr

Draft a pull request title and body from the current branch's diff and commit history, following the project's PR template and title conventions. Use when the user is about to open a PR and wants ready-to-paste content, or asks to write, draft, or fill in a PR description. Read-only — never opens or pushes the PR.

2ykwang/agent-skills · 71 tokens