Agent skill
commit-messages
Write clear commit messages. Use when asked to commit changes, write a commit message, prepare a commit, or describe changes for version control.
Install this agent skill to your Project
npx add-skill https://github.com/rockorager/skills/tree/main/commit-messages
SKILL.md
Committing Changes
Make small, atomic commits with clear messages.
Workflow
1. Understand the Changes
If you don't already understand the changes, review them first:
git diff HEAD
git status --short
2. Stage and Commit
Make small, atomic commits—each commit should address one logical change. If your work spans multiple concerns (e.g., a refactor and a bug fix), break it into separate commits.
# Stage entire files
git add <files>
# Or stage specific hunks for finer control
git hunks list # List all hunks with IDs
git hunks add 'file:@-old,len+new,len' # Stage specific hunks by ID
git commit -m "title" -m "body paragraph"
3. Commit Message Format
Title (first line):
- Limit to 60 characters maximum
- Use lowercase except for symbols or acronyms
- Use imperative mood ("add feature" not "adds feature")
- Use a short prefix for readability in
git log --oneline(avoid "fix:" or "feature:" prefixes)
Body:
- Explain what the change does and why
- Use proper grammar and punctuation
- Use imperative mood throughout
Trailers:
- If fixing a ticket, add appropriate trailers
- If fixing a regression, add a "Fixes:" trailer with the commit id and title
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
compiler-explorer
Optimize functions by generating and analyzing compiler assembly output. Use when asked to optimize a function, analyze generated assembly, or improve performance by examining what the compiler produces.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Didn't find tool you were looking for?