Agent skill
write-commit
Write well-structured commit messages.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/write-commit
SKILL.md
Write Commit
Conventions
- Check repo's existing commits first (
git log --oneline -20) - Subject: imperative mood, 50 chars max, capitalized, no period
- Body: wrap at 72 chars, explain what and why (not how)
- Skip body for trivial/self-explanatory changes (renames, typos, simple fixes)
- Use conventional prefixes (
feat:,fix:,docs:) only if repo uses them
Format
<Subject - imperative, 50 chars max>
<Body - wrap at 72 chars>
Explain motivation: what problem does this solve?
Why this approach over alternatives?
- Bullet points for multiple changes
- Keep each point concise
Fixes #123
Examples
Subject-only (trivial changes):
Fix typo in README
Rename auth module to authentication
Add input validation for email field
With body (complex changes):
Refactor authentication to use JWT
Session-based auth required sticky sessions, complicating
horizontal scaling. JWT tokens are stateless and verifiable
by any server instance.
Trade-off: tokens cannot be invalidated before expiry.
Added a token blacklist for logout and password changes.
Fix race condition in queue processor
Multiple workers could claim the same job when polling
simultaneously. Added row-level locking.
Fixes #847
Avoid
Fix stuff,WIP,Update file.js(too vague)- Past tense (
Fixedinstead ofFix) - Mixing unrelated changes
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?