skills/src/commit/SKILL.md
Creates meaningful git commits by analyzing changes and committing in logical units. Use when the user wants to commit changes to git, requests commit creation, or asks to save changes to version control. Supports --english and --japanese for commit language selection and --branch to create a new branch before committing.
npx skillsauth add shuymn/dotfiles 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.
<skill-root> means the directory containing this SKILL.md.scripts/... and references/... relative to <skill-root>, not the caller's current working directory.<skill-root>/scripts/....git push — this skill creates local commits only.create-pr skill.This skill runs only via /commit. Never create commits automatically or as part of another task.
Every commit represents exactly one meaningful unit of change. Bundling unrelated changes makes reverts dangerous (reverting one fix undoes an unrelated feature), makes code review noisy, and makes git bisect useless. A meaningful unit:
For examples of good/bad groupings and common scenarios, see examples.md.
git status --shortgit branch --show-currentgit log --oneline -10git diff --statgit diff --cached --statAlways verify actual git state with live commands — cached snapshots from skill context may be stale.
--english: Creates commit messages with English types and English descriptions:
<type>(<scope>): <english description> or <type>: <english description>feat(auth): add OAuth2 loginfix(api): handle null user responsesfeat: centralize request validation--japanese: Creates commit messages with English types and optional scope plus Japanese descriptions:
<type>(<scope>): <日本語の説明> or <type>: <日本語の説明>feat(auth): OAuth2ログインを追加fix(api): ユーザーエンドポイントのnull処理を修正feat: 入力検証を一元化Default when neither --english nor --japanese is set:
git log --format='%s' -10--branch: Creates a new branch before committing:
--branch is specified, branch creation is mandatory — skipping it defeats the purpose of the flaggit switch -c <branch-name>--base=<branch> to specify a different base branch/commit --branch → Auto-generates name like feature/add-oauth-support/commit --branch --base=main → Create from main branch/commit --branch --base=develop → Create from develop branchTypes:
feat: New featurefix: Bug fixdocs: Documentationstyle: Code stylerefactor: Refactoringperf: Performancetest: Testschore: Maintenancebuild: Build systemci: CI changesRules:
fix bug, not Fix bug)and as a red flag; reconsider split or rewrite before committype(scope): subject and type: subjectscope is optional, but when present it must name exactly one areafeat(mysql,cli,testkit): ...type: subjectgit diff — identify every logical unit before making any commits
git status--english: use English descriptions--japanese: use Japanese descriptionsgit add <specific-files>git diff --cached — ensure only one logical change is stagedand: stop and reconsider split or wording before commitgit commit -m "<type>(<scope>): description" or git commit -m "<type>: description"git log --oneline -1git diff — identify every logical unit and determine primary changegit status--english: use English descriptions--japanese: use Japanese descriptions<type>/<descriptive-name>feature/add-oauth-support, fix/handle-null-values, refactor/extract-validation--base specified): git switch <base-branch>git switch -c <branch-name>git add <specific-files>git diff --cached — ensure only one logical change is stagedand: stop and reconsider split or wording before commitgit commit -m "<type>(<scope>): description" or git commit -m "<type>: description"git log --oneline -1When a file contains multiple logical changes, use the patch-based approach. See examples.md for the full procedure.
Before git commit, validate the drafted subject mechanically:
printf '%s' 'feat: centralize request validation' | wc -c
printf '%s\n' 'feat: centralize request validation' | rg -n '\band\b'
wc -c exceeds 50: rewrite before committingrg matches and in an English subject: treat it as a forced reconsideration pointprintf and wc as separate tool argumentsandTo prevent accidental data loss, the following are NOT allowed while splitting changes into logical commits:
git restore ... commandgit reset ... commandgit checkout -- ... command (or git checkout -f)git switch --discard-changes ... commandgit clean ... command (e.g. git clean -fd, git clean -fdx)If these commands seem necessary, pause and ask the user for explicit direction instead of executing them.
type: subject.type(scope): subject only when the logical unit is clearly centered on one area.When uncertain about grouping, present the changes and options to the user. Include: (1) which grouping options are under consideration, (2) how the decision affects commit count and independent revertibility. If AskUserQuestionTool is available, use it; if multiple independent grouping decisions are needed, batch them into the questions array. If AskUserQuestionTool is unavailable, ask in a single message using QID labels (Q1, Q2, ...); require QID: <answer> responses and allow QID: OTHER(<concise detail>) when no option fits. See examples.md for an example prompt.
For scenarios requiring separate commits (refactoring + feature, bug fix + test, etc.), see examples.md.
# Check length
printf '%s' "feat: centralize request validation" | wc -c
When commit messages contain @ symbols:
@import or path/@fileIf commit-msg hook fails:
If commit signing fails (for example with 1Password or other signing agents):
git config changes for signing bypass (e.g. git config commit.gpgsign false, git config --global commit.gpgsign false)--no-gpg-sign or -c commit.gpgsign=falseRed flags that indicate multiple logical changes are bundled:
andfeat(mysql,cli,testkit): ... instead of splitting commits or omitting scopedevelopment
Simplifies recently changed code by running three parallel reviews (reuse, quality, efficiency) and applying only behavior-preserving fixes. Use when the user asks to simplify, clean up, reduce duplication, improve code reuse, or optimize recently changed code, a staged diff, a branch diff, or explicitly listed files. Also use when the user says things like 'simplify this', 'まとめて整理して', 'コードをスリムにして', or invokes `/simplify`.
tools
Use when the user invokes /workflow. Injects project workflow methodology as context. Accepts argument: plan, exec, review (default: all).
development
Processes AI reviewer feedback and applies only verified fixes. Works in two modes: (1) fetches comments from a PR URL or current branch, (2) processes feedback pasted directly into the conversation. Trigger when the user wants to bulk-process or apply AI review suggestions — from a GitHub PR or pasted text. Do NOT trigger for single questions about what a bot said, or general code review discussion.
testing
Prepares .ralph/ runtime state from an approved and reviewed plan bundle. Syncs plan tasks into prd.json and updates prompt.run.md with project-specific context and quality gates. Use after plan approval, decompose-plan review PASS, and ralph init.