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.00062 | $0.03447 |
| Opus 5.5 | $0.00025 | $0.01379 |
| Sonnet 5.5 | $0.00012 | $0.00689 |
| Haiku 4.5 | $0.00006 | $0.00345 |
Grade B, and why
git-guardian 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 16d 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 filesmediumPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
\.netrc$| Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 414 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🛡️ Git Guardian
Uses the Agent Skills package format. Execution depends on the host tools and permissions; consult the frontmatter compatibility requirements where provided.
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.
- 16d ago Changed · +1 lines · +22 tokens per session scan C → B 41cd2dfbbb00
- 1mo 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 3d ago), licensed MIT. It adds 62 tokens to every session and 3,447 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B 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 history and rebuilds it as a curated commit series over the same tree, with a backup, confirmation gates and a tree-hash proof. Use when asked to rewrite history as readable commits.
awesome-git-author-rewrite
Rewrites the author and committer on commits with a wrong identity, then force-pushes after access checks, a mirror backup and a confirmation gate. Use when a commit has the wrong name or email.
awesome-git-commit-plan
Plans a codebase as a bisectable series of commits that each build and test alone, delivered as one plan file. Use when asked to split a project into commits.
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
Source-control safety for Git. Two rules apply whether or not you read the body. First, never commit, amend, push, tag, rebase, cherry-pick, revert, or reset --hard unless the user asked for that exact write in this session. An explicit request to create a new commit counts anywhere in the user's own task text, but it…