| name | commit-message-writer |
| version | 1.0.0 |
| description | Writes clear, conventional commit messages by analyzing staged changes. Use this when the user asks to write, draft, or suggest a commit message for their changes. |
Commit Message Writer
Mindset
A great commit message tells a story. It answers three questions:
- What changed?
- Why did it change?
- How does it affect the system?
Principles
- Lead with the "why", not the "what" — the diff already shows what changed
- Use conventional commits format:
type(scope): description
- Keep the subject line under 72 characters
- Use imperative mood: "add feature" not "added feature"
- Separate subject from body with a blank line
- Reference issue numbers when applicable
Approach
- Read
git diff --staged to understand the changes
- Identify the change type (feat, fix, refactor, docs, test, chore)
- Determine the scope from modified file paths
- Craft a concise subject line
- If changes are complex, add a body explaining the reasoning
Types
| Type | When |
|---|
| feat | New feature or capability |
| fix | Bug fix |
| refactor | Code restructuring without behavior change |
| docs | Documentation only |
| test | Adding or updating tests |
| chore | Build, tooling, dependency updates |