About commit
A skill for composing Conventional Commits from a Git diff. It guides developers through classifying changes, writing commit messages, and committing without bypassing checks.
Key features
- 01Inspect staged or unstaged changes
- 02Classify type, scope, and description
- 03Add explanatory body and issue footer
- 04Handle breaking changes
- 05Check for secrets before committing
Use cases
- 01Prepare a commit message from a completed change
- 02Separate unrelated changes into commits
- 03Document an issue reference or breaking change
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ angusfretwell/ skills --skill commitAfter installing, type/commitin Claude Code to confirm it loaded.
Details
From the project READMEWrite every commit in Conventional Commits format: <type>(scope): <description>, then an optional body and footer.
Steps
- Read the diff. Run
git statusandgit diff --staged(fall back togit diffwhen nothing is staged). - Classify. Choose the
type(feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert), thescope(the affected area, omitted when the change is broad), and adescription— one imperative-mood line under 72 characters. Each of the three must trace to a specific change in the diff. If the diff holds more than one unrelated change, commit them separately. - Compose. Assemble the subject line. Add a body — the why, and what a reader can't see from the diff — when the change isn't self-evident, and a footer (
Closes: <id>,Refs: <id>) when an issue applies. Signal a breaking change with!(feat(api)!: require verified email), or aBREAKING CHANGE:footer when the break needs explaining. - Commit. Stage the intended files — if they contain secrets or credentials, stop and flag it instead. Run
git commitand let hooks run; if one fails, fix the cause or report it.
Rewriting shared history or bypassing checks — --force, reset --hard, --no-verify, git config edits — happens only when the user explicitly asks.
Comments
Markdown supported