Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by automated fixes. Use when the user asks to "simplify code", "review changed code", "check for code reuse", "review code quality", "review efficiency", "simplify changes", "clean up code", "refactor changes", or "run simplify".
.claude/skills/tobihagemann-simplify-code/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 72% | 0% |
| case-05 | ✓→✗ | ▼ Worse | -3% | 0% |
| case-06 | ✓→✗ | ▼ Worse | 44% | 0% |
| case-10 | ✓→✗ | ▼ Worse | 73% | 0% |
| case-11 | ✓→✗ | ▼ Worse | 57% | 0% |
Review code for scope, reuse, quality, efficiency, clarity, and altitude issues, then fix them.
Determine what to review:
git diff --cached), use that.git diff, git diff --cached, git diff HEAD) based on the current git state. When the branch is an open pull request, resolve its base with gh pr view --json baseRefName --jq '.baseRefName', run git fetch origin <base-branch>, and diff against origin/<base-branch>...HEAD: a local branch of the same name can sit behind the remote, which puts the merge base before an already-merged pull request and pulls merged work into the scope. If there are no git changes, review the most recently modified files mentioned in the conversation.State the resolved file list before launching the agents: add --name-only to a diff command, or list the files for a file or directory scope.
Launch all six agents below with spawn_agent / wait_agent using inherited model defaults, issuing every call in one batch. Do not issue one and await its result before issuing the rest. Pass the scope from Step 1 to each agent. Every sub-agent's prompt must direct it to treat the shared working tree and its git index as read-only and to reach its findings by reading and reasoning; fixes happen in Step 3. HEAD stays where it is: read other refs with git show <ref>:<path> rather than git checkout or git switch.
Confine the sub-agent's prompt to what to review, plus the conventions and factual properties that bear on it. Pass a property of the existing code as a fact the sub-agent weighs, such as "the retry loop guards a dependency known to fail intermittently". Leave out any statement that tells the sub-agent what verdict to reach about that property, such as "the duplication here is intentional for readability, judge against that", because it binds the sub-agent to accept the very property the review exists to assess.
Review the changes for code that should not exist:
Trace the callers of any code proposed for deletion and confirm nothing depends on the behavior being removed. Input validation at trust boundaries, error handling that prevents data loss, security controls, accessibility affordances, and anything the request explicitly asked for outrank the three checks above.
For each change:
Review the same changes for hacky patterns:
Review the same changes for efficiency:
Review the same changes for clarity, standards, and balance:
AGENTS.override.md when one is present, otherwise its AGENTS.md — a directory's file governs only the files at or below it, and an override replaces that directory's AGENTS.md rather than adding to it. Flag a violation only when you can quote the exact rule and cite what breaks it: the offending line, or the location where a required element is missing. Name the file the rule came froma ? x : b ? y : ..., nested if/else, or nested switch — flatten with early returns, guard clauses, a lookup table, or an if/else-if cascade), redundant boolean comparisons (e.g., x == true instead of x)Review the same changes for whether each is implemented at the right depth:
Wait for all six agents to complete. Aggregate their findings, then apply each fix directly, skipping only findings that are wrong. When a deletion recommendation and a refactor recommendation land on the same code, the deletion wins.
A finding that would revise an interface or shape the user already approved is not a false positive. Output its technical detail as text, then use request_user_input to let the user decide, naming what the revision would change and what reversing the earlier decision costs. Place the genuinely best option first and append (Recommended) to its label, judging "best" on technical merit alone, independent of how closely it conforms to the earlier decision. When merit cannot settle it, say so instead of forcing a pick. Present the consultation option in place of Note for later, keeping the question at three options:
$consult-claude skill for the soundest shape on technical merit alone, independent of the earlier decision, carrying back what changing it costs. Then apply, keep, or note the finding with that answer in handA freeform answer asking to record the finding without changing the code runs the $note-improvement skill to capture it.
Once this round's fixes have landed, including any resolved at a gate, make one pass over the agents' findings: any whose verdict depended on code the fixes changed, moved, added, or deleted gets decided again against the current tree, keeping resolutions the user already chose.
Report the outcome as a table, one row per finding, keeping every cell to a single line:
| File | Finding | Outcome | |------|---------|---------|
Where Outcome is one of:
Keep the report to the table. Add prose only where an escalation's resolution changed what the other fixes look like. When the table would be empty, report one line stating the code was already clean instead.
Then call update_plan to mark this step completed and continue with the next step of the active workflow.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 5,370 | 4,755 | -11% | 1 | 1 | 0% | 286 | 2,534 | +786% | 0 | 0 | — |
case-02 | fail→fail | 4,821 | 3,586 | -26% | 1 | 1 | 0% | 257 | 2,435 | +847% | 0 | 0 | — |
case-03 | fail→fail | 5,933 | 4,219 | -29% | 1 | 1 | 0% | 337 | 2,488 | +638% | 0 | 0 | — |
case-04 | pass→pass | 9,268 | 10,078 | +9% | 1 | 1 | 0% | 1,522 | 3,988 | +162% | 0 | 0 | — |
case-05 | pass→fail | 15,794 | 6,325 | -60% | 1 | 1 | 0% | 2,648 | 2,581 | -3% | 0 | 0 | — |
case-06 | pass→fail | 13,635 | 8,604 | -37% | 1 | 1 | 0% | 2,041 | 2,934 | +44% | 0 | 0 | — |
case-07 | pass→pass | 6,158 | 1,890 | -69% | 1 | 1 | 0% | 929 | 2,465 | +165% | 0 | 0 | — |
case-08 | pass→pass | 5,872 | 2,061 | -65% | 1 | 1 | 0% | 969 | 2,531 | +161% | 0 | 0 | — |
case-09 | fail→pass | 11,200 | 3,568 | -68% | 1 | 1 | 0% | 1,660 | 2,863 | +72% | 0 | 0 | — |
case-10 | pass→fail | 8,867 | 5,099 | -42% | 1 | 1 | 0% | 1,466 | 2,538 | +73% | 0 | 0 | — |
case-11 | pass→fail | 9,185 | 6,209 | -32% | 1 | 1 | 0% | 1,619 | 2,543 | +57% | 0 | 0 | — |
case-12 | pass→pass | 13,009 | 17,589 | +35% | 1 | 1 | 0% | 1,876 | 4,853 | +159% | 0 | 0 | — |
case-13 | pass→fail | 10,760 | 7,517 | -30% | 1 | 1 | 0% | 1,766 | 2,709 | +53% | 0 | 0 | — |
case-14 | pass→fail | 8,144 | 5,529 | -32% | 1 | 1 | 0% | 1,332 | 2,531 | +90% | 0 | 0 | — |
case-15 | fail→fail | 9,460 | 1,562 | -83% | 1 | 1 | 0% | 1,424 | 2,439 | +71% | 0 | 0 | — |
case-16 | fail→fail | 8,380 | 1,584 | -81% | 1 | 1 | 0% | 1,308 | 2,452 | +87% | 0 | 0 | — |
case-17 | pass→pass | 14,770 | 3,274 | -78% | 1 | 1 | 0% | 2,420 | 2,764 | +14% | 0 | 0 | — |
case-18 | fail→fail | 13,022 | 2,116 | -84% | 1 | 1 | 0% | 1,960 | 2,504 | +28% | 0 | 0 | — |
case-19 | pass→pass | 6,431 | 2,144 | -67% | 1 | 1 | 0% | 1,025 | 2,514 | +145% | 0 | 0 | — |
case-20 | pass→fail | 3,418 | 7,294 | +113% | 1 | 1 | 0% | 496 | 2,735 | +451% | 0 | 0 | — |
case-21 | pass→fail | 19,731 | 5,588 | -72% | 1 | 1 | 0% | 4,206 | 2,506 | -40% | 0 | 0 | — |
case-22 | pass→fail | 4,355 | 4,847 | +11% | 1 | 1 | 0% | 814 | 2,395 | +194% | 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 10 counted toward the lift figure. The other 12 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 10 comparable cases. 9 cases got worse with the skill loaded, and they are 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.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/21/2026 | -36% |
Other measured skills in the registry, with their headline benchmark lift.