skills/commit/SKILL.md
Split working-tree changes into atomic git commits with conventional-commit messages. Use whenever the user asks to commit, save work, stage files, break one messy diff into multiple logical commits, or prep a branch for a PR — including terse prompts like "commit this", "ship it", or "wrap up".
npx skillsauth add johnie/skills 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.
Turn the current working tree into a set of atomic conventional-commit commits. Atomic = each commit captures one logical change that could be reverted on its own without breaking the rest.
git commit directly.git rebase, not this skill.(none) — analyze, group, and commit without confirmation-v / --verify — show plan, wait for y/n/edit--dry-run — show plan, exit without committing--amend — amend the last commit only. Implies -v because amend is irreversible once pushed.push — after committing, push to the current remote branchpush -v / push --verify — push with confirmationmain/master.git status, git diff, git diff --cached, git diff --stat (for rename detection).references/grouping-guide.md for the decision tree, scope derivation, and type disambiguation.-v/--dry-run/--amend): show plan. --dry-run exits here.git add <files> then git commit -m "<message>" (or git commit --amend for amend).push): git push origin HEAD. On failure, classify (auth / branch protection / diverged / other) and suggest a next step.Grouping happens over everything in the working tree — already-staged, unstaged-tracked, and untracked:
Use --dry-run to preview which files will end up in which commit before anything stages.
Prefer more commits over fewer. Group by (in priority order) feature → scope → type → nature. A good test: would reverting one group without the others leave the tree in a working state? If yes, that's an atomic group. If no, the groups are entangled — merge or split until each can stand alone. Intermediate commits that don't compile are a smell. Full rules and worked examples: references/grouping-guide.md, references/examples.md.
<type>(<scope>): <description>
feat (new feature) · fix (bug fix) · refactor (restructure, no behavior change) · chore (maintenance/deps/config) · docs (documentation) · test (tests) · style (formatting) · perf (performance)
feat(auth): add JWT refresh token rotation
fix(api): handle null response from payment provider
refactor(utils): extract date formatting helpers
chore: upgrade typescript to 5.4
test(cart): add edge cases for discount calculation
Hooks (ultracite, prettier, eslint, etc.) run on each git commit.
git add <paths>) and commit again. Do NOT --amend — there's no prior commit to amend, and amending silently moves changes into the wrong group.--no-verify.Short list below. Tricky ones with full handling rules live in references/grouping-guide.md and references/examples.md.
| Situation | Action |
|---|---|
| Conflicts in working tree | Abort; ask user to resolve first. |
| On main/master | Warn, require confirmation. |
| File renames | git diff --stat detects them; group rename with related import-path updates. |
| Binary files | Group with the feature that uses them. Don't try to describe binary diffs. |
| Deletions replacing code | Treat delete + new file as one logical refactor commit. |
| Empty diff after staging | Changes were already committed — stop and report. |
| --amend of a pushed commit | Refuse unless user confirms; force-push rewrites upstream history. |
User: /commit
Claude: Analyzing 7 changed files...
Grouping rationale:
- preferences route + types are one feature
- test file is a separate commit (different type)
- zod was added to validate the feature -> groups with feature
- package-lock.json always goes with package.json
feat(api): add user preferences endpoint
- src/routes/preferences.ts, src/types/preferences.ts, package.json, bun.lock
test(api): add preferences endpoint tests
- tests/preferences.test.ts
2 commits created.
User: /commit -v
Claude: Commit plan:
1. fix(auth): handle expired refresh tokens gracefully
- src/auth/refresh.ts, src/auth/errors.ts
2. chore(deps): upgrade vitest to 2.0
- package.json, bun.lock
Proceed? (y/n/edit)
--dry-run stops after the plan. --amend -v shows the current last commit + the proposed amended state. push appends Pushing to origin/<branch>... Pushed.
See references/examples.md for simple/medium/complex/anti-pattern scenarios.
/prWhen you create a PR afterwards, the /pr skill reads these commits to generate the PR title and body. Writing good, conventional commit messages here pays off there — the title reuses the primary commit's type(scope): description, and the body's What/How sections are built from the commit set.
tools
WordPress CLI operations for database management, plugins, themes, users, content, and site configuration. Use for migrations, bulk updates, user audits, content imports, or any wp-cli commands.
tools
Designs complex generic types, refactors `any` to strict alternatives, creates type guards and utility types, resolves TypeScript compiler errors, and explains type-level concepts. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing `any` types, strict typing, type errors, `infer`, `extends`, conditional types, mapped types, template literal types, branded/opaque types, `satisfies`, `unknown`, function overloads, declaration merging, strict mode, or utility types like `Partial`, `Record`, `ReturnType`, `Awaited`, and `NoInfer`.
tools
Build type-safe CLI applications with Stricli. Use when creating TypeScript CLIs with typed flags/positional args, multi-command routing, or automatic help generation. Stricli catches parameter errors at compile time. Use this whenever the user mentions CLI frameworks, command-line tools, argument parsing, or typed commands in TypeScript.
tools
Create, update, and review GitHub PRs. Commands: create [-v] [--draft], update [-v], review <number|url>. Generates structured PR bodies with conditional sections (Testing, Deployment, Screenshots). Requires gh CLI.