From software
This skill should be used when the user asks to "create a conventional commit", "generate conventional commits", "generate commit", "commit with conventional format", "group my changes for commits", "make a conventional commit message", or mentions "semantic commits", "commitizen", "commit conventions". Analyzes staged and unstaged changes, groups related modifications, and generates properly formatted conventional commit messages with interactive commit grouping options.
How this skill is triggered — by the user, by Claude, or both
Slash command
/software:conventional-commitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate properly formatted conventional commits by analyzing changes, grouping related modifications, and creating semantic commit messages following the Conventional Commits specification.
Generate properly formatted conventional commits by analyzing changes, grouping related modifications, and creating semantic commit messages following the Conventional Commits specification.
Automate the process of reviewing code changes, identifying logical groupings, and generating conventional commit messages. Ensure commits follow the Conventional Commits specification while providing control over commit granularity (separate small commits, combined medium commits, or a single large commit).
Use this skill when:
Follow the standard format:
<type>(<scope>): <subject>
<body>
<footer>
Type (required):
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, missing semicolons, etc.)refactor: Code refactoring without changing functionalityperf: Performance improvementstest: Adding or updating testsbuild: Build system or dependency changesci: CI/CD configuration changeschore: Maintenance tasks, tooling changesrevert: Reverting previous commitsScope (optional): Component or module affected (e.g., auth, api, ui, parser)
Subject (required): Brief imperative description (≤50 chars)
Body (optional): Detailed explanation of what and why
Footer (optional): Breaking changes, issue references
Run git commands in parallel to gather change information:
# View status (never use -uall flag)
git status
# View unstaged changes
git diff
# View staged changes
git diff --cached
# Recent commit messages for style reference
git log --oneline -10
Review the output to understand:
Analyze the changes and identify logical groupings based on:
Grouping criteria:
Example groupings:
Changes to group together:
src/auth/login.ts + src/auth/session.ts → Authentication featuretests/auth.test.ts + tests/session.test.ts → Authentication testsREADME.md + docs/api.md → Documentation updatesChanges to separate:
src/feature.ts ≠ Bug fix in src/auth.tsPresent the analysis showing:
Use AskUserQuestion to let the user choose commit granularity:
Question: "How would you like to structure these commits?"
Options:
1. "Separate small commits" - One commit per logical group (detailed history)
2. "Combined medium commits" - Group related changes (balanced approach) (Recommended)
3. "Single large commit" - All changes in one commit (simple history)
Guidance for recommendations:
Based on the user's choice, generate conventional commit messages:
For each commit group:
Subject line rules:
Body guidelines:
Footer format:
BREAKING CHANGE: descriptionCloses #123, Fixes #456Co-authored-by: Name <email>Example commit messages:
feat(auth): add JWT token refresh mechanism
Implement automatic token refresh to improve user experience
by preventing unexpected logouts during active sessions.
- Add refresh token endpoint
- Implement token rotation strategy
- Add retry logic for failed refresh attempts
Closes #234
fix(api): handle null responses in user service
Previously, null user responses caused uncaught exceptions.
Add null checks and return appropriate error messages.
Fixes #456
docs(readme): update installation instructions
Add troubleshooting section for common installation issues
and clarify dependency requirements for Node.js 18+.
After presenting commit messages:
git add for specific files in each groupgit log to confirm commits were created correctlyStaging strategy:
git add . or git add -ACommit execution:
# Use heredoc for proper formatting
git commit -m "$(cat <<'EOF'
feat(auth): add JWT token refresh mechanism
Implement automatic token refresh to improve user experience
by preventing unexpected logouts during active sessions.
- Add refresh token endpoint
- Implement token rotation strategy
- Add retry logic for failed refresh attempts
Closes #234
Co-Authored-By: Claude <[email protected]>
EOF
)"
Important notes:
--no-verify flaggit status after each commit to verifyAfter creating commits, provide a clear summary:
✓ Created 3 conventional commits:
1. feat(auth): add JWT token refresh mechanism
Files: src/auth/token.ts, src/auth/refresh.ts
2. test(auth): add token refresh test coverage
Files: tests/auth/token.test.ts
3. docs(auth): document token refresh flow
Files: docs/authentication.md, README.md
All changes committed successfully.
No changes to commit:
Merge conflicts:
Pre-commit hook failures:
Mixed staged/unstaged changes:
Very large changesets (>20 files):
DO:
DON'T:
For detailed conventional commit specifications and examples:
references/conventional-commits-spec.md - Full specification with examplesreferences/commit-patterns.md - Common patterns and anti-patternsWorking examples of commit workflows:
examples/multi-commit-workflow.sh - Example of creating multiple commitsexamples/commit-messages.txt - Example commit message formatsUtility scripts for validation:
scripts/validate-commit-msg.sh - Validate commit message formatscripts/group-changes.py - Analyze and suggest change groupingsCommon Types:
feat - New feature
fix - Bug fix
docs - Documentation
style - Formatting
refactor - Code restructuring
test - Tests
chore - Maintenance
Template:
<type>(<scope>): <subject ≤50 chars>
<body wrapped at 72 chars>
<footer: BREAKING CHANGE, Closes #123>
Co-Authored-By: Claude <[email protected]>
Grouping Strategy:
Small commits → Detailed history, many commits
Medium commits → Balanced (recommended)
Large commit → Simple history, one commit
npx claudepluginhub hirogakatageri/hirokata --plugin softwareExecutes git commits with conventional commit message analysis, intelligent staging, and message generation. Use when asked to commit changes or when /commit is invoked.
Groups uncommitted git changes (staged/unstaged/untracked) into atomic commits by logical purpose and generates conventional commit messages with bodies. Use for splitting multiple changes or 'smart commit' requests.
Generates Conventional Commits from staged git changes: classifies feat/fix/docs types, detects scopes/breaking changes, matches project style from history.