From kanso
Use when the user asks to commit changes, stage their work, write commit messages, or split the working tree into logical commits.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kanso:kanso-commit [optional: scope hint or message style][optional: scope hint or message style]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Splits the working tree into logically atomic commits and writes messages that answer *why* rather than *what*. Detects and matches the repo's existing convention.
Splits the working tree into logically atomic commits and writes messages that answer why rather than what. Detects and matches the repo's existing convention.
The principles from kanso-principles apply. Messages earn their place the same way code does.
An atomic commit is one logical change. Not one line, not one file — one thought. The test: can the commit be described in a single short imperative sentence without using "and"?
Each atomic commit must be:
Over-atomising is a real failure mode. A three-line bug fix does not need three commits.
!git status --short and !git diff --stat to see what's staged and unstaged.!git log -n 30 --oneline and read 3-5 recent commits in full. The repo's existing style wins over any default.commitlint.config.*, .commitlintrc*, cz-config*, package.json scripts mentioning commit. These hard-constrain the format.The repo's commit history dictates the format. In priority order:
feat:, fix:, chore:) → match it.[Component] subject, subsystem: subject, Fixed #NNNNN --) → match it exactly. Don't modernise.Don't impose a new convention onto an existing repo. If the history is messy, match the least-bad recent pattern rather than inventing a new one.
Django uses past tense (Fixed #NNNNN --). Linux kernel uses subsystem: summary. React uses [Component] description. All valid. All match-what's-there.
If multiple logical changes are staged or unstaged together:
README.md, a new getUser endpoint in src/api/user.ts, and a refactor of the auth middleware. Split into three commits?"git add -p or git add <file> to stage each unit. Never bulk-stage with git add . when splitting.If the working tree is a single logical change, stage and commit directly.
Imperative test: "If applied, this commit will _____". Fill the blank with the subject. If it doesn't grammatically fit, rewrite.
Body is optional for trivial changes (typo, formatting, rename of a local variable). Required for:
Good body content:
Bad body content:
If the change breaks an API:
feat(api)!: remove deprecated endpoint + BREAKING CHANGE: footerAlways explain the migration path in the body.
Fixes: #NNN or Closes: #NNN — link to issue trackersCo-authored-by: — when pairing or when the user names collaboratorsSigned-off-by: — if the repo uses DCO (check for .gitsignoff or CONTRIBUTING notes)Don't invent trailers the repo doesn't use. Don't add Co-authored-by: Claude or any AI attribution unless the user explicitly asks for it.
The message must answer what the diff cannot:
If the user hasn't explained any of this, ask before committing. A good commit message cannot be generated from the diff alone. AI-generated messages are consistently weak on why because why lives outside the code.
!git status --short and !git diff --stat.git log -n <N> --oneline for what was committed.Before any commit, show:
Proposed commit 1 of 2:
fix(auth): reject tokens older than 24h
The previous implementation only checked the signature, not the
issuance time, allowing replay attacks with captured tokens.
The 24h window matches the session timeout in src/config/auth.ts.
Fixes: #312
Files: src/auth/verify.ts, src/auth/verify.test.ts
Approve? (y/n/edit)
Wait for the user's approval before running git commit.
git add . when splits were warranted.Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub blakecyze/kanso --plugin kanso