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.
git clone --depth 1 https://github.com/danielvm-git/bigpowersWrote 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/rules/danielvm-git/bigpowers/guard-git)<a href="https://agentmods.dev/rules/danielvm-git/bigpowers/guard-git"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/guard-git/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/rules/danielvm-git/bigpowers/guard-git"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/guard-git.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.00096 | $0.02251 |
| Opus 5.5 | $0.00038 | $0.00900 |
| Sonnet 5.5 | $0.00019 | $0.00450 |
| Haiku 4.5 | $0.00010 | $0.00225 |
Grade B, and why
guard-git 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 29d 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.
| Claude Code | `PreToolUse` (Bash) | `.claude/settings.json` or `~/.claude/settings.json` | How it starts
The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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: force push (
-f,--force,+refspec),resetwith--hard,cleanwith any-f*,branch -D/--delete --force,checkout/restorethat discard work (-f,.pathspec). - Argv, not substrings: the hook tokenizes each command, strips git's global options (
-C <path>,-c k=v,--no-pager,--git-dir=…) and judges the(subcommand, arguments)pair — sogit -C repo reset -q --hardis blocked, whilegit push --force-with-leaseis allowed. Rules live inscripts/lib/git-argv.py, mirrored inextensions/omp-hooks.ts;scripts/test-guard-git-normalize.shfails if the two disagree. - Discipline: Blocks direct commits or pushes to protected branches (
main,master) unlessGIT_BIGPOWERS_LAND=1(set only byscripts/land-branch.sh). - Allows:
git push origin <feature-branch>for backup/CI; solo land push tomainonly insideland-branch.sh. - Standardization: Enforces Conventional Commits for all
git commitcommands. - Secrets: Blocks commits containing common secret patterns (
sk-,ghp_,AKIA,xoxb-,-----BEGINprivate keys) — see REFERENCE.md.
Quick start
- Scope: ask project-only vs global (paths differ per product).
- Write the hook bundle from REFERENCE.md into the client's hooks directory.
- Run
chmod +xonpre-tool-use.sh. - Merge the hook snippet from REFERENCE.md into the right settings file — do not wipe unrelated keys.
- Verify with the tests in REFERENCE.md.
| Client | Mechanism | Config |
|---|---|---|
| Claude Code | PreToolUse (Bash) |
.claude/settings.json or ~/.claude/settings.json |
| Cursor / Cursor CLI | beforeShellExecution |
.cursor/hooks.json or ~/.cursor/hooks.json |
| Gemini CLI | BeforeTool + run_shell_command |
.gemini/settings.json or ~/.gemini/settings.json |
| Google Antigravity | Built-in Terminal Deny list | Settings UI (no shell hook) |
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.
- 29d ago Changed · +5 lines e200cf4aafa9
- 3mo ago First seen · 231 lines · 96 tokens per session scan B 528d90a61ee6
guard-git is a cursor rule published in the GitHub repository danielvm-git/bigpowers (298 stars, last pushed 6d ago), licensed MIT. It adds 96 tokens to every session and 2,251 once invoked, about $0.0004 per session on Opus 5.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-09-03.
guard-git compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| guard-gitdanielvm-git/bigpowers | Cursor rule | 298 | 6d ago | MIT | B | 96 | Claude Code, Cursor |
| git-masterJkudjo/oh-my-cursor | Cursor rule | 1 | 20d ago | MIT | A | 14 | Cursor |
| no-auto-commitKingEmma7/cursor-os | Cursor rule | 2 | 2mo ago | MIT | A | 128 | Cursor |
| pull-request-changelist-instructionsivangrynenko/cursorrules | Cursor rule | 88 | 1y ago | MIT | A | 18 | Cursor |
| git-workflownedcodes-ok/cursorrules-collection | Cursor rule | 38 | 9mo ago | MIT | A | 891 | Cursor |
| git-commit-standardsivangrynenko/cursorrules | Cursor rule | 88 | 1y ago | MIT | A | 0 | Cursor |
| gitflyeric0212/cursor-rules | Cursor rule | 1.9k | 10mo ago | none | A | 0 | Cursor |