generate-commit-message
Skill1 starsChanged 19 days agoMITView on GitHub
Use this skill whenever you need to commit changes or generate a conventional commit message for user review.
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- anchildress1/awesome-github-copilottheir own version, first seen Nov 17, 2026
- patrick-fu/awesome-skillstheir own version, first seen Oct 22, 2026
- anchildress1/awesome-aitheir own version, first seen Oct 13, 2026
- czq297297/skillstheir own version, first seen Oct 11, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- patrick-fu/awesome-skills★ 72same name
- anchildress1/awesome-ai★ 68same name
- anchildress1/awesome-github-copilot★ 68same name
- czq297297/skills★ 1same name
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 repository16 other files it gives its agents.
- airbnb-javascript-styleSkill
- code-reviewerSkill
- code-simplifierSkill
- commit-and-pushSkill
- commitSkill
- debugSkill
- explainSkill
- find-skillsSkill
- frontend-designSkill
- humanizerSkill
- ponytailSkill
- pr-descriptionSkill
- prompt-optimizerSkill
- readme-generatorSkill
- testSkill
- thermo-nuclear-code-quality-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 10 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
No extra tooling: Never run formatters, linters, tests, or git log history scans.
- Distinctive: line 54
NEVER run git add, git push, git rebase, git reset, git commit --amend, or any history-mutating command.
- Distinctive: line 56
NEVER stage files. Commit only what is already staged.
- Very specific: line 57
NEVER modify repository files — no source/docs/config edits, no formatters, no test runs.
- Very specific: line 58
NEVER write any output file (no commit.tmp, no scratch files).
- Very specific: line 59
NEVER --no-verify, --no-gpg-sign, or any flag bypassing hooks or signing.
- Distinctive: line 60
NEVER infer scope from anything other than: user-provided key > branch name.
- Distinctive: line 62
NEVER commit on main/master unless the user explicitly directed it this turn.
- Distinctive: line 104
Never invent a scope word when no key exists — omit it.
- Distinctive: line 110
If both empty/error, stop: "no diff to summarize."
- Distinctive: line 142
Read it from the diff acquisition step's context, or with git config user.name and git config user.email if not already known:
- Very specific: line 155
If user.name or user.email is unset, stop and ask rather than guessing an identity.
- Distinctive: line 163
No body/footer line > 100 chars.
- Distinctive: line 166
If any check fails, regenerate before output.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Purpose
Produce exactly one Conventional Commits v1.0.0 message derived strictly from the
git diff, fast, and print it to the session CLI. Output must pass
@commitlint/config-conventional defaults (with the documented Jira-scope caveat).
Two behaviours:
- Generate (default): print the message to stdout in the CLI. No file is written. No repo mutation.
- Commit (on request): print the message, then create a signed commit of the already-staged changes. Never stages, never writes any file.
There is no commit.tmp. The message always goes to the CLI. If a commit
can't proceed, print the message to the CLI and say why — never silently write a file.
Speed mandate
This skill is latency-sensitive. Obey these to stay fast:
- Minimum git calls. Generate mode = at most two reads:
git rev-parse --abbrev-ref HEADandgit --no-pager diff --cached(fallback togit --no-pager diffonly if the first is empty). - No pre-output staleness re-read in generate mode. Re-read the diff only in commit mode, immediately before committing.
- No extra tooling. Never run formatters, linters, tests, or
git loghistory scans. - Single pass. Derive type, scope, subject, body, and footers in one go; don't iterate unless validation (§Validate) actually fails.
Inputs
- Preferred: staged diff via
git --no-pager diff --cached - Fallback: working-tree diff via
git --no-pager diff
When to commit
Enter commit mode only when ALL are true; otherwise generate mode:
- Intent to commit: phrases like
commit this,/commit,go ahead and commit,git commit, or post-draftyes, commit it. (Phrases likewrite/draft/generate a commit messagealways force generate mode.) - Permission:
git commitis allowed this session (acceptEdits/bypassPermissions, or the user granted the prompt). - Committable state: non-empty staged diff, and branch is not
main/masterunless the user explicitly authorized that branch this turn.
Hard safety boundary
- NEVER run
git add,git push,git rebase,git reset,git commit --amend, or any history-mutating command. The only repo-mutating command allowed isgit commit -Sin commit mode. - NEVER stage files. Commit only what is already staged. If nothing is staged, abort and tell the user.
- NEVER modify repository files — no source/docs/config edits, no formatters, no test runs.
- NEVER write any output file (no
commit.tmp, no scratch files). The message goes to the CLI only. - NEVER
--no-verify,--no-gpg-sign, or any flag bypassing hooks or signing. - NEVER infer scope from anything other than: user-provided key > branch name.
- AI/author attribution footer is MANDATORY. A message without it is a failure.
- NEVER commit on
main/masterunless the user explicitly directed it this turn.
Conventional Commits v1.0.0 — enforced rules
Format:
<type>[optional scope][!]: <subject>
[optional body]
[optional footer(s)]Type — one of build chore ci docs feat fix perf refactor revert style test;
lowercase; never empty. feat = new feature (MINOR), fix = bug fix (PATCH).
Scope (optional) — parens after type: feat(parser):. commitlint default is
lower-case; this skill emits Jira keys uppercase (feat(PROJ-123):). If you use Jira
keys, set in commitlint config: rules: { 'scope-case': [0] } (or [2, 'always', 'upper-case']).
Subject — one space after colon; no trailing period; not empty; not sentence/start/ pascal/upper-case; ≤ 72 chars; imperative present-tense active voice.
Body (optional) — exactly one blank line after subject; lines ≤ 100 chars; single-line bullets only; explain what and why, not how; group changes, don't list files.
Breaking changes — feat(api)!: ... (terse) and/or a BREAKING CHANGE: <migration>
footer (verbose, when migration steps are needed).
Footers — one blank line before; git-trailer form Token-Name: value; lines ≤ 100 chars
(fold with a leading space if longer); no Signed-off-by.
Workflow
1) Scope (issue-key precedence)
- User-provided Jira/issue key (explicit in request).
- Else branch name:
git --no-pager rev-parse --abbrev-ref HEAD, extract first key. - Else omit scope.
Jira key regex (case-insensitive; normalize to uppercase in output): [A-Z][A-Z0-9]+-\d+.
Never invent a scope word when no key exists — omit it.
2) Acquire diff (once)
git --no-pager diff --cached.- If empty,
git --no-pager diff. - If both empty/error, stop: "no diff to summarize."
3) Derive intent (diff-only)
Infer type, breaking flag, subject, body strictly from diff hunks — not chat history or prior
commits. Type heuristics, first match wins: API removed/signature changed/config key dropped →
breaking; new user-visible feature → feat; defect repair only → fix; perf w/o behavior change
→ perf; restructure w/o behavior change → refactor; whitespace/formatting → style;
tests-only → test; docs-only → docs; .github/workflows/CI config → ci; build/deps/packaging
→ build; revert → revert; maintenance w/o prod impact → chore. Scope comes from §1 only.
4) Attribution tier (diff + session only)
Pick exactly one: majority AI → Generated-by; ~half → Co-authored-by; minor AI assist →
Assisted-by; trivial (just wrote this message) → Commit-generated-by. If unsure, credit the
human (less-crediting tier).
5) Compose
<type>[(<scope>)][!]: <subject>
- <single-line bullet>
- <single-line bullet>
<footer(s)>Footer order: issue refs (Refs: PROJ-123 / Closes #42) → BREAKING CHANGE: (only if action
required and not captured by !) → exactly one attribution footer.
The human identity comes from the repo's own git config — never a hardcoded name.
Read it from the diff acquisition step's context, or with git config user.name and
git config user.email if not already known:
Commit-generated-by: <user.name> <user.email>For AI-driven tiers, credit the model and add the human as co-author, e.g.:
Co-authored-by: <user.name> <user.email>If user.name or user.email is unset, stop and ask rather than guessing an identity.
(For GitHub noreply attribution, the exact address is under GitHub → Settings →
Emails, and may look like <ID>+<username>@users.noreply.github.com.)
6) Validate (no git calls — fast)
- Header matches
^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([^)]+\))?!?: .+$and ≤ 72 chars. - No body/footer line > 100 chars; subject has no trailing period; type lowercase + in enum.
- Exactly one attribution footer present.
If any check fails, regenerate before output.
7) Output
Generate mode (default): print the full message to the CLI inside a fenced block. Write nothing to disk. Done.
Commit mode:
- Re-read staged diff once; if it changed since §2, re-derive. Confirm staged diff non-empty and branch allowed.
Print the message to the CLI, then commit:
git commit -S -m "$(cat <<'EOF' <full message here, including blank lines and footers> EOF )"- No
--no-verify/--no-gpg-sign. No staging. Commit only what's staged. - On success: report short SHA + subject.
- On failure (hook/permission/signing): do NOT retry or amend. Print the message to the CLI so it isn't lost, surface the exact error + a one-line diagnosis, and stop.
Examples
Minor fix, AI assisted
fix: pin qs to 6.14.2 to address prototype-pollution vulnerability
- add npm override for qs across the dependency tree
- align instantsearch.js resolution to the pinned version
Co-authored-by: Ada Lovelace <ada@example.com>Feature with Jira scope, AI majority
feat(PROJ-123): add OAuth2 device-code flow to login
- support polling token endpoint with backoff
- surface user_code + verification_uri in CLI output
Refs: PROJ-123
Co-authored-by: Ada Lovelace <ada@example.com>Docs-only, trivial AI involvement
docs: clarify token-refresh semantics in README
- note that refresh tokens rotate on every use
- add a sequence diagram for the silent-renewal flow
Commit-generated-by: Ada Lovelace <ada@example.com>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.

