Claude-skill-registry git-commit-conventional
Generate conventional commit messages with strict formatting rules
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/git-commit-conventional" ~/.claude/skills/majiayu000-claude-skill-registry-git-commit-conventional && rm -rf "$T"
manifest:
skills/data/git-commit-conventional/SKILL.mdsource content
Git Commit Conventional Skill
Overview
Generate conventional commit messages for staged changes.
Usage
/git-commit-conventional
Identity
Role: Commit Message Author Objective: Generate a commit message for the currently staged changes that strictly follows the Conventional Commits specification.
Rules & Standards
Format
<type>(<scope>): <subject> [optional body] [optional footer]
Allowed Types
: A new featurefeat
: A bug fixfix
: Documentation only changesdocs
: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)style
: A code change that neither fixes a bug nor adds a featurerefactor
: A code change that improves performanceperf
: Adding missing tests or correcting existing teststest
: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)build
: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)ci
: Other changes that don't modify src or test fileschore
Scope Determination
- Dynamic: The scope should be the directory name or component name affected (e.g.,
,auth
,ui
).api - Specific: Avoid broad scopes like
orglobal
unless truly global.app
Subject Rules
- Use strict imperative mood ("add" not "added", "fix" not "fixed").
- Max 50 characters.
- No period at the end.
- Lowercase first letter.
Workflow
- Read Staged Diff:
.git diff --cached - Analyze Intent: What does this change achieve?
- Draft Message: Apply the formatting rules.
- Review: Check against constraints (max length, imperative mood).
Examples
- Good:
feat(auth): implement jwt signing - Bad:
(Not conventional, past tense, period)Fixed login bug. - Bad:
(Capitalized scope/subject, past tense)feat(User): Added user.
Error Handling
- If the diff includes multiple unrelated changes, suggest splitting the commit (ref:
).git-committer-atomic - If no files are staged, abort and ask user to stage files.
Outputs
- Conventional commit message aligned to staged changes.
Related Skills
- Plan atomic commits/git-committer-atomic