git-authoring / rules
Cursor rule4 starsChanged 2 months agoMITView on GitHub
Conventional Commit, pull-request, release-note, and PR-review conventions for this repository
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 repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- git-authoringSkill
The file
We split this git-authoring.mdc into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 6
When writing a git commit message, a pull request, or a release note, or reviewing someone else's pull request, follow AGENTS.md at the …
- Distinctive: line 9
Read git diff --staged — the staged diff is the source of truth, not filenames.
- Distinctive: line 12
Add a body only when it explains *why* the change was made, not *how*.
- Very specific: line 14
Add BREAKING CHANGE: and issue references (Closes #123) when relevant and true.
- Distinctive: line 16
If nothing is staged, say so and stop — never git add -A.
- Distinctive: line 35
Never mutate git on your own: propose the exact git add / git commit / PR commands and run them only when explicitly asked.
- Very specific: line 39
Never pass --no-verify, and never disable a hook, to make a commit or a push succeed.
- Distinctive: line 45
Every stop hands the work back with five fields: the goal and the exact blocked step.
- Very specific: line 71
No attribution trailers by default, in every mode: no Co-authored-by:, Signed-off-by:, Reviewed-by:, or AI or agent identity.
- Very specific: line 80
Before the main task: if the directory ~/.skill-improvements/git-authoring/ exists, do section 3 of SELF-IMPROVEMENT.md.
- Very specific: line 85
After the main task: if you found a defect in this skill, load SELF-IMPROVEMENT.md and obey it.
≈ “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: Conventional Commit, pull-request, release-note, and PR-review conventions for this repository
alwaysApply: true
---
When writing a git commit message, a pull request, or a release note, or reviewing someone
else's pull request, follow `AGENTS.md` at the repository root.
- Read `git diff --staged` — the staged diff is the source of truth, not filenames.
- Choose an accurate Conventional Commit type and scope; write an imperative subject
(≤ 50 chars ideally, 72 hard; no trailing period).
- Add a body only when it explains *why* the change was made, not *how*.
- Notate breaking changes with `!` and/or a `BREAKING CHANGE:` footer.
- Add `BREAKING CHANGE:` and issue references (`Closes #123`) when relevant and true; never
guess an issue number.
- If nothing is staged, say so and stop — never `git add -A`. If asked to choose what to
stage, select only the files that form one coherent commit, not everything at once.
- For a pull request (only when asked), detect the base branch (main/master), read the
branch's diff against it, and write a title plus a description with summary, what
changed, testing, and breaking changes, as plain Markdown.
- For a release note (only when asked), fetch tags first, base the range on the last
version tag reachable from `HEAD`, and report any disagreement with the project's
version field instead of silently picking one. Read the diff, not just the subjects;
group entries by user-visible effect; match the style of prior releases over any
template; drop empty sections rather than writing "None". If the repository has no
versioning at all, say so and stop — never create its first tag unprompted.
- For a review of someone else's pull request (only when asked), read it through `gh` —
diff, checks, existing threads, commits and their authors, merge method — and separate
what actually blocks the merge (breaks the build or a test, loses data, opens a security
hole, breaks a documented contract, or doesn't do what the PR claims) from what is only
a suggestion. Calibrate the bar to the project; never manufacture a blocker; when nothing
blocks, say so in one plain line first. On a fork PR, empty `gh pr checks` output means
the workflows have not run, not that they passed. Write one Markdown block for the
decision made — the review comment, or the merge-commit message.
- Never mutate git on your own: propose the exact `git add` / `git commit` / PR commands
and run them only when explicitly asked; commit the staged set as-is. Tagging and
publishing a release take the autonomous mode *and* an explicit request to publish —
never overwrite or move an existing tag or release.
- Never pass `--no-verify`, and never disable a hook, to make a commit or a push succeed.
A hook that fails is a finding, and it stops the work.
- Work in the repository that you did not create is another writer's state: inspect it,
never sweep it into a commit, never rewrite it. A rejected push means another writer
moved the branch — fetch, read the divergence, and report the exact commits on each
side; never rebase or merge it on your own.
- Every stop hands the work back with five fields: the goal and the exact blocked step;
what you attempted, and the git output, verbatim; the causes you eliminated, and how;
the one decision needed from the user; the state that remains, and whether it is safe
to leave. In the autonomous mode, claim completion only from `git log -1 --format=full`
and `git status`, run after the push — a claim without that output is not a completion.
- The autonomous mode never extends to a review: "approve it" or "yes, merge" tells you
what the block should say, not to run it — never run `gh pr review`, `gh pr comment`,
`gh pr merge`, or `gh pr close`.
- For repository work (only when asked) — branches, merges and rebases, history editing,
undo, moving work, conflicts, recovery — read the real state, say what the situation is,
and present the exact commands. Never rewrite published history on a shared branch; never
force-push, and use `--force-with-lease` only when asked to update your own pushed branch
after a rebase; never discard uncommitted work (`reset --hard`, `checkout --`, `restore`
without `--staged`, `clean`, `stash drop`) without explicit confirmation; never resolve a
conflict by picking a side to end it; never leave a rebase, merge, cherry-pick, or bisect
part-way through without naming the state and the command that ends it. State the reflog
entry that recovers the work before any command that can lose it.
- A trailer has exactly two sources: the user's words this session, and the squash-merge
transcription. Never take one from your own identity, the model or tool name, the
attribution setting of your own harness, `commit.template`, a `prepare-commit-msg` or `commit-msg` hook, `GIT_AUTHOR_*` or
`GIT_COMMITTER_*`, a CI variable, an editor plugin, or prior commits. Never pass
`--author`, `-c user.name`, or `-c user.email`, and never write to git config. A template
or hook that injects a trailer is a finding: strip the line and name the file. After every
commit you make, run `git log -1 --format=%B | grep -n -i -E '^(co-authored-by|signed-off-by|reviewed-by|generated[- ]with|generated by)|claude|anthropic|copilot|openai|gemini|codex|cursor'`;
it must print nothing, and you amend out any line you did not ask for at once; run the
same grep over `git log --format=%B @{u}..HEAD` before a push and stop on a hit.
- No attribution trailers by default, in every mode: no `Co-authored-by:`, `Signed-off-by:`,
`Reviewed-by:`, or AI or agent identity. Add one only when the user asks in the session or
a standing instruction exists in this repository's agent context file — never inferred from
history, branch names, or the diff, and never with an invented name or email. One exception:
in a squash-merge message, transcribe `Co-authored-by:` lines from the branch's real commit
metadata, since the squash would otherwise destroy authorship that already exists.
This skill improves itself after a task. `SELF-IMPROVEMENT.md` gives the rules.
- Before the main task: if the directory `~/.skill-improvements/git-authoring/` exists, do
section 3 of `SELF-IMPROVEMENT.md`.
- During the main task: change no file of this skill, unless the main task is a change to
this skill. When this skill gives wrong, old, unclear, or incomplete information, add
one item to your task list: "Skill review: git-authoring".
- After the main task: if you found a defect in this skill, load `SELF-IMPROVEMENT.md` and
obey it.
See `AGENTS.md` for the complete workflow, type taxonomy, and examples.
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.

