Git Commit Messages Skill
Generates conventional commit messages from your diff. Consistent, descriptive, team-ready.
What it does
The Git Commit Messages Skill turns any diff into a properly-formatted Conventional Commit. It writes a subject under 50 characters in imperative mood, a body that explains why (not what), and a footer with issue references and breaking-change flags. It refuses to invent changes that are not in the diff — the output is grounded in what actually changed.
What Claude does once this skill is installed
When you pipe a diff to Claude Code (git diff --staged | claude) or ask for a commit message in a chat, you get a full Conventional Commit back: type(scope): subject, blank line, body wrapped at 72 characters, blank line, footer. The skill understands the full type vocabulary (feat, fix, refactor, perf, test, docs, chore, build, ci, style) and picks the right one based on the diff. It catches breaking changes, flags them with a ! after the type and a BREAKING CHANGE: line in the footer, and enforces one-logical-change-per-commit — if you have staged two unrelated diffs, it asks you to split them first.
Who should use it
Teams that use Conventional Commits for changelog generation or semver bumps — semantic-release, changesets, standard-version. Solo developers who want a clean history without thinking about it. Open source maintainers who want uniform messages across dozens of contributors. Anyone who has ever written "update stuff" and regretted it three months later.
What it solves
Conventional Commits are easy to describe and hard to stay consistent with. This skill removes the effort: it reads the diff, picks the correct type and scope, phrases the subject imperatively, and writes a body that adds real context (why the change was made, what it enables, what to watch for). The result is a git log you can actually skim 18 months later.
How to install
Which tool are you using?
Not sure? Claude.ai is the website. Claude Code is the command-line tool you install separately. Cursor is a code editor that reads .cursorrules.
- 01
Open your terminal
Terminal on Mac or Command Prompt / PowerShell on Windows. You can install this skill from anywhere — it is global.
- 02
Start Claude Code
Launch Claude Code from any directory:
terminalshellclaudeIf you see 'command not found', install Claude Code first: npm install -g @anthropic-ai/claude-code
- 03
Download the skill file
Click the 'Download Skill' button below to save git-commits.md to your computer.
- 04
Install the skill
Add the skill to Claude Code:
terminalshellclaude skills add ~/Downloads/git-commits.mdOn Windows: C:\Users\YourName\Downloads\git-commits.md
- 05
Verify the skill is active
Confirm 'git-commits' is listed:
terminalshellclaude skills list - 06
Generate your first commit message
Stage your changes and pipe the diff to Claude. You will get a Conventional Commit with a proper subject, body, and footer.
terminalshellgit add -Agit diff --staged | claude "write a commit message"The output is ready to paste into git commit -m, or use git commit with an editor to fine-tune before pushing.
The claude skill file
Copy the full contents below, or download the file directly.
---name: git-commitsdescription: Use this skill when generating git commit messages. Produces Conventional Commits with clear subject, context-aware body, and correct footer.--- # Git Commit Messages Skill Use this skill whenever the user asks for a commit message, a PR title derived froma diff, or release notes generated from commit history. Read the diff before writing.Never invent changes that are not in the diff. ## Format ```<type>(<scope>): <subject> <body> <footer>``` - Exactly one blank line between subject, body, and footer.- Subject, body, and footer sections are all optional EXCEPT the subject. ## Types - **feat**: a new user-visible feature- **fix**: a bug fix- **refactor**: code change that neither fixes a bug nor adds a feature- **perf**: performance improvement- **test**: adding or fixing tests- **docs**: documentation only- **chore**: tooling, deps, config that does not affect runtime code- **build**: build system, packaging, publishing- **ci**: CI configuration- **style**: formatting only, no code behavior change ## Scope - A short noun describing the affected area: auth, billing, api, ui, deps- Omit scope if the change is cross-cutting- Use the folder or module name when unambiguous ## Rules - Subject in imperative mood: "add", not "added" / "adds"- Subject ≤ 50 characters, no trailing period- Subject starts lowercase after the colon- Body wrapped at 72 characters- Body explains **why** the change was made, never what the diff already shows- Reference issues in the footer: "Closes #123", "Refs #456"- Breaking changes start with "BREAKING CHANGE:" in the footer AND append ! after the type- One logical change per commit — if the diff mixes two concerns, ask the user to split ## Examples ### Feature with body```feat(auth): add passwordless email sign-in Replaces the legacy password flow with magic links. Users no longerneed to remember a password and the attack surface shrinks becausepasswords are never stored. Existing sessions are preserved. Closes #142``` ### Bug fix```fix(billing): correct proration on mid-cycle plan change Proration previously double-counted the partial month when a userdowngraded. Switched to day-count arithmetic against the canonicalbilling period boundary. Closes #318``` ### Breaking change```feat(api)!: require auth on /reports endpoints BREAKING CHANGE: /reports endpoints now require a valid bearertoken. Unauthenticated clients will receive 401 instead of publicsummary data.``` ### Dependency bump```chore(deps): upgrade next to 14.2.5 Picks up the CVE-2024-xxxx middleware fix and the streamingbugfix for nested layouts.``` ### Small refactor, no body```refactor(ui): extract CardHeader into its own component```Example output
What Claude does before and after you install this claude skill.
"update stuff" — no type, no scope, no body, future you has no idea what changed.
"feat(auth): add passwordless email sign-in" with a body explaining why passwords were replaced and a "Closes #142" footer.
Customization tips
Add custom types for your team (e.g. `release`, `deps`) by editing the Types list. If you use a different issue tracker, swap "Closes #123" for "JIRA-123" format in the Rules. Teams with strict subject-length rules can tighten the 50-char limit to 40.
Related resources
Code Review Skill
Claude reviews your code like a senior engineer — catches bugs, suggests improvements, flags security issues.
Senior Code Reviewer
Acts as a senior engineer reviewing your PR. Catches logic errors, security issues, and code smells.
README Writer
Writes complete, professional README files with setup instructions, usage examples, and badges.
Frequently asked questions
Does this enforce the Conventional Commits spec?
Yes. It follows Conventional Commits 1.0.0: type(scope): subject, with body explaining why, and breaking changes flagged in the footer.
Can I add custom commit types for my team?
Yes. Edit git-commits.md and add your types to the Types section. For example: 'release', 'deps', 'security'.
Does it work with pre-commit hooks and commitlint?
Yes. The output is standard Conventional Commits text, which passes the common @commitlint/config-conventional rules.
Will it squash multiple unrelated changes into one commit?
No. The skill writes one commit per diff. If your staged changes mix two concerns, it will flag that and suggest splitting the diff first.
Can it generate release notes from many commits?
Yes — pipe git log --oneline to Claude and ask for release notes grouped by type. The skill understands conventional commit grammar so grouping is accurate.
Want more like this?
Browse the full RohanKit library — free resources for Claude and Cursor.