Generate and validate conventional commit messages with confidence-based type/scope detection. Analyzes code changes to determine type, infer scope from file paths, and detect breaking changes. Use when writing or validating commit messages.
How this skill is triggered — by the user, by Claude, or both
Slash command
/commit-message-generator:commit-message-generatingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate and validate conventional commit messages for projects with high commit message quality requirements.
Generate and validate conventional commit messages for projects with high commit message quality requirements.
.commitmsgrc.md for custom project rules/commit-gen/commit-checkLoad .commitmsgrc.md from project root if present. Extract: types, scopes, require_scope, required_ticket_format, max_subject_length, require_body_for_breaking, add_attribution_footer.
Defaults: Types (feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert), Subject max 72 chars, Body required for breaking changes, Attribution footer disabled.
.commitmsgrc.md if present, use defaults otherwisegit rev-parse --verify <ref>^{commit}git show <sha> --format="" --name-status and git show <sha> --format=""Error: Invalid ref → show git log --oneline -5
Analyze diff to determine type. See Type Detection for decision tree and confidence rules.
Infer scope from file paths. See Scope Detection for inference rules.
Subject rules: Imperative mood, lowercase, no period, max length from config, specific description.
Message format:
type(scope): subject
body (if complex changes or breaking)
BREAKING CHANGE: description (if breaking)
Refs: TICKET-123 (if required_ticket_format)
🤖 Generated with [Claude Code](https://claude.com/claude-code) (if add_attribution_footer)
Co-authored-by: Claude <model-name> <[email protected]> (if add_attribution_footer)
Note: Use your actual model name (e.g., "Opus 4.5", "Sonnet 4") for <model-name>.
Quick self-check: type matches changes, scope matches files, subject is accurate. If issues found, fix and note. Present the generated message.
Output format: Brief analysis (type reasoning, scope reasoning, breaking changes), then the commit message.
.commitmsgrc.md if presentCheck against Conventional Commits spec and project config:
Analyze actual changes and compare:
Validate body quality. See Body Validation for checks.
Format validation results directly using these templates:
Status Icons: PASS=✓, WARN=⚠, FAIL=✗
Concise (for batch operations):
Commit {hash}: {STATUS} {icon} ({N} issues)
Standard (default):
Commit Message Validation Report
=================================
Commit: {hash}
Message: "{message}"
Format Compliance: {STATUS} {icon}
Consistency Check: {STATUS} {icon}
{Only WARN/FAIL items with icon prefix}
Body Quality: {STATUS} {icon}
{Only WARN/FAIL items with icon prefix}
Recommendations:
1. {First recommendation from failed checks}
Verbose (for complex issues):
Present the formatted report to user.
Use these git commands directly:
# Resolve reference to SHA
git rev-parse --verify <ref>^{commit}
# Commit files and diff
git show <sha> --name-status --format=''
git show <sha> --format=''
# Commit message
git log -1 --format='%B' <sha>
git initgit log --oneline -5Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub it-bens/ai-tools