conventional-commits

Writes git commit messages that follow the Conventional Commits 1.0 spec (type(scope)!: subject, body, footers). Use when the user asks to commit, write a commit message, squash, or prepare a changelog-friendly history.

CodingSource

Install

mkdir -p ~/.claude/skills/conventional-commits
# save the file below as ~/.claude/skills/conventional-commits/SKILL.md

SKILL.md

conventional-commits/SKILL.md
---
name: conventional-commits
description: Writes git commit messages that follow the Conventional Commits 1.0 spec (type(scope)!: subject, body, footers). Use when the user asks to commit, write a commit message, squash, or prepare a changelog-friendly history.
---

# Conventional Commits

## Format

```
<type>[optional scope][!]: <description>

[optional body]

[optional footer(s)]
```

## Rules

1. Pick the type from what the diff does, not from the file names:
   - `feat` adds behaviour users can see; `fix` corrects a bug.
   - `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore` for everything else.
2. Scope is optional: a noun for the area touched (`feat(auth): …`).
3. Description: imperative mood, lowercase, no trailing period, ≤ 72 characters.
4. Breaking changes: add `!` after the type/scope **and** a `BREAKING CHANGE: <what to do>` footer.
5. Body explains *why*, wrapped at 72 columns. Leave it out for trivial changes.
6. Reference issues in footers: `Refs: #123`, `Closes: #45`.

## Workflow

1. Run `git diff --staged`. If nothing is staged, ask before staging.
2. If the diff mixes unrelated changes, suggest splitting it into several commits.
3. Draft the message, show it, then commit with `git commit -F -` so newlines survive.

## Examples

```
feat(api)!: return 404 for unknown skill slugs

Previously the endpoint returned 200 with an empty body, which
clients cached as a valid skill.

BREAKING CHANGE: clients must handle 404 from GET /api/skills/:slug
```

```
fix(parser): accept CRLF line endings in frontmatter
```

More Coding skills