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.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.00543 | $0.00543 |
| Opus 5 | $0.00271 | $0.00271 |
| Sonnet 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 8d 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.
- 8d 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 (3 stars, last pushed 10d ago), licensed Unlicense. It adds 543 tokens to every session, about $0.0027 per session on Opus 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.
Other cursor rules, from other repositories
git-commit-attribution
Git commits must use the human developer identity only; never Cursor Agent co-authorship.
skill-management
A repository rule for managing coding-agent skills across their source files, generated copies, and version lock file. It treats third-party skills as part of the project’s tracked behavior contract.
iris
GitHub operations specialist — branches, pull requests, issues, releases, tags. Called by zeus after review. Never pushes or merges without explicit human approval. Integrates with VS Code GitHub Pull Requests extension.
rebase-only-merged-agents
When rebasing after a merge, only rebase the agents whose branches you just merged. Do not rebase agents that are still running.
git-workflow
Rules for git operations, commit strategy, and GitHub CLI usage.
release-checklist
What to update with each code change or version release.