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.
npx skills add suryast/free-ai-agent-skills --skill git-guardiangit clone --depth 1 https://github.com/suryast/free-ai-agent-skillsWrote 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.
[](https://agentmods.dev/skills/suryast/free-ai-agent-skills/git-guardian)<a href="https://agentmods.dev/skills/suryast/free-ai-agent-skills/git-guardian"><img src="https://agentmods.dev/badge/skills/suryast/free-ai-agent-skills/git-guardian/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.
<a href="https://agentmods.dev/skills/suryast/free-ai-agent-skills/git-guardian"><img src="https://agentmods.dev/badge/skills/suryast/free-ai-agent-skills/git-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.03393 |
| Opus 5 | $0.00020 | $0.01697 |
| Sonnet 5 | $0.00008 | $0.00679 |
| Haiku 4.5 | $0.00004 | $0.00339 |
Grade C, and why
git-guardian scanned grade C 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 11d ago.
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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
\.netrc$| How it starts
The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🛡️ Git Guardian
Compatible with Claude Code, Codex CLI, Cursor, Windsurf, and any SKILL.md-compatible agent.
Pre-commit safety checks built for AI-assisted development. AI agents generate code fast — sometimes too fast. Git Guardian catches secrets, sensitive files, merge conflicts, and common AI mistakes before they land in your history.
Triggers
Activate this skill when:
- "check before commit", "is this safe to commit", "pre-commit check"
- "any secrets in staged files?", "check for API keys"
- About to commit AI-generated code
- "run git guardian", "safety check", "audit staged changes"
- After a large AI-generated code dump, before pushing
- User sets up a new repo and wants pre-commit safety
The Full Check Suite
Run these checks against staged changes (or a specified path). Report findings with severity: 🔴 BLOCK, 🟡 WARN, 🔵 INFO.
Check 1: Secret Detection 🔴
Patterns that indicate leaked credentials:
# Check staged files for secrets
git diff --cached --name-only | while read f; do
echo "=== $f ==="
git show ":$f" 2>/dev/null
done | grep -inE \
'api[_-]?key|apikey|api[_-]?secret|\
secret[_-]?key|secret[_-]?token|\
auth[_-]?token|access[_-]?token|bearer[_-]?\
private[_-]?key|ssh[_-]?key|rsa[_-]?private|\
password\s*=\s*["\x27][^\x27"]{6,}|\
passwd\s*=\s*["\x27][^\x27"]{6,}|\
aws_access_key_id|aws_secret_access_key|\
AKIA[0-9A-Z]{16}|\
ghp_[a-zA-Z0-9]{36}|github_pat_|\
sk-[a-zA-Z0-9]{32,}|\
xoxb-|xoxa-|xoxp-|\
glpat-|glcpat-|\
npm_[a-zA-Z0-9]{36}|\
-----BEGIN (RSA|EC|DSA|OPENSSH) PRIVATE KEY'
High-risk literal patterns to check for:
# Check for raw high-entropy strings (possible tokens/keys)
git diff --cached | grep "^+" | grep -vE "^(\\+\\+\\+)" | \
grep -E '[a-zA-Z0-9+/]{40,}={0,2}' | \
grep -vE '(hash|sha|digest|checksum|fingerprint|base64|encoded|example|placeholder|YOUR_|REPLACE_|<.*>)' | \
head -20
Common secret formats by provider:
| Provider | Pattern | Example prefix |
|---|---|---|
| OpenAI | sk-[a-zA-Z0-9]{48} |
sk-proj-... |
| Anthropic | sk-ant-[a-zA-Z0-9-]{95} |
sk-ant-api03-... |
| GitHub | ghp_[a-zA-Z0-9]{36} |
ghp_abc... |
| AWS | AKIA[A-Z0-9]{16} |
AKIAIOSFODNN7... |
| Google API | AIza[0-9A-Za-z-_]{35} |
AIzaSy... |
| Slack | xoxb-[0-9-]{50,} |
xoxb-123-... |
| Stripe | sk_live_[a-zA-Z0-9]{24} |
sk_live_... |
| Twilio | SK[a-zA-Z0-9]{32} |
SK1234... |
| JWT | eyJ[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+\. |
eyJhbGc... |
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.
- 11d ago First seen · 413 lines · 40 tokens per session scan C d78a17696e2f
git-guardian is a skill published in the GitHub repository suryast/free-ai-agent-skills (2 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 3,393 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
awesome-git-history-rebuild
Erases a repository's git history and rebuilds it as a curated commit series over the same tree: an approved split plan (proposed here or supplied by awesome-git-commit-plan), the repo's own commit rules and hooks, paced timestamps, signed commits, a verified mirror backup, a confirmation gate before every…
awesome-git-author-rewrite
Rewrites the author and committer identity on a commit — or on every commit carrying a wrong identity — and force-pushes it safely: ownership and write-access checks, a verified mirror backup, a counted hash blast radius, and a confirmation gate before anything irreversible. Takes a commit URL plus the replacement…
awesome-git-commit-plan
Turns a codebase into a commit plan: a navigation map of its modules and their dependency direction, then a split where every commit builds and tests on its own, so the series is bisectable end to end. Each commit is verified by replaying the ladder in a scratch clone against the repo's own gates. Output is one plan…
spec-checkpoint
Create a comprehensive checkpoint commit with detailed analysis of all changes. Use this skill when the user says "checkpoint", "commit everything", "save my progress", "create a commit", or wants to stage and commit all current changes with a well-crafted message. Also use when the user says "/spec-checkpoint" (or…
git-workflow-and-versioning
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple…
git-advanced-workflows
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.