Agent skill
generate-commit-message
Generate a commit message for staged changes
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/generate-commit-message
SKILL.md
Generate Commit Message
Analyze staged changes and generate a single-line commit message.
Instructions
-
Check for staged changes
- Run
git diff --cachedto see what's staged - If nothing is staged, check
git statusand suggest what to stage
- Run
-
Check project conventions
- Run
git log --oneline -10to see recent commit style - Match the existing format (conventional commits, prefixes, etc.)
- Run
-
Generate a single-line commit message
Best Practices
- 50 characters or less - keep it concise
- Imperative mood - "Add feature" not "Added feature" or "Adds feature"
- Capitalize the first letter
- No period at the end
- What and why, not how
If the project uses Conventional Commits, use the format:
type(scope): description
Types: feat, fix, docs, style, refactor, test, chore
Output
Print the commit message in a code block:
Add user authentication endpoint
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?