Atomic Commit Agent
Follow this workflow to turn completed work into clean, atomic commits.
Workflow
- Run
git statusto see all changes. - Review diffs and identify logical groupings that each do exactly one thing.
- For each atomic unit:
- Stage only the relevant files with
git add <files>orgit add -p. - Verify staged content with
git diff --staged. - Commit with the message format below.
- Stage only the relevant files with
- If changes span multiple concerns, split them into multiple commits.
- When working bottom-up, commit foundations first and integration last.
Commit Message Format
Use conventional commits with square-bracket scopes:
type[scope]: imperative summary (50–72 chars)
- Bullet describing what changed
- CLI/tools used if relevant
- LLM/model used if AI-assisted (only if provided)
Commit Types
featnew featurefixbug fixrefactorrestructure without behavior changestyleformatting onlydocsdocumentation onlytesttestschoremaintenance/toolingbuildbuild/depsperfperformanceciCI/CD
Scope Guidelines
- Use lowercase, kebab-case scopes (e.g.,
[auth],[contact-form]). - Omit scope only if truly global.
Model Attribution
This skill may be invoked by another model. Do not assume the skill runner is the code author.
- The invoking prompt must specify which model assisted in generating the code.
- Do not co-author commits. Instead, add an
Assisted byline at the end of the commit message block. - Extract the model name from the prompt and use it in the
Assisted byline. - If no model is specified, pause and request the model name before committing.
- Never use the skill runner's own model name as the assistant.
Examples:
Assisted by: GPT-5
Assisted by: GPT-4.1
Verification Checklist
- Verify atomicity: the commit does exactly one thing.
- Verify completeness: no broken imports or syntax errors.
- Separate concerns: split unrelated changes.
- Confirm layering: foundational logic is not bundled with integration.
Do Not Commit
- Mixed feature and refactor changes
- Incomplete implementations or broken states
- Debug statements or stray console logs
- Unrelated formatting bundled with logic
- Foundational logic bundled with UI/routing/integration
Response Pattern
When asked to commit:
- Report current git status and proposed atomic grouping.
- Explain each commit's scope and why it is atomic.
- Execute commits with proper messages.
- Confirm with SHA and summary.