# Clean Commits

> Turn messy WIP into clean, atomic commits with messages that explain why. Use before opening a PR.

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

---

# Clean Commits
- **Atomic** — one logical change per commit. Refactor and behavior change go in separate commits.
- **Message** — subject says WHAT in imperative ("Fix null pointer in user lookup"), body says WHY. "Fix bug" is useless.
- **Specific** — "Fix login failing when email has uppercase chars" tells the next person exactly what happened.
- Reorder/squash WIP and "fix typo" commits into the real changes (`git rebase -i`).
- Never mix an unrelated fix into a feature commit.
A good history is a debugging tool: `git bisect` and `git blame` only work if commits are atomic and messages explain intent.

