# Commit Messages

> Write clear, structured commit messages that explain why, not just what.

- Skill: `rahulrachhoya/commit-messages` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rahulrachhoya/commit-messages`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rahulrachhoya/commit-messages/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: RahulRachhoya (https://skillmd.com/u/rahulrachhoya)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/rahulrachhoya/commit-messages

---


# Commit Messages

## Structure
```
type(scope): description

Body — explain why this change exists, not what it does.
```

## Types
| Type | When |
|------|------|
| `feat` | New feature |
| `fix` | Bug fix |
| `refactor` | Code change with no behavior change |
| `test` | Adding/updating tests |
| `docs` | Documentation |
| `chore` | Config, deps, CI, tooling |
| `perf` | Performance improvement |
| `style` | Formatting (no code change) |

## Rules
- **Subject**: ≤50 chars, imperative ("add" not "added" or "adds")
- **Body**: wrap at 72 chars, explain motivation
- **Scope**: optional but helpful: `feat(api):` or `fix(auth):`
- **Breaking changes**: add `!` after type: `feat(api)!: remove deprecated v1 endpoint`
- **Reference issues**: `fix #123` in the body

## Examples
```
feat(auth): add password reset flow

Users can now request a password reset email. Token expires in 15 minutes.

Closes #42
```

```
fix(db): handle null created_at on legacy records

Some records created before migration v3 have null timestamps.
Default to current timestamp instead of crashing.

Fixes #87
```

