skills/conventional-commit/SKILL.md
Guides committing staged (indexed) git files using the Conventional Commits specification and commit message best practices. Use when user mentions commit, git commit, conventional commit, commit message, staged files, indexed files, fixup, or fixup commit. Helps craft well-structured, meaningful commit messages including fixup commits with optional autosquash.
npx skillsauth add rlespinasse/agent-skills conventional-commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are helping the user commit their currently staged (indexed) git files using the Conventional Commits specification and commit message best practices.
Before crafting a commit message, always:
git status to see what files are stagedgit diff --cached to review the actual staged changes<type>[optional scope]: <subject>
[optional body]
[optional footer(s)]
| Type | When to use |
| ------------ | ----------------------------------------------------------- |
| feat | A new feature or capability |
| fix | A bug fix |
| docs | Documentation-only changes |
| style | Formatting, whitespace, semicolons — no logic change |
| refactor | Code restructuring without behavior change |
| perf | Performance improvement |
| test | Adding or updating tests |
| build | Build system or external dependency changes |
| ci | CI/CD configuration changes |
| chore | Maintenance tasks (deps update, tooling, config) |
| revert | Reverting a previous commit |
Note: Comment-only changes (adding, updating, or removing code comments) should use style or
chore — never feat or fix. Keep commit messages concise; do not describe individual comments.
feat(auth):, fix(api-client):git log --oneline -50 or more) for scope patterns already used in the projectBREAKING CHANGE: <description> for breaking changes (triggers major version bump)Refs: #123 or Closes #456 for issue referencesCo-authored-by: Name <email> for co-authorsSigned-off-by: Name <email> when the project requires a Developer Certificate of Origin (DCO)Follow this process to determine the commit message:
Read the diff carefully and identify:
If the staged changes contain multiple unrelated changes:
package.json + package-lock.json,
go.mod + go.sum, Cargo.toml + Cargo.lock, pyproject.toml + lock files)feat (not test)fix (not refactor).github/workflows/), use ci: — not fix(ci): or feat(ci):. The same applies
to docs: (only documentation files), test: (only test files), and build: (only build config).
These types already convey the scope, so adding it as a parenthetical is redundant.git log --oneline -50 for existing scope conventionsfix(api): fixed the bug in the login endpointfix(api): return 401 on expired token instead of 500Add a body when:
When executing the commit:
git commit -m with a HEREDOC for multi-line messages--no-verify — respect pre-commit hooks--amend unless the user explicitly requests itgit status to confirm successgit commit -m "feat(auth): add JWT token refresh endpoint"
git commit -m "$(cat <<'EOF'
feat(auth): add JWT token refresh endpoint
Implement automatic token refresh when the access token expires.
The refresh endpoint validates the refresh token and issues a new
access token with a 15-minute expiry.
Closes #234
EOF
)"
feat: add dark mode toggle to settings page
fix(parser): handle empty input without panic
The YAML parser panicked on empty strings because it attempted
to access the first character without a length check. Now returns
an empty document instead.
Closes #89
feat(api)!: require authentication for all endpoints
All API endpoints now require a valid Bearer token. Previously,
read-only endpoints were publicly accessible.
BREAKING CHANGE: unauthenticated requests to /api/* now return 401.
Clients must include an Authorization header with a valid token.
Refs: #156
docs: add API rate limiting guide
refactor(db): extract connection pooling into dedicated module
Move connection pool logic from the monolithic database module into
its own module to improve testability and separation of concerns.
No behavior change.
| Anti-pattern | Why it is wrong | Better alternative |
| ------------------------------------- | ------------------------------ | ---------------------------------------- |
| fix: fix bug | Says nothing useful | fix(cart): prevent negative quantities |
| update code | Not a conventional commit | refactor(utils): simplify date parsing |
| feat: Added new feature and fixes | Past tense, vague, mixed scope | Split into separate commits |
| WIP | Not meaningful in history | Use a descriptive message or --fixup |
| misc changes | Uninformative | Describe what actually changed |
| fix: fix | Redundant and meaningless | Describe the actual fix |
| Subject longer than 72 characters | Breaks tooling and readability | Keep it concise, use body for details |
When the user indicates a change is a fixup (e.g., "this is a fixup", "fixup change", "attach to previous commit"),
the commit should be created as a fixup! commit targeting the original commit that introduced the issue.
Determine the branch boundary — before anything else, identify which commits belong to the current branch:
git log --oneline $(git merge-base HEAD origin/main)..HEAD
This is the safe rebase range. Only commits in this range may be targeted for fixup or autosquash.
Identify the target commit — search the git log for the commit that introduced the code being fixed:
git log --oneline $(git merge-base HEAD origin/main)..HEAD -- <changed-files> to find
commits on the current branch that touched the same filesmain
or before the branch point), do not create a fixup commit. Instead, inform the user and
create a normal commit with the appropriate type (e.g., fix, ci)Create the fixup commit — use git commit --fixup <target-sha>:
git commit --fixup abc1234
This produces a commit with the message fixup! <original subject>.
Ask the user if they want to autosquash — after the fixup commit is created, ask:
"Fixup commit created. Do you want to autosquash it into the target commit now (
git rebase --autosquash)?"
If the user accepts, run the interactive rebase with autosquash scoped to the branch:
GIT_SEQUENCE_EDITOR=true git rebase --autosquash $(git merge-base HEAD origin/main)
Using GIT_SEQUENCE_EDITOR=true auto-confirms the rebase editor so it runs non-interactively.
Never rebase beyond the merge-base — this would rewrite commits shared with main.
If the user declines, leave the fixup commit as-is — it will be squashed during a future rebase.
# Original commit:
a1b2c3d feat(auth): add OAuth2 login flow
# Fixup commit (auto-generated message):
fixup! feat(auth): add OAuth2 login flow
development
Ensures all project content is written in proper French with correct accents, grammar, and typography. Use when user mentions french, français, langue française, accents, orthographe, typographie, or when working on a project that requires French language content. Also use when generating any text-based file (SVG, Mermaid, PlantUML, Draw.io, HTML, CSV, JSON, YAML, etc.) in a French-language project. Helps enforce French writing conventions across all file types.
development
Verifies that features listed in a README (or similar documentation) are actually implemented in the codebase. Use when user mentions verify features, check feature list, confirm README, validate documentation claims, or audit feature accuracy. Helps catch stale, missing, or inaccurate feature descriptions.
development
Checks GitHub Actions CI logs on a pull request, diagnoses failures, and guides the agent to implement fixes. Use when user mentions CI failing, check PR logs, fix pipeline, GitHub Actions errors, workflow failures, build broken, tests failing on PR, or debug CI. Focuses on PR-scoped CI analysis only.
testing
Migrates GitHub Actions workflows to use pinned commit SHAs instead of tags, resolves the latest release versions, flags major version jumps, and configures Dependabot with grouped updates. Use when user mentions pin actions, pinned versions, SHA pinning, GitHub Actions security, dependabot setup, or supply-chain security.