atomic-commitslisted
Install: claude install-skill svyatov/agent-toolkit
# Atomic Commits
Work in small, focused increments. Every commit should be atomic. Every PR should be reviewable in one sitting.
## Atomic Commit Criteria
Every commit must:
1. **Pass CI**: tests, linter, build all green
2. **Be deployable**: application is in a valid state
3. **Introduce no dead code**: no unreachable code, unused imports, or half-wired features
## One Commit, One Type of Work
- **Refactor**: restructure code without changing behavior
- **Feature**: the behavior change itself
- **Cleanup**: remove old code, update docs
If the commit message needs "and", split it.
## PR Size
Target ~200 lines per PR. If larger, find a seam: ship refactor and feature as separate PRs, each independently mergeable and deployable.
## Agent Behavior
1. Plan atomic steps before coding: refactors, then features, then cleanup.
2. Commit after each atomic step; don't accumulate.
3. Stage specific files with `git add <path>`, never `git add .` or `git add -A`. Do not use `git add --patch`; it is interactive and hangs in a non-interactive shell.
4. When branch diff nears 200 lines, open a PR and continue in a follow-up.
## Hook
This skill includes a PostToolUse hook (`hooks/check-diff-size.sh`) that monitors diff size after Edit/Write operations and nudges when it's time to commit or open a PR.