commit-msg
Write Conventional Commits messages for changes the agent just made, one per logical change, following the repository's own commit conventions. Use when suggesting a commit message, or when committing your own work.
How do I install this agent skill?
npx skills add https://github.com/anhtuan23/skills --skill commit-msgIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides instructions for the agent to generate standard Git commit messages based on logical changes. It does not execute code, access the network, or interact with sensitive files.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Commit Msg
Use this skill when the agent has finished one or more logical changes and needs a commit message for each: to suggest it to the user, or to commit directly when the project's rules allow agent commits.
Workflow
- Learn the repo's conventions. Read the project's agent rules
(
AGENTS.md,CLAUDE.md, or similar) for commit rules, then rungit log --format=%s -20on the current branch. Check for a commitlint or similar config. These win over the defaults below: allowed types, scope names (package, service, or folder), subject length, and required trailers. - Split into logical changes. Group the changes the agent made by purpose. Each group gets its own message, and its own commit when committing. Commit only your own changes; leave other work in the tree untouched.
- Pick the type by the main purpose of the change (see Decision Rules).
Default set:
feat,fix,refactor,chore,docs,style,test, extended by any types the repo's history or config uses, such asbuild,ci, orperf. - Pick the scope. Use one when a single area dominates, spelled as the repo spells it in its history (for example the package or service name). Omit it when the change spans unrelated areas.
- Write the subject:
type(scope): short subject, ortype: short subjectwith no scope. Imperative mood, under about 60 characters, no trailing period. Mark breaking changes with!before the colon:feat(api)!: remove deprecated endpoint. - Add a body only when the change is complex: 1–3 bullets for what changed, why, and optionally the impact. Small or obvious changes get the subject only.
- Add trailers the environment requires, such as a
Co-Authored-Byline, after a blank line at the end.
Output Format
When suggesting, return one copy-ready block per logical change:
type(scope): short subject
- what changed
- why
- (optional) impact or scope
When committing, use the same text as the commit message, and report each commit's SHA and subject.
Decision Rules
- Prefer
refactoroverfixwhen behavior is intended to stay the same. - Prefer
docsfor comments, READMEs, plans, and other documentation-only edits. - Prefer
styleonly for formatting or non-behavioral polish. - Prefer
chorefor maintenance that fits no other type, such as tooling, lockfiles, or board updates. - When one change truly mixes concerns that cannot be split (for example a single edited file), say it would be cleaner as separate commits, then give the best single message.
For the rationale behind these conventions, read
references/commit-message-conventions.md.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/anhtuan23/skills/commit-msg">View commit-msg on skillZs</a>