| name | commit |
| description | Generate a well-structured git commit message based on staged changes. |
Git Commit Task
Generate a well-structured commit message based on staged changes.
Description
This command analyzes staged git changes and creates a clear, concise commit message. It reviews the changes, categorizes the nature and scope, and then commits them without asking for confirmation.
- Append the nature and scope to the commit in git trailers, e.g.
type: fix or type: refactor.
- Do NOT prefix commit messages with the conventional commits standard.
- Do NOT add Claude co-authorship footer to commits
Usage
commit
Steps
- Run
git status to see staged files
- Review changes with
git diff --cached if needed
- Analyze the nature of changes:
- Feature additions (feature)
- Bug fixes (fix)
- Documentation (docs)
- Style changes (style)
- Refactoring (refactor)
- Tests (test)
- Chores (chore)
- Write a commit message with:
- Clear, imperative mood description
- Body with "why" and "what" if needed
- Footer with references if applicable
- Nature and scope in the trailers (
type: fix or scope: feat)
Examples
Example 1: Simple feature commit
Add password reset functionality
Implemented the Forgot Password flow with a 24h expiry for the Password Reset tokens.
Added the Email Notification service.
type: feature
scope: auth
Example 2: Bug fix commit
Resolve null pointer in user validation
Validation was failing when optional fields were undefined.
Added null checks before accessing nested properties.
Fixes #123
type: fix
scope: auth
Notes
- Keep subject line under 90 characters
- Use present tense ("add" not "added")
- Reference issues/PRs when relevant
- Do NOT list the files that were changed in commit messages or bodies.
- Do NOT add Claude co-authorship footer to commit messages or bodies.
- Always use American English when writing a commit message.