Commit Message Writer
Generate a commit message for the currently staged changes.
Instructions
- Read the staged diff using
git diff --staged - Analyze the changes to determine:
- The type (feat, fix, docs, refactor, test, chore, ci, style)
- The scope (affected module or component)
- A concise subject line (under 72 characters)
- Output the commit message in conventional commit format
Format
type(scope): subject line
Optional body explaining the motivation for the change.
Examples
Input: A diff showing a new function added to auth.ts
Output: feat(auth): add token refresh endpoint
Input: A diff fixing a typo in README.md
Output: docs(readme): fix installation instructions typo