/commit:commitfrom commit
Write and validate Conventional-Commits messages in a house style, matching the repo's own history. Use when committing, splitting work into commits, or checking a commit message.
Ships in commit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Draft well-formed commit messages that follow the conventions of whatever repository this runs in.
This file holds the decision logic.
Everything that varies between repositories — scope names, the formatter to run first, which extra types are in use — is read from the repo's git-workflow.md config (.agents/, else .claude/) or inferred from the repo, never written into the skill.
See references/repo-config.md for the config keys and the one-time bootstrap, and references/tickets.md for how each tracker reads a ticket ID.
git status and git diff --staged, or git diff when nothing is staged.git commit.Resolve every repo-specific value in this order: the config file, then inference from the repo, then the generic default.
| Value | Config key | Inferred from | Default |
|---|---|---|---|
| Formatter | format | — | none |
| Scopes | scopes | workspace layout, then the scope vocabulary already in git log | omit the scope |
| Extra types | types | presence of CI / AI-config files in the repo | base types |
| Attribution | attribution | — | none |
| Tickets | tickets | IDs in branch names and git log, tracker URLs in bodies | no ticket |
Never invent a formatter. Run one only when the config names it. A repo with a pre-commit hook (lefthook, husky, pre-commit) formats on its own and needs nothing here.
Read the scope vocabulary the repo already uses before deriving a new one:
git log --pretty=%s -300 | sed -nE 's/^[a-z]+\(([^)]+)\).*/\1/p' | sort | uniq -c | sort -rn
Matching what the repo has done for 300 commits beats a scope you derived correctly but that nobody else uses.
If the repo does not use this format at all, the repo wins.
A history of sentence-style subjects, a [component] Subject prefix, or any other consistent convention is a decision someone made, and a lone Conventional-Commits message in the middle of it is the odd one out — not an improvement.
Follow what the history shows, apply the parts of this skill that still hold (imperative subject, body that explains why, no attribution, ticket links), and say in one line that you matched the existing style.
Switching a repo's convention is the user's call; offer it, don't do it.
For each commit, return:
### Commit N
**Files:**
- path/to/file1.ts
- path/to/file2.ts
**Message:**
type(scope): subject
- Body bullet.
Rules for previews:
PROJ-12/type(scope): subject in imperative mood
- Body bullet in past tense with period.
- Another change description.
Refs PROJ-12
The PROJ-12/ prefix and the trailer appear only when the work belongs to a ticket (Rule 9).
| Type | When to use |
|---|---|
feat | Added new functionality or new capabilities |
fix | Fixed a bug |
refactor | Restructured code, no behavior change, no new capabilities |
chore | Dev-time: dependencies, tooling, local configs |
docs | Documentation |
test | Tests |
cicd | Ship-time: CI/CD, releases, deployment, containers, git hooks |
revert | Reverted a previous commit |
ai | AI configuration — agent configs, skills, prompts, MCP servers, AI rules |
cicd and ai are house additions to Conventional Commits.
Use them when the repo has files of that kind; a repo whose history never uses them keeps to the base set.
chore vs cicd: if it affects how code gets to production (build, CI, release, deploy) it is cicd.
If it affects how developers work locally (deps, formatting, linting, editor) it is chore.
Scope is derived from context and varies by type.
| Type | Scope convention | Examples |
|---|---|---|
feat, fix, refactor | Path-based, from the package the change lives in | feat(api):, fix(core): |
chore, docs | Path-based, or omitted when the change is mixed | chore(web):, docs: |
cicd | Functional: release, deploy, or omitted | cicd(release):, cicd(deploy):, cicd: |
test | Path-based: the same scope as the code under test | test(core):, test(api): |
ai | Component: skills, agents, mcp, or omitted | ai(skills):, ai(mcp):, ai: |
revert | Matches the original commit's scope | revert(web): |
When a change spans several scopes, omit the scope entirely.
Use the deepest meaningful package directory — the directory that owns a package.json, Cargo.toml, go.mod, pyproject.toml, or equivalent, named by the workspace globs in pnpm-workspace.yaml, package.json workspaces, go.work, or the Cargo workspace members.
The scope is that directory's name, not its full path: apps/api/ gives api, packages/core/ gives core.
Files outside any package — top-level docs/, root configs, CI definitions — have no package scope, so omit it.
A single-package repo has no useful path scopes at all; omit the scope or use functional ones the history already shows.
ai typeai covers anything that directly configures, instructs, or extends AI capabilities.
| Category | Examples |
|---|---|
| Agent configs | .agents/, .claude/, .codex/, .cursor/, .github/copilot/, .aider/, .continue/ |
| MCP servers | .mcp.json, MCP server implementations |
| Skills & prompts | Skills, system prompts, prompt templates |
| AI rules | CLAUDE.md, AGENTS.md, COPILOT.md, AI coding guidelines |
| Model configs | Model selection, temperature, context window settings |
| AI tooling | Repomix configs, AI-specific linting rules |
Excluded — use another type instead:
feat or fix.chore.docs.Check the changed paths against these patterns before choosing a type.
| File pattern | Type | Scope |
|---|---|---|
.mcp.json | ai | mcp |
.agents/skills/**, .claude/skills/**, skills/** | ai | skills |
.claude/agents/**, agents/** | ai | agents |
.agents/**, .claude/**, .codex/**, CLAUDE.md, AGENTS.md, COPILOT.md | ai | — |
.cursor/**, .github/copilot/** | ai | — |
.github/workflows/**, Dockerfile, container and unikernel files | cicd | — |
| Git-hook and release-tool configs (lefthook, husky, release-it, …) | cicd | — |
If every changed file matches an ai pattern, use the ai type.
When AI files are mixed with non-AI files, split them into separate commits.
git log shows these one after another with no headings, so a wall of long bullets is unreadable exactly where commit messages are most often read.attribution policy.
The default is none — no "Co-Authored-By", no "Generated with", no AI or tool attribution of any kind.ai type), use ai.git blame and changelogs long after the work is forgotten.
Plain first, exact term right after, in the same sentence: "nothing touching which organisation can see what (row-level security)", not "no RLS changes".
Not a plain paragraph followed by a technical one, and not a glossary at the end — the reader should never hold an unexplained term while waiting for its meaning.
Spell out acronyms and internal names on first use, and keep the precise terms rather than trading them away.
Watch for invented compound nouns ("id-keyed profile pages", "wire-shape change"); say it as a sentence with an example instead.fix: fix the login becomes fix: resolve login failure; refactor: refactor auth becomes refactor: simplify auth flow.# tokens in the body: on GitHub, and in any changelog generated from commit messages, #<token> renders as an issue reference — so a hex colour or a fragment id becomes a broken issue link.
Write b05220 → 95400f, not #b05220 → #95400f.PROJ-12/feat(api): …, and add a trailer the tracker reads as the last line, after a blank line.
Take the ID from the user's request or the branch name; never guess one or ask for one, and with no ID write neither.
A #12-style ID goes in the trailer only, never the subject, and is the one sanctioned exception to Rule 8.
The trailer links (Refs PROJ-12, Refs #12) by default; it closes (Fixes PROJ-12, Closes #12) only when this one commit finishes the ticket and tickets.close is commit.
If the fix spans several commits, every commit links and the pull request closes.
Jira links on the subject's key alone, so it needs a trailer only to transition by smart commit.
The per-tracker words and rules are in references/tickets.md.One bullet per topic, not per file. Files are an implementation detail and the diff already lists them. A topic is a distinct concern a reader needs to understand: a behavior change, a follow-up worth flagging, a side effect that lives outside the diff. A ten-file rename across one package is one topic; a one-file change that fixes a bug and changes an API shape and defers a TODO is three.
The diff shows what changed; the message answers why. When in doubt, fewer bullets. Each bullet earns its place by carrying information the diff doesn't.
| Topics in the change | Body |
|---|---|
| Zero — the subject already conveys the intent fully | None |
| One | 0–1 bullet, at most 2 sentences |
| Two or three — split into separate commits if practical | 2–3 bullets |
| More | First reconsider whether this should be several commits; if not, 3–5 bullets |
Skip a bullet that:
git log --stat shows them.Keep a bullet that:
Run this on every message before returning the preview.
#12-style; the trailer links, and closes only when this commit finishes the ticket and the close policy allows it.feat(api): add health check endpoint
fix(web): handle an empty result list without throwing
test(api): make the attachment-download test self-sufficient
- The old version reused an account from the seed data, so a parallel test that truncated accounts made this one fail in setup. Synthetic fixture ids survive the truncate and clean up after themselves.
feat(api): add company search with filters
- Returned summary projections rather than whole records to keep the payload small.
refactor(core): move the retry policy into the client
- Callers were each choosing their own backoff, so a slow provider was retried three different ways depending on the entry point.
chore: update workspace dependencies
- Bumped the formatter to 2.4.10 for the stable ordering of import groups.
cicd(deploy): build workspace packages before the service image
- The shared package now builds first so the service's imports resolve inside the container.
ai(skills): add a portable commit-message skill
fix(auth): stop expired sessions from silently renewing
Closes #412
ENG-87/feat(billing): add a usage cap per workspace
Refs ENG-87
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub guillempuche/ai-skill-commit --plugin commit2 plugins ship this exact skill · first indexed Nov 24, 2026