Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate commit messages from staged changes. Trigger with "suggest commit message", "generate commit message", "what should the commit say?", "write commit message".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 413% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 194% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 222% | 0% |
Generates commit messages from staged changes (git diff --staged). This command only creates messages and copies them to your clipboard—it doesn't run any git commands.
bash/commit-message [options]
--format <format> : Choose message format (conventional, gitmoji, angular)--lang <language> : Set language explicitly (en)--breaking : Include breaking change detectionbash# Generate message from staged changes (language auto-detected) # The top suggestion is automatically copied to your clipboard /commit-message # Specify language explicitly /commit-message --lang ja /commit-message --lang en # Include breaking change detection /commit-message --breaking
Important: This command only works with staged changes. Run git add first to stage your changes.
bash# If nothing is staged, you'll see: $ /commit-message No staged changes found. Please run git add first.
The top suggestion gets copied to your clipboard as a complete command: git commit -m "message". Just paste and run it in your terminal.
Implementation Notes:
pbcopy in a separate process from the message outputprintf instead of echo to avoid unwanted newlinesImportant: If project-specific conventions exist, they take priority.
Automatically detects settings from the following files:
commitlint.config.jscommitlint.config.mjscommitlint.config.cjscommitlint.config.ts.commitlintrc.js.commitlintrc.json.commitlintrc.yml.commitlintrc.yamlpackage.json with commitlint sectionbash# Search for configuration files find . -name "commitlint.config.*" -o -name ".commitlintrc.*" | head -1
Example of project-specific types:
javascript// commitlint.config.mjs export default { extends: ["@commitlint/config-conventional"], rules: { "type-enum": [ 2, "always", [ "feat", "fix", "docs", "style", "refactor", "test", "chore", "wip", // work in progress "hotfix", // urgent fix "release", // release "deps", // dependency update "config", // configuration change ], ], }, };
javascript// When project uses Japanese messages export default { rules: { "subject-case": [0], // Disabled for Japanese support "subject-max-length": [2, "always", 72], // Adjusted character limit for Japanese }, };
bash# Learn patterns from recent commits git log --oneline -50 --pretty=format:"%s" # Type usage statistics git log --oneline -100 --pretty=format:"%s" | \ grep -oE '^[a-z]+(\([^)]+\))?' | \ sort | uniq -c | sort -nr
Automatically switches between Japanese/English based on:
Default is English. Generates in Japanese if detected as Japanese project.
text<type>: <description>
Important: Always generates single-line commit messages. Does not generate multi-line messages.
Note: Project-specific conventions take priority if they exist.
Required Types:
feat: New feature (user-visible feature addition)fix: Bug fixOptional Types:
build: Build system or external dependency changeschore: Other changes (no release impact)ci: CI configuration files and scripts changesdocs: Documentation only changesstyle: Changes that don't affect code meaning (whitespace, formatting, semicolons, etc.)refactor: Code changes without bug fixes or feature additionsperf: Performance improvementstest: Adding or fixing testsbash$ /commit-message 📝 Commit Message Suggestions ━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ Main Candidate: feat: implement JWT-based authentication system 📋 Alternatives: 1. feat: add user authentication with JWT tokens 2. fix: resolve token validation error in auth middleware 3. refactor: extract auth logic into separate module ✅ `git commit -m "feat: implement JWT-based authentication system"` copied to clipboard
Implementation Example (Fixed):
bash# Copy commit command to clipboard first (no newline) printf 'git commit -m "%s"' "$COMMIT_MESSAGE" | pbcopy # Then display message cat << EOF 📝 Commit Message Suggestions ━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ Main Candidate: $COMMIT_MESSAGE 📋 Alternatives: 1. ... 2. ... 3. ... ✅ \`git commit -m "$COMMIT_MESSAGE"\` copied to clipboard EOF
bash$ /commit-message 📝 Commit Message Suggestions ━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ Main Candidate: feat: JWT authentication system implemented 📋 Alternatives: 1. feat: add user authentication with JWT tokens 2. fix: resolve token validation error in auth middleware 3. docs: separate auth logic into different module ✅ `git commit -m "feat: JWT authentication system implemented"` copied to clipboard
git diff --stagedNote: This command does not execute git add or git commit. It only generates commit messages and copies to clipboard.
featfixtestchoredocs.gitmessage fileCONTRIBUTING.mdbash# Detection criteria (priority order) 1. Detect language from git diff --staged content 2. Comment analysis of staged files 3. Language analysis of git log --oneline -20 4. Project main language settings
Information used for analysis (read-only):
git diff --staged --name-only - Changed file listgit diff --staged - Actual change contentgit status --porcelain - File statusFor breaking API changes:
English:
bashfeat!: change user API response format BREAKING CHANGE: user response now includes additional metadata
Or:
bashfeat(api)!: change authentication flow
Japanese:
bashfeat!: change user API response format BREAKING CHANGE: response now includes additional metadata
Or:
bashfeat(api)!: change authentication flow
English:
textfeat: add user registration endpoint fix: resolve memory leak in cache manager docs: update API documentation
Japanese:
textfeat: add user registration endpoint fix: resolve memory leak in cache manager docs: update API documentation
bash# Use with staged changes git add -p # Interactive staging /commit-message "Generate optimal commit message" # Stage and analyze specific files git add src/auth/*.js /commit-message --lang en "Generate message for authentication changes" # Breaking Change detection and handling git add -A /commit-message --breaking "Mark appropriately if there are breaking changes"
git add beforehandOther measured skills in the registry, with their headline benchmark lift.