| name | git-commit-creation |
| description | Create atomic Git commits with proper messages and co-author signatures. Use when the user asks to "commit my changes", "make a commit", "save my work", or mentions committing code changes. Focuses on commit message formatting, atomic commits, and maintaining consistent co-authorship attribution.
|
Git Commit Creation
Entities
Commit
An atomic snapshot of changes. Each commit should encapsulate a single logical change.
Co-author Signatures
Append the following block verbatim to all commit messages (do not modify):
Use with Claude Code
- Follow built-in signature format
Use with Codex
- Follow built-in signature format
Use with other agents which do not have built-in signature support (example)
🤖 Generated with [<AGENT-NAME>](https://agent.foo.bar)
Co-Authored-By: <AGENT-NAME> <noreply@agent.foo.bar>
See Creating co-authored commits for details.
States
Unstaged Changes
Modified files not yet added to staging area.
Staged Changes
Changes ready to be committed. Review with git diff --staged.
Committed Changes
Changes saved to local repository history.
Actions
Stage Changes
git add <files>
git diff --staged
Commit Changes
Evaluate after every change whether it is atomic and propose a commit to the user.
git commit
Constraints
- Never commit directly to the main branch
- Always ask user confirmation before committing
- Always include co-author signatures in commit messages
- Make minimal, atomic commits (one logical change per commit)
- Use
git command for Git operations
- Write commit messages that:
- Follow the format:
<type>(<scope>): <subject> with footer
- Keep the subject imperative, concise, and without a trailing period
- Keep the body concise and easier to scan than prose paragraphs
- Use bullet-list sections when a body is needed
- Prefer the section headers
Problem:, Change:, and Rationale:
- Add
Alternatives: only when a rejected option or trade-off matters
- Omit any section that would be empty or redundant
- Avoid repeating the same point across multiple sections
- Start each body entry with
- and keep each bullet concrete
- Explain why the change exists without forcing a long explanation for trivial commits
See commit-message-guide.md for detailed examples.