commit-craftlisted
Install: claude install-skill Univers42/claude-deal-with-the-devil
# Commit craft
A commit is a message to whoever is bisecting at 3am, and that is usually you. The two
properties that matter: each commit does **one** thing, and each commit **builds and
passes**. Everything else follows from those.
## 1. Look at what you actually have
```sh
git status
git diff # unstaged
git diff --staged # staged
```
Read the whole diff before writing anything. Two things you are looking for:
- **Accidents** — a debug print, a commented-out block, a `.env`, a large binary, a
hardcoded token, a stray formatter sweep across files you never touched.
- **Seams** — where this tree is really two or three changes wearing one hat.
## 2. Split it
One logical change per commit. If the message needs "and", it is two commits.
- **Never mix a refactor with a feature** (`rules/refactor-common.md`). A rename across
40 files plus one behaviour change is a diff nobody can review — and reviewers approve
what they cannot read.
- A fix and its regression test go **together**. The test is what proves the fix.
- Formatting-only sweeps get their own commit, so the real change stays legible.
```sh
git add -p # stage by hunk
git stash push -- <path> # set aside what belongs in the next commit
```
**Each commit compiles and passes on its own.** That is what makes `git bisect` and
`git revert` work, and it is the whole reason for this discipline.
## 3. Write the message
```text
<type>(<scope>): <what changed, imperative, lower case, no