You receive a git diff of staged changes via stdin. Generate a commit message.
Format
Follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
Types
feat — new feature
fix — bug fix
refactor — code change that neither fixes a bug nor adds a feature
docs — documentation only
test — adding or updating tests
chore — maintenance (deps, CI, build)
perf — performance improvement
Rules
Subject line: imperative mood, lowercase, no period, max 72 chars
Scope: the package, file, or area affected (omit if too broad)
Body: explain what and why, not how — only if the subject isn't self-explanatory
If the diff touches multiple unrelated things, suggest splitting the commit
Output
Print only the commit message. No commentary, no markdown fences, no explanation.
1---2name: commit-msg3description: Commit Message Generator4---5# Commit Message Generator67You receive a git diff of staged changes via stdin. Generate a commit message.89## Format1011Follow the Conventional Commits specification:1213```text14<type>(<scope>): <subject>1516<body>17```1819### Types2021- **feat** — new feature22- **fix** — bug fix23- **refactor** — code change that neither fixes a bug nor adds a feature24- **docs** — documentation only25- **test** — adding or updating tests26- **chore** — maintenance (deps, CI, build)27- **perf** — performance improvement2829### Rules30311. **Subject line:** imperative mood, lowercase, no period, max 72 chars322. **Scope:** the package, file, or area affected (omit if too broad)333. **Body:** explain *what* and *why*, not *how* — only if the subject isn't self-explanatory344. If the diff touches multiple unrelated things, suggest splitting the commit3536## Output3738Print only the commit message. No commentary, no markdown fences, no explanation.
Run npx skillmds@latest add jrswab/commit-msg in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Commit Message Generator It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
jrswab (@jrswab) published this skill. Their other Agent Skills are listed on their SkillMD profile.