Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when you want to replace a single large commit on the current branch, in place, with a sequence of small review-sized commits, each of which passes CI on its own. Every commit is 100% pure in its Conventional Commits type (refactor means zero behavior change). Automatically creates a timestamped backup branch before rewriting, and fully preserves the original commit's author, dates, and tree. Descendant commits are restacked automatically. Triggers: "split this commit", "break this commit in
.claude/skills/gipcompany-carve-it/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 209% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 65% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 197% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 136% | 0% |
Split a single commit on the current branch into multiple small commits, each sized so it can be reasonably evaluated in a single review pass, and rewrite the current branch's history in place to minimize reviewer cognitive load and missed defects. The pre-rewrite state is preserved in a timestamped backup branch.
/carve-it <commit-hash><commit-hash>: the commit to split (required; short form, full form, or relative specs such as HEAD~2 are accepted). Must exist on the current branch.Verify the following and abort if any check fails:
git merge-base --is-ancestor <commit> HEAD).<commit>..HEAD range.Pushed-commit check: if the target commit is already reachable from the upstream (e.g. origin/<branch>), warn that "after the rewrite, git push --force-with-lease will be required; if this is a shared branch, it will affect others", and obtain explicit confirmation before continuing.
After validation passes, collect and present:
<commit>..HEAD (to be restacked in Phase 4; if none, state explicitly that "the target is HEAD")Design a commit sequence that minimizes review cost. The number of commits varies with the size of the change (a few for small changes; 10-20 or more for large ones).
Split principles (in priority order):
Order commits from depended-upon to dependent.
For the green-constraint corollaries (when test-only commits are allowed), the full type-purity rules with worked violation examples (guards, changed constants, new I/O, error-policy changes), and the entanglement decision flow (refactor-first vs. combine-into-one), see references/purity-examples.md.
Design fields for each commit: commit number (3-digit zero-padded, starting at 001), target files (for files split across multiple commits, also the policy for intermediate states), added/deleted line counts, behavior (preserved/changed), estimated review load (low/medium/high), commit message (<type>: <short summary> plus body).
Type-vs-behavior consistency check (required before presenting): refactor/style/test/docs/chore/build/ci → preserved; feat/fix/perf → changed. If even one row is inconsistent, do not present the plan; redesign it.
Present the plan using the fill-in template in assets/plan-template.md — the approval block to render verbatim (with the {{...}} placeholders filled), the commit-message conventions for each subject, and how to handle the yes / no / adjust response. Do not proceed to execution (Phase 3 onward) until approval is given.
First create the backup branch (no checkout round-trip). Run the helper, which stamps the timestamp, refuses to overwrite an existing ref, and prints the created ref name for the completion report:
scripts/backup.sh <branch>This creates backup/<branch>/<YYYYMMDD-HHMMSS> pointing at the current tip.
Check out the target commit's parent as a detached HEAD and stack each commit on top of it in plan order. Show progress in the form ✓ [n/total] ....
Stage changes in only the following two ways (no patch application):
git checkout <target> -- <file> (use git rm for deletions).After staging, commit always carrying over the author and dates from the original commit.
For commits declared behavior-preserving (refactor/style/test/docs/chore/build/ci), read the diff and inspect for signs of behavior change: added/removed/changed conditionals / changed constant or literal values / new external calls or I/O / changed error-handling policy / changed meaning of public APIs. On detection, stop immediately and present remediation options (re-split with refactor-first, or move the change into the behavior-changing commit), deferring the decision to the user. See references/purity-examples.md for the concrete patterns to look for.
Confirm that the commit alone is green with a minimal run, and stop immediately on failure (never stack further commits on a red base). Do not run the full suite or the whole repository; fix the scope to these two rules:
scripts/verify-tree.sh <target> <constructed-tip> (exit 0 = identical trees; exit 1 = mismatch with a diff summary; it compares ^{tree} values via git rev-parse). If they match, the result is byte-for-byte identical, so if the original commit was green the final commit is green too (no full test/lint needed). If they differ, some diff was dropped or duplicated; present the mismatch and abort (switchover has not happened yet, so the branch is untouched — git switch <branch> returns to it). For the typical causes of a mismatch and how to diagnose each path, see references/troubleshooting.md.<commit>..HEAD oldest-first (--allow-empty to preserve empty commits; cherry-pick carries over author and dates). Because of tree equivalence, conflicts cannot occur in principle. If one does occur, it signals a dropped change, so abort (do not resolve it by hand; git cherry-pick --abort then re-examine — see references/troubleshooting.md).git branch -f <branch> <new-tip> → git switch <branch>.Present the following:
git log --oneline / git show)scripts/restore.sh --run <branch> auto-detects the latest backup; or manually git reset --hard backup/<branch>/<ts>), and the deletion command for when it is no longer needed (git branch -D backup/<branch>/<ts>)git push --force-with-lease is requiredgh-stack skill. Settle push state first — if the target was already pushed, run the git push --force-with-lease above before stacking; if it was never pushed, gh-stack can create and push the per-commit branches itself.git switch <branch> to return (construction runs on a detached HEAD). This is why the skill deliberately has no automatic-rollback mechanism: until switchover there is nothing to roll back.scripts/restore.sh --run <branch> (auto-detects the latest backup) or git reset --hard backup/<branch>/<ts>.For symptom-driven recovery — tree-equivalence mismatch, an interrupted detached-HEAD construction, a cherry-pick conflict during restack, a failed/empty restore — see references/troubleshooting.md.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | pass→pass | 8,899 | 5,840 | -34% | 1 | 1 | 0% | 1,543 | 3,487 | +126% | 0 | 0 | — |
case-01 | fail→fail | 13,283 | 3,201 | -76% | 1 | 1 | 0% | 2,596 | 2,914 | +12% | 0 | 0 | — |
case-02 | fail→fail | 5,554 | 5,512 | -1% | 1 | 1 | 0% | 352 | 2,850 | +710% | 0 | 0 | — |
case-08 | pass→pass | 11,375 | 3,643 | -68% | 1 | 1 | 0% | 1,794 | 3,127 | +74% | 0 | 0 | — |
case-03 | fail→fail | 3,186 | 6,073 | +91% | 1 | 1 | 0% | 445 | 2,913 | +555% | 0 | 0 | — |
case-04 | pass→pass | 7,757 | 2,847 | -63% | 1 | 1 | 0% | 1,286 | 2,938 | +128% | 0 | 0 | — |
case-05 | fail→pass | 7,933 | 11,372 | +43% | 1 | 1 | 0% | 1,490 | 4,605 | +209% | 0 | 0 | — |
case-06 | fail→pass | 12,859 | 15,625 | +22% | 1 | 1 | 0% | 2,287 | 3,772 | +65% | 0 | 0 | — |
case-09 | fail→pass | 6,557 | 4,836 | -26% | 1 | 1 | 0% | 1,136 | 3,374 | +197% | 0 | 0 | — |
case-10 | fail→pass | 8,031 | 3,829 | -52% | 1 | 1 | 0% | 1,396 | 3,138 | +125% | 0 | 0 | — |
case-11 | pass→pass | 5,722 | 3,008 | -47% | 1 | 1 | 0% | 1,016 | 2,989 | +194% | 0 | 0 | — |
case-12 | pass→pass | 7,200 | 4,636 | -36% | 1 | 1 | 0% | 1,163 | 3,381 | +191% | 0 | 0 | — |
case-13 | fail→pass | 8,385 | 6,788 | -19% | 1 | 1 | 0% | 1,599 | 3,769 | +136% | 0 | 0 | — |
case-14 | fail→pass | 9,155 | 4,033 | -56% | 1 | 1 | 0% | 1,655 | 3,271 | +98% | 0 | 0 | — |
case-15 | pass→pass | 6,022 | 4,461 | -26% | 1 | 1 | 0% | 979 | 3,229 | +230% | 0 | 0 | — |
case-16 | pass→pass | 10,180 | 7,014 | -31% | 1 | 1 | 0% | 1,628 | 3,731 | +129% | 0 | 0 | — |
case-17 | pass→pass | 9,178 | 3,115 | -66% | 1 | 1 | 0% | 1,569 | 3,017 | +92% | 0 | 0 | — |
case-18 | fail→pass | 10,461 | 2,936 | -72% | 1 | 1 | 0% | 1,818 | 2,947 | +62% | 0 | 0 | — |
case-19 | fail→pass | 10,272 | 1,939 | -81% | 1 | 1 | 0% | 1,865 | 2,804 | +50% | 0 | 0 | — |
case-20 | pass→pass | 8,239 | 9,377 | +14% | 1 | 1 | 0% | 1,546 | 4,249 | +175% | 0 | 0 | — |
case-21 | pass→pass | 11,124 | 8,083 | -27% | 1 | 1 | 0% | 2,207 | 4,077 | +85% | 0 | 0 | — |
case-22 | pass→pass | 8,897 | 5,913 | -34% | 1 | 1 | 0% | 1,701 | 3,592 | +111% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.