commit-trail
Skill4 starsChanged 22 days agoMITView on GitHub
Write or check a git commit message that a reader can trust a month later: the kind of change, for a fix the proven cause, and for a fix, feature, speed or security change the command that was run and what it showed. Use when the user types /commit-trail, asks to write a commit message, to commit with a proper message, or to check a commit message before pushing. Not for deciding what goes into the commit, and not for release notes or a changelog. Viết hoặc kiểm một lời commit git mà người đọc tin được sau một tháng: loại thay đổi, với commit sửa lỗi thì nguyên nhân đã chứng minh, và với sửa lỗi, tính năng, tốc độ hay bảo mật thì lệnh đã chạy cùng kết quả của nó. Dùng khi người dùng gõ /commit-trail, nhờ viết lời commit, nhờ commit với lời commit đàng hoàng, hoặc nhờ kiểm lời commit trước khi đẩy. Không dùng để quyết định commit gồm những gì, cũng không dùng cho ghi chú phát hành hay changelog.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-cost-reportSkill
- browser-testing-with-devtoolsSkill
- ce-noslopSkill
- codebase-designSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- draw-flowSkill
- grillingSkill
- handoffSkill
- improve-codebase-architectureSkill
- interview-meSkill
- keep-lessonSkill
- lesson-generatorSkill
- make-skillSkill
- meeting-notesSkill
- qa-siteSkill
- qa-testSkill
- security-auditSkill
- session-retroSkill
- tddSkill
- ui-ux-pro-maxSkill
- write-paperSkill
- write-patentSkill
- write-specSkill
- wtfSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Root cause:: only for a fix. The cause that was proven, with the file and line where it sits. - Very specific: line 26
Not run: when nothing could be run, say so and why: Measured: not run — needs the production mailbox.
- Very specific: line 27
Part not checked: when one part was checked and another was not, add a line Not measured: … that names the part and the reason.
- Distinctive: line 37
Show the message to the user: before committing, and commit only when they ask for a commit.
- Distinctive: line 38
After the commit,: if the message lacks something and the commit is not pushed yet, fix it with git commit --amend, keeping what it says …
- Distinctive: line 46
Never invent a result, a number or a cause.
- Distinctive: line 47
Never put a secret, a customer's name or an internal address in a message: it stays in the history for good.
- Distinctive: line 48
Never copy an error's text that holds private data.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
Commit trail
Answer the user in their language. Write the commit message in the language the repository's history uses (look at git log --oneline -10); English when there is no history.
Purpose: someone who reads the history later, without this conversation, can tell what kind of change a commit is, why a bug happened, and how far the change was checked.
The message
type(scope): summary
What changed and why, in a few plain lines.
Root cause: <the proven cause, with file:line> (a fix)
Measured: `<the command that was run>` → <what it showed> (fix, feat, perf, security)- Subject:
type(scope): summary. The type is one offeat fix perf refactor docs chore test ci build style security release revert. The scope is the part of the project, in a word or two. At most 72 characters, no period at the end. Root cause:only for afix. The cause that was proven, with the file and line where it sits. When the cause was not proven, writeRoot cause: unknown — hypothesis: …and say what the guess rests on. Never write a guess as a fact.Measured:forfix,feat,perfandsecurity. The command that was really run, in backticks, and the result it really gave, with its number:`npm test` → 214 pass, 0 fail. Several lines when several things were run.- Not run: when nothing could be run, say so and why:
Measured: not run — needs the production mailbox. A bare "not run" is not enough. - Part not checked: when one part was checked and another was not, add a line
Not measured: …that names the part and the reason. docs,chore,refactor,test,ci,build,style,releaseandrevertneed the subject only; a body is welcome.- A merge commit,
Revert "…",fixup!,squash!andamend!are left as git writes them.
How to do it
- Read the change.
git status --short, thengit diff --cached(orgit diffwhen nothing is staged yet). The message describes what is in the commit, not what the conversation was about. - Pick the type from what the change does for the person who uses the project: a bug that is gone is
fix, a new ability isfeat, the same behaviour made faster isperf, a closed hole issecurity. If one commit holds two kinds, say so and suggest two commits. - For a fix, name the cause. Point at the file and line. If you only have a theory, write it as a hypothesis.
- Collect what was measured. Use only commands that were run in this session, after the last edit to the files in the commit, and the output they gave. If a check was run before a later edit, run it again or do not cite it. If nothing was run, run the project's own checks now when that is safe and quick; otherwise write "not run" with the reason.
- Show the message to the user before committing, and commit only when they ask for a commit. Stage only the files that belong to this change.
- After the commit, if the message lacks something and the commit is not pushed yet, fix it with
git commit --amend, keeping what it says and adding what is missing. Do not amend a commit that is already pushed: tell the user what is missing.
Checking a message someone else wrote
Go through the rules above and list what is missing, one short line each. Do not rewrite a result: if Measured: has no command or no number, ask what was run.
Never
- Never invent a result, a number or a cause. A message that says "not run" is worth more than one that claims a check nobody ran.
- Never put a secret, a customer's name or an internal address in a message: it stays in the history for good.
- Never copy an error's text that holds private data; say which check failed.
With the AI Worker plugin
The plugin can check the same rules by itself after each commit Claude makes: set "commitTrail": true in the computer's config.js (~/.local/share/ai-worker/config.js). It reminds, and never holds a commit back. This skill is the same rules used beforehand, and works where that check is off.
Source
The rules follow commit-trail in kennetvn/nextcore-skills (MIT, see LICENSE in this folder), without its demand for an issue number.
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.

