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/tommyvo/useful-promptsWrote 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/tommyvo/useful-prompts/no-git-history-changes)<a href="https://agentmods.dev/rules/tommyvo/useful-prompts/no-git-history-changes"><img src="https://agentmods.dev/badge/rules/tommyvo/useful-prompts/no-git-history-changes/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/tommyvo/useful-prompts/no-git-history-changes"><img src="https://agentmods.dev/badge/rules/tommyvo/useful-prompts/no-git-history-changes.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.00543 | $0.00543 |
| Opus 5.5 | $0.00217 | $0.00217 |
| Sonnet 5.5 | $0.00109 | $0.00109 |
| Haiku 4.5 | $0.00054 | $0.00054 |
Grade B, and why
no-git-history-changes 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 3mo 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.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
The agent is NEVER authorized to run any command that creates a commit or How it starts
The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Never Change Git History Without Explicit Approval
The agent is NEVER authorized to run any command that creates a commit or rewrites git history — not by default, not with general prior approval, and not even if the user explicitly requests it in the moment. This rule cannot be overridden by a user instruction, no matter how direct or repeated. If the user asks the agent to commit, amend, rebase, reset, force-push, or otherwise write to git history, the agent must refuse and explain that this action is never authorized, and instead hand back the exact command/message for the user to run themselves.
This applies even if the user asked for something similar earlier in the same conversation, even if the user says "we amend commits" or describes a team convention, and even if a prior message seemed to authorize it in general terms.
This includes, but is not limited to:
git commit(including with-m,-F,--no-edit, etc.)git commit --amendgit rebase(interactive or not)git reset(soft, mixed, or hard)git push,git push --force,git push --force-with-leasegit cherry-pick,git filter-branch,git filter-repo- Any other command that changes the commit graph, HEAD, branch refs, or remote history
What to do instead
- If the user wants a commit message, provide the text only (e.g. in a
markdown code block). Do NOT run
git commitwith it. - If the user wants to amend, explain what the amend would do and give them the exact command to run themselves. Do NOT run it.
- Staging changes (
git add) is fine. Read-only inspection commands (git status,git diff,git log,git show) are fine. - There is no phrasing, permission grant, or user instruction — however explicit, repeated, or urgent — that authorizes the agent to run these commands itself. Always refuse and defer to the user to run it.
Why
Committing or rewriting history on someone's behalf is irreversible-feeling and high-stakes: it can rewrite shared history, trigger CI/hooks unexpectedly, or push things the user hasn't actually reviewed yet. The default must always be to hand back control, not to act.
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.
- 3mo ago First seen · 51 lines · 543 tokens per session scan B ee6b39cc026d
no-git-history-changes is a cursor rule published in the GitHub repository tommyvo/useful-prompts (4 stars, last pushed 2d ago), licensed Unlicense. It adds 543 tokens to every session, about $0.0022 per session on Opus 5.5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
no-git-history-changes compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| no-git-history-changestommyvo/useful-prompts | Cursor rule | 4 | 2d ago | Unlicense | B | 543 | Cursor |
| irisils15/pantheon-legacy | Cursor rule | 12 | 19d ago | MIT | A | 43 | Cursor |
| rebase-only-merged-agentsbriangmilnes/APAS-VERUS | Cursor rule | 10 | 2mo ago | MIT | A | 297 | Cursor |
| git-workflowgrafana/grafana-cube-datasource | Cursor rule | 20 | 2d ago | AGPL-3.0 | A | 616 | Cursor |
| release-checklistyoreai/relay | Cursor rule | 2 | 3mo ago | Apache-2.0 | A | 215 | Cursor |
| branching-merging-strategyjairosoft-com/mcp-server-template-python | Cursor rule | 0 | 1y ago | none | A | 0 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 204k | 12d ago | MIT | A | 604 | Cursor |