About conventional-commits
A skill for creating Conventional Commit messages and pull request titles. It guides developers through staging, commit boundaries, message formatting, and optional validation with `cog verify`.
Key features
- 01Formats commits and PR titles
- 02Lists allowed commit types
- 03Guides change staging and boundaries
- 04Specifies subject and footer rules
- 05Includes `cog verify` checks
Use cases
- 01Write a consistent commit message
- 02Prepare a Conventional Commit PR title
- 03Stage mixed changes for separate commits
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ marcioaltoe/ skills --skill conventional-commitsAfter installing, type/conventional-commitsin Claude Code to confirm it loaded.
Bundled filesreferences/commit-message-template.md
Details
From the project READMEConventional Commits
Create commits and PR titles that are easy to review and pass cog verify.
Required format
Use Conventional Commits:
type(scope): imperative subject
The scope is optional:
fix: handle empty setup files
feat(setups): add rust CLI preset
docs(readme): clarify setup install commands
Allowed types
feat- user-facing feature or capabilityfix- bug fixrefactor- code change without behavior changedocs- documentation onlytest- tests onlychore- maintenance without runtime behavior changebuild- build tooling, dependencies, or packagingci- CI workflow changesperf- performance improvementstyle- formatting only, not visual UI changesrevert- revert a previous change
Subject rules
- Use imperative mood:
add,fix,remove,rename; notadded,fixed,removes. - Start lowercase after the colon.
- Do not end with a period.
- Keep the first line under 72 characters when possible.
- Describe the intent, not the file names.
Commit workflow
-
Inspect the working tree:
git status --shortgit diff --statgit diff
-
Decide commit boundaries.
- Split unrelated changes into separate commits.
- Split behavior, tests, docs, formatting, dependencies, and generated files when they are reviewable separately.
- If one file has mixed changes, use patch staging.
-
Stage only intended changes.
- Use
git add <path>for clean file boundaries. - Use
git add -pfor mixed hunks. - Review staged content with
git diff --cached.
- Use
-
Write the message.
- Choose the type from the allowed list.
- Add a scope when it helps review, usually the package, module, collection, or feature.
- Add a body only when the reason is not obvious.
- Use footers for
BREAKING CHANGE:,Refs #123, orCloses #123.
-
Validate when Cocogitto is available.
cog verify "$(git log -1 --pretty=%B)"- For a proposed title:
cog verify "$PR_TITLE"
-
Run the smallest relevant verification before committing, or use the repo's required verification command when one exists.
PR title rules
Pull request titles must also use Conventional Commits because squash merge often uses the PR title as the final commit message.
Before opening or editing a PR:
PR_TITLE='feat(setups): add Go CLI preset'
cog verify "$PR_TITLE"
If cog is not installed, still write the title in the exact Conventional Commit format and expect CI to validate it.
Examples
Good:
feat(auth): add token refresh flow
Good with body:
fix(cli): handle empty setup files
The installer previously treated an empty setup file as a successful install.
This now fails early with a clear error.
Bad:
update files
Bad:
fix: change setup line 42
Output
When asked to commit, report:
- commit boundaries chosen
- staged files for each commit
- final commit message
- verification command and result