commit
Skill6 starsChanged 3 months agoMITView on GitHub
Generate a Conventional Commits message from the staged diff and create the commit after user confirmation. TRIGGER when the user says "commit these changes", "commit this", "generate a commit message", "stage and commit", "commit with CC", "write a commit message", "summarize my diff into a commit", "/nyann:commit". Do NOT trigger on "git commit" in an informational context or when the user is just asking what a commit message means. DISAMBIGUATION: if the user mentions BOTH branch creation AND committing in the same message (e.g. "start a branch and commit this", "new branch + commit"), route to the `new-branch` skill FIRST; `commit` will take over after the branch is created. When nothing is staged, guide the user to stage first rather than silently staging everything.
193 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/vscodetheir own version, first seen Nov 12, 2026
- morodomi/dev-crewtheir own version, first seen Oct 5, 2026
- Magnus-Gille/claude-skillstheir own version, first seen Oct 5, 2026
- Kangentic/kangentictheir own version, first seen Oct 5, 2026
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- tam159/next-roletheir own version, first seen Oct 4, 2026
Used with
Projects with it also use create-branch, review-r and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillcreate-branch
Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.
Also in 4 projects that use this
luischanciSkillreview-r
Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files.
Also in 3 projects that use this
MicrosoftSkillact-on-feedback
Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.
Also in 3 projects that use this
MicrosoftSkillgenerate-run-commands
Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
Also in 3 projects that use this
AWSSkillissue
Implement a GitHub issue end-to-end — branch, code, test, docs, and commit.
Also in 9 projects that use this
luischanciSkillvalidate-bib
Validate bibliography entries against citations in all manuscript files. Find missing entries and unused references.
Also in 3 projects that use this
- +2 more from luischanci
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- microsoft/vscode★ 196ksame name
- ToolJet/ToolJet★ 41ksame name
- openai/symphony★ 28ksame name
- EverMind-AI/EverOS★ 13ksame name
- GetStream/Vision-Agents★ 8.1ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- Windy3f3f3f3f/claude-code-from-scratch★ 2.7ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- pedrohcgs/claude-code-my-workflow★ 1.6ksame name
- bubblelabai/BubbleLab★ 1.1ksame name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-team-sourceSkill
- bootstrap-projectSkill
- check-prereqsSkill
- cleanup-branchesSkill
- diagnoseSkill
- diff-profileSkill
- doctorSkill
- explain-diffSkill
- explain-stateSkill
- fleet-retrofitSkill
- fleetSkill
- gen-ciSkill
- gen-claudemdSkill
- gen-dependency-updaterSkill
- gen-devcontainerSkill
- gen-templatesSkill
- gh-protectSkill
- hotfixSkill
- iac-applySkill
- iac-planSkill
- inspect-profileSkill
- learn-profileSkill
- migrate-profileSkill
- new-branchSkill
- optimize-claudemdSkill
- prSkill
- record-decisionSkill
- releaseSkill
- retrofitSkill
- route-docsSkill
- settingsSkill
- setupSkill
- shipSkill
- suggestSkill
- syncSkill
- sync-team-profilesSkill
- undo-bootstrapSkill
- undoSkill
- wait-for-pr-checksSkill
- watchSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 3 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 174 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Run bash bin/session-check.sh --flow=commit.
- Very specific: line 31
Run bin/commit.sh --target <cwd>.
- Very specific: line 43
If on_main: true, warn the user that the block-main hook will reject the commit.
- Distinctive: line 49
Run both of these before generating the message — they inform scope choice and prevent obvious mistakes from reaching the commit message …
- Very specific: line 66
Don't silently pass critical failures.
- Distinctive: line 79
Don't block; the user may genuinely intend a partial commit.
- Very specific: line 84
If summary.warnings == 0, skip the hygiene surface entirely — quiet when there's nothing to say.
- Very specific: line 117
Use ! before the : ONLY when the change is a breaking public-API change.
- Distinctive: line 121
If a single commit mixes feat + fix + chore, tell the user it should be split.
- Very specific: line 164
Never pass --no-verify. The commit-msg hook is a safety net, not noise.
- Very specific: line 168
If result == "rejected" and stage == "commit-msg":
- Very specific: line 175
Cap at 2 retries: If the third attempt also fails, stop: show the user the last rejection's reason + the message you tried, and ask for …
“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
commit
You are generating a commit message for the user's staged changes. Work
in phases. Never run git commit until the user has confirmed the message.
0. Drift check (quick, non-blocking)
Run bash bin/session-check.sh --flow=commit. If it produces output,
surface the line to the user verbatim. Do not block the flow.
1. Gather context
Run bin/commit.sh --target <cwd>. The script emits a JSON context object
(target, branch, on_main, convention, staged_files, summary,
diff, truncated).
Exit code handling:
0→ JSON context emitted. Check thenothing_stagedfield:nothing_staged: true→ ask the user what they want to stage (git add <paths>,git add -p, or "everything"), then re-run.- Otherwise → full context available. Continue.
2→ not a git repo. Tell the user, stop.
If on_main: true, warn the user that the block-main hook will reject
the commit. Suggest they create a feature branch via the new-branch
skill before continuing.
1.5. Pre-action guards + commit hygiene
Run both of these before generating the message — they inform scope choice and prevent obvious mistakes from reaching the commit message step:
bash bin/pre-action-guard.sh --flow commit --target <cwd> [--profile <resolved-profile.json>]
bash bin/commit-hygiene.sh --target <cwd> [--profile <resolved-profile.json>]Guard handling (exit code)
| Exit | Meaning | Action |
| 0 | All guards passed (or only advisory warnings) | Surface any advisory message lines, continue |
| 3 | One or more critical guards failed | Surface the failing guard messages. Refuse to proceed unless the user passes --skip-guards explicitly (re-ask via AskUserQuestion). |
| 4 | One or more confirm-severity guards failed | Surface the failures. Call AskUserQuestion: "Proceed despite the warnings?" Only continue on explicit confirm. |
Don't silently pass critical failures. The merge-conflict-markers
guard catching <<<<<<< in the staged diff is exactly the case where
"warn and continue" would let a broken merge into a commit.
Hygiene findings
commit-hygiene.sh emits {scope_suggestion, incomplete_staging,
debug_artifacts, dead_code, summary}. Surface them inline:
scope_suggestion.primary(when non-null) — pre-fill the CC scope in §3 with this value unless the user objects.incomplete_staging[]— surface each entry as a short warning ("package.jsonstaged but lockfile is modified-but-unstaged"). Don't block; the user may genuinely intend a partial commit.debug_artifacts[]— show file:line:match. Ask the user via AskUserQuestion whether to abort + clean up, or continue.dead_code[]— show file:line:name. Same prompt as debug artifacts.
If summary.warnings == 0, skip the hygiene surface entirely — quiet
when there's nothing to say.
2. Pick a convention
Read context.convention:
| value | meaning | reference |
conventional-commits | commitlint.config.* present; CC format enforced | references/conventional-commits.md |
commitizen | .pre-commit-config.yaml has commitizen; CC format with stricter body/footer rules | references/conventional-commits.md + commitizen notes |
default | no framework configured; core commit-msg hook regex applies (CC format too) | references/conventional-commits.md |
In every case you are writing Conventional Commits. Load
references/conventional-commits.md for the authoritative rules and
examples before generating.
3. Generate the message
Using the diff + file summary + convention, write a message with this shape:
<type>[(<scope>)][!]: <description>
[optional body — wrap at 72 chars, use imperative mood]
[optional footers: "Closes #N", "BREAKING CHANGE: ..."]Rules you must respect (full rationale in the reference):
<type>∈ {feat, fix, chore, docs, refactor, test, perf, ci, build, style, revert}.- Subject ≤ 72 chars, no trailing period, imperative mood ("add", not "added").
- Use
!before the:ONLY when the change is a breaking public-API change. Pair with aBREAKING CHANGE:footer if so. - Scope (in parens) is a noun naming the subsystem. Infer from the touched paths.
- Multi-file diffs pick the dominant change — never "feat: misc updates".
- If a single commit mixes feat + fix + chore, tell the user it should be split. Don't invent a catch-all subject.
Closes #N/Fixes #Ngo in the footer block only — never in the subject.
4. Preview and confirm
Show the user the generated message plus:
- The active convention (so they know what's being enforced).
- Which files are in the commit.
- A one-line reminder they can edit before you commit.
You MUST call the AskUserQuestion tool (not plain text) to confirm:
{
"questions": [
{
"question": "Proceed with this commit message?",
"header": "Commit",
"multiSelect": false,
"options": [
{ "label": "Commit", "description": "Create the commit with this message" },
{ "label": "Edit", "description": "Let me revise the message first" },
{ "label": "Abort", "description": "Cancel, don't commit anything" }
]
}
]
}5. Commit
Invoke bin/try-commit.sh --target <target> --subject <subject> [--body <body>].
It attempts git commit and emits a structured JSON result instead of
failing the tool call, so you can branch on result:
{"result":"committed","sha":"abc123","subject":"feat: ...","stage":null,"reason":null,"exit_code":0}
{"result":"rejected","sha":null,"subject":"...","stage":"commit-msg","reason":"<hook stderr>","exit_code":1}
{"result":"error","sha":null,"subject":"...","stage":null,"reason":"<stderr>","exit_code":N}Never pass --no-verify. The commit-msg hook is a safety net, not noise.
6. Retry on hook rejection
If result == "rejected" and stage == "commit-msg":
- Parse
reasonfor the hook's failure line (typically the regex it wanted or the specific rule that rejected the subject). - Regenerate the message with that constraint folded in. Keep the original user-facing scope/intent; only adjust the form.
- Invoke
try-commit.shagain with the corrected subject. - Cap at 2 retries. If the third attempt also fails, stop: show the
user the last rejection's
reason+ the message you tried, and ask for manual input. Do not loop further. Do not suggest--no-verify.
For result == "rejected" on pre-commit stage, the user usually needs
to fix their working tree (formatter / linter / block-main). Surface the
reason verbatim and stop — don't try to auto-fix code.
For result == "error" (non-hook failure, e.g. identity missing), pass
the reason verbatim to the user. They fix their environment.
Output summary
On success, end with:
- The committed SHA (
git rev-parse HEAD). - The subject line.
- Any footer (scope / breaking change note) worth highlighting.
When something goes wrong
nothing_staged: truein the JSON → ask what to stage, then re-run §1. Don't assume "everything".- User says "abort" → exit cleanly. Nothing to undo.
- Two retries failed → print the last hook error + the generated message; ask the user to rewrite. Don't loop further.
git commiterrors for non-hook reasons (e.g. author missing) → surface the git error verbatim; the user fixes their environment.
When to hand off
- "Now open a PR" / "ship it" →
prskill (PR only) orshipskill (PR + merge in one step). - "Sync my branch with main first" →
syncskill. - "I need a new branch first" →
new-branchskill. - "Undo that commit" →
undoskill.
Reference
Details: references/conventional-commits.md.
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.

