v4hooks / rules
Cursor rule1 starsChanged 3 months agoMITView on GitHub
Always ask before git commit/push after any code or content change
- Commits and pushes
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/first-party-hooks.mdcCursor rule
- .cursor/rules/forge-tests.mdcCursor rule
- .cursor/rules/foundry-gates.mdcCursor rule
- .cursor/rules/sync-user-facing-docs.mdcCursor rule
- public/llms.txtllms.txt
The file
We split this confirm-commit-push.mdc into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
After finishing any task that changes files (features, fixes, copy, config, etc.):
- Distinctive: line 11
Stop: Do not run git commit or git push yet.
- Very specific: line 16
Do not fall back to numbered lists in chat when AskQuestion is available.
- Very specific: line 17
If AskQuestion is missing from this session’s tools, say so briefly and ask the same three choices in one short line.
- Distinctive: line 18
Wait for the user’s answer.
- Distinctive: line 19
If they already said “commit”, “push”, or “commit and push” in the same turn, treat that as confirmation and proceed.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Always ask before git commit/push after any code or content change alwaysApply: true --- # Confirm before commit & push After finishing any task that changes files (features, fixes, copy, config, etc.): 0. Sync user-facing docs if the diff could affect them (see `sync-user-facing-docs`). 1. **Stop.** Do not run `git commit` or `git push` yet. 2. **Ask with the `AskQuestion` tool** (clickable Cursor buttons). One single-select question: - **Commit & push** — stage relevant files, commit, push to remote - **Commit only** — commit locally, do not push - **Skip** — leave changes uncommitted 3. Do **not** fall back to numbered lists in chat when `AskQuestion` is available. 4. If `AskQuestion` is missing from this session’s tools, say so briefly and ask the same three choices in one short line. 5. Wait for the user’s answer. Only then run the matching git commands. 6. If they already said “commit”, “push”, or “commit and push” in the same turn, treat that as confirmation and proceed. 7. Still follow the usual commit safety rules (no secrets, no force push, good message, etc.).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

