Pressure-test an assumption, decision, or inherited constraint — Socratic cross-examination that forces you to defend or abandon your position
日本語の概要は準備中です。原文の説明を表示しています。
Turn the working changes into one or more atomic commits with well-written messages. Use whenever the user runs /git-commit or asks to commit their work, wrap up a feature, or "commit what I have."
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Look at everything that has changed in the working tree, decide how the changes should be split into commits, and then create those commits — messages and all — without stopping to ask for approval. The user invoked /git-commit because they trust you to make the call, so make it and report what you did afterward.
Any argument the user passes is context, not a command: a hint about intent ("addressing review feedback", "this is risky, note the migration") that should inform how you group and what you write. It is never the literal commit message.
Before grouping anything, build a real picture of the diff. Run these together:
git status — what's modified, added, deleted, untrackedgit diff — unstaged changesgit diff --staged — anything already stagedgit log --oneline -15 — recent history, to match the tone and see referenced issues/PRsRead the diff to understand the why, not just the what. You are about to explain these changes to a future reader; you can't do that if you only know which lines moved. If something is genuinely unclear, it's fine to ask one focused question — but usually the diff plus recent history tells the story.
If there's nothing to commit, say so and stop. Never create an empty commit.
The goal is atomic commits: each commit is one complete, coherent change that stands on its own. The hard part is knowing how many commits that means, and there's no mechanical rule — it depends on what the work actually is.
Lean toward a single commit when the changes tell one story. If the user just built a feature — new model, its migration, the controller, the view, the tests — that's one logical change even though it spans many files. Splitting it into "add migration", "add model", "add tests" produces commits that are individually broken and useless to revert. Keep it together.
Split into separate commits when the changes are genuinely independent. The tell is that the work is a set of unrelated things rather than one thing:
Ask yourself: if someone had to revert one part of this, would the rest still make sense? If yes, they're separate commits. If reverting one piece would leave the others broken, they belong together.
When in doubt, prefer fewer, larger commits over many tiny ones. An over-split history is harder to read than a cohesive one.
Commit the groups one at a time. For each:
git add <paths> for just those files.git apply --cached <patch>, since interactive git add -p isn't available to you. Verify with git diff --staged before committing.git add . or git add -A blindly — that defeats the point of grouping.Then commit that group (Step 4), and move to the next.
Respect any pre-commit hooks. If a hook modifies files or fails, don't fight it — surface what happened. Don't use --no-verify unless the user asked for it.
Do not push, and do not amend or rewrite existing commits. This command's job ends at creating new commits from uncommitted work.
Match the voice below and let the body earn its place — a message exists so a future reader understands a decision they couldn't reconstruct from the diff.
TopSecret::Text::GlobalMapping"(#123) PR-number suffixes — those are added by GitHub on merge, not by handInclude a body whenever there's a why worth recording, which is most of the time. Skip it only for changes so self-evident the subject says everything ("Fix typo in README"). When you write one:
gh pr view if a PR exists) or the user named it. Never invent or guess a number. Use reference-style markdown links, matching the examples.Attribute the commit to Claude with a Co-Authored-By trailer on its own line, after a blank line:
Co-Authored-By: Claude <noreply@anthropic.com>
Use whatever trailer this Claude Code session normally appends. It often names the specific model, and that name changes from one model and version to the next (for example Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> or Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>). Credit the model you're actually running rather than copying a fixed version from these examples — the point is to attribute the commit to Claude, not to assert one exact build.
This is attribution metadata and is expected — it is not the "AI-generated writing" the next section warns about.
Write the way the user writes. The prose should read like a careful engineer explaining a decision to a teammate — never like a language model. Concretely, strip the tells of AI-generated writing:
Reach for the framings the user actually uses:
Example 1 — a cohesive feature, one commit:
Introduce `TopSecret::Text.scan`
There are cases where callers want to know whether text contains
sensitive information without filtering it. `scan` answers that
question and returns the mapping it found.
`filter` now uses `scan` internally, which is a small speed-up: we
skip the filtering work entirely when the input has nothing sensitive
in it.
Relates to the discussion in #50.
Co-Authored-By: Claude <noreply@anthropic.com>
Example 2 — a risk worth flagging:
Cache `Mitie::NER`
Initializing `Mitie::NER` is expensive, so we cache it behind a Mutex
to keep it thread-safe.
We tried the simpler approach of memoizing without a lock (#85), but
it breaks when assets are precompiled at deploy time: the model file
doesn't exist yet, so the first cache write fails. The Mutex version
was tested in a production-like environment — the first request is
slow, every request after is fast.
Co-Authored-By: Claude <noreply@anthropic.com>
Example 3 — trivial change, subject only:
Fix typo in installation instructions
Co-Authored-By: Claude <noreply@anthropic.com>
After committing, show the user the result — git log --oneline of the new commits is usually enough — so they can see how you grouped and worded things. If you made a judgment call worth knowing about ("I split the bug fix out from the feature"), say so in a sentence.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Pressure-test an assumption, decision, or inherited constraint — Socratic cross-examination that forces you to defend or abandon your position
日本語の概要は準備中です。原文の説明を表示しています。
Explain what a piece of code does — a specific file, class, or method in close detail, or a user-facing flow as a concise system overview. What it does and why, not whether it's good.
日本語の概要は準備中です。原文の説明を表示しています。
Take one new feature slice from idea to reviewed, committed code in a single guided pass — scope it into the smallest shippable slice, build it test-first with strict TDD, review and fix the diff, then commit it. Chains slice → test-driven-development → the built-in /code-review → git-commit. Not for reviewing an existing PR, upgrades, or open-ended design questions.
日本語の概要は準備中です。原文の説明を表示しています。
Prepare to deliver difficult technical news to a client — a conversational prep session before the hard conversation happens
日本語の概要は準備中です。原文の説明を表示しています。
Walk through the Designer/Developer wrap-up checklist for offboarding a client engagement — conversationally, one item at a time.
日本語の概要は準備中です。原文の説明を表示しています。
Discover how a codebase already handles a specific concern — search broadly, find every instance, and assess consistency. The "how does this app do X?" tool.
日本語の概要は準備中です。原文の説明を表示しています。