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 OutlineDriven/odin-gemini-cli-extension --skill git-guardrails-claude-codegit clone --depth 1 https://github.com/OutlineDriven/odin-gemini-cli-extensionWrote 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/outlinedriven/odin-gemini-cli-extension/git-guardrails-claude-code)<a href="https://agentmods.dev/skills/outlinedriven/odin-gemini-cli-extension/git-guardrails-claude-code"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-gemini-cli-extension/git-guardrails-claude-code.svg" alt="Measured on agentmods" 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.00071 | $0.00797 |
| Opus 5 | $0.00036 | $0.00398 |
| Sonnet 5 | $0.00014 | $0.00159 |
| Haiku 4.5 | $0.00007 | $0.00080 |
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 7d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- **Global** — `~/.claude/settings.json` and `~/.claude/hooks/block-dangerous-git.sh`. Applies to every project. How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bash-tool PreToolUse hook. The harness invokes the script with the candidate command on stdin as JSON; the script greps for dangerous patterns and exits non-zero with an explanatory stderr message, which the harness surfaces to the model as a refusal. The model cannot override the block.
Blocked patterns (default)
git push— all variants, including--forceand--force-with-lease.git reset --hard— discards working tree and index irreversibly.git clean -fandgit clean -fd— deletes untracked files and directories.git branch -D— force-deletes a branch, including unmerged work.git checkout .andgit restore .— bulk-overwrites uncommitted changes.
Install
1. Choose scope
- Project-local —
.claude/settings.jsonand.claude/hooks/block-dangerous-git.sh. Travels with the repository. - Global —
~/.claude/settings.jsonand~/.claude/hooks/block-dangerous-git.sh. Applies to every project.
2. Place the hook script
Write the script (content below) to the chosen hooks directory. Mark executable with chmod +x.
3. Register the hook
Project (.claude/settings.json):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}
4. Verify
echo '{"tool_input":{"command":"git push origin main"}}' | /path/to/block-dangerous-git.sh
Expected: exit code 2, stderr contains BLOCKED:. A benign command (git status) must exit 0 with no output.
Hook script (block-dangerous-git.sh)
#!/bin/bash
INPUT=$(cat)
COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command')
DANGEROUS_PATTERNS=(
"git push"
"git reset --hard"
"git clean -fd"
"git clean -f"
"git branch -D"
"git checkout \."
"git restore \."
"push --force"
"reset --hard"
)
for pattern in "${DANGEROUS_PATTERNS[@]}"; do
if echo "$COMMAND" | grep -qE "$pattern"; then
echo "BLOCKED: '$COMMAND' matches dangerous pattern '$pattern'. The user has prevented you from doing this." >&2
exit 2
fi
done
exit 0
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.
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.
- 7d ago First seen · 95 lines · 71 tokens per session scan B 05c56ec7f3c5
git-guardrails-claude-code is a skill published in the GitHub repository OutlineDriven/odin-gemini-cli-extension (5 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 71 tokens to every session and 797 once invoked, about $0.0004 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.
Other skills, from other repositories
git-branchless
Enforce idiomatic git-branchless during planning and executing tasks — detached-HEAD-first work, in-memory rebase via git move, event-log recovery via git undo, deferred branch creation, speculative-merge git sync for base updates. Use when planning or executing multi-commit work, history rewrites, stack edits…
qa
Conversational QA mode — user reports bugs in plain language, agent clarifies minimally, files GitHub issues that survive refactors. Trigger on "QA", "QA session", or ad-hoc bug reporting without a fixed deliverable shape. Distinct from branch-scoped and PR-scoped review.
setup-pre-commit
Install git pre-commit hooks via the project's hook tool — Husky+lint-staged (JS), pre-commit (Python/OCaml), lefthook (Go), cargo-husky (Rust). Use when the user wants commit-time formatting, linting, type-checking, or test gates. Detects ecosystem first.
pr-merge-base
Merge one or more PRs into the base branch with queue-like sequencing and conflict resolution. Use when merging PRs that may conflict with each other or the base, requiring ordered application and intelligent conflict handling.
request-refactor-plan
Plan a refactor as a sequence of tiny, working commits via adversarial interview. Default output is a markdown plan at /docs/refactor-plans/ .md; pass --emit-issue to also file a GitHub issue. Trigger on structural refactors (rename, extract, move, split, dedupe) — NOT new features.
setup-gitignore
Initialize or idempotently revise the repo's .gitignore by composing gitignore.io templates, AI-tooling/IDE patterns, and confirmed noise from git status. Use when the user says "set up gitignore", "fix gitignore", or untracked files keep appearing in git status.