/turbo:simplify-codefrom Turbo
Reviews code changes for scope, reuse, quality, efficiency, clarity, and altitude issues, then fixes them. Activated by 'simplify code', 'clean up code', or 'run simplify'.
Ships in Turbo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
Before emitting the Agent calls, mint one tag per agent with head -c 4 /dev/urandom | xxd -p, and build from it two absolute paths in the session scratchpad directory for that agent's prompt: its findings file, named for its review followed by the tag and .md, and its checkout copy, named the same way with -checkout in place of .md. Emit all six Agent tool calls below in one assistant message. Each Agent call uses model: "opus" and no name. Wait for every agent to report before continuing. Do not begin the next step on a partial set, and do not relaunch an agent that has not yet reported. Pass the scope from Step 1 to each agent. Every agent's prompt must direct it to omit name on any Agent tool call it makes itself. Every agent's prompt must also 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. Every agent's prompt must also direct it to search the repository with a tool that skips gitignored files, such as git grep --untracked or the Grep tool, and to open or search a gitignored path only when its prompt or a file its prompt directs it to read names it, or when a dependency's installed source is needed to verify a claim, never one holding local configuration or credentials. For an empirical check that verifies a finding, the agent works in a copy of the checkout created at the copy path its prompt names. Refer to that copy by absolute path in every command and join chained steps with &&, so a failed step cannot leave the rest running in the shared checkout. Give that copy its own dependency install rather than reaching the shared tree's install by any route. When its own install is not possible, the check is left unrun and reported as such. Every server the agent starts, such as a daemon, a terminal multiplexer, or a database, runs on an address picked for this check alone, such as a socket path, socket name, or port, and confirmed free before the server starts. Every command that reaches that server, its shutdown included, names that address explicitly rather than leaving it to a default or an environment variable, and the agent stops the server before deleting the copy or anything else its address depends on. Before reporting, the agent deletes that copy, its dependency install included, as a command of its own, and confirms the path no longer exists. A copy it could not delete is named by path in its report. HEAD stays where it is: read other refs with git show <ref>:<path> rather than git checkout or git switch. Direct each agent to write its full findings to the findings path its prompt names, and to return that path with its report, so a compaction before Step 3 leaves the findings recoverable.
Confine the 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 agent weighs, such as "the retry loop guards a dependency known to fail intermittently". Leave out any statement that tells the agent what verdict to reach about that property, such as "the duplication here is intentional for readability, judge against that", because it binds the agent to accept the very property the review exists to assess.
Review the changes for code that should not exist:
V2 or New. Recommend migrating the callers and deleting the old version.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 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:
CLAUDE.md and any file those instructions import — a directory's file governs only the files at or below 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:
Aggregate the agents' findings, reading each agent's findings file at the path it returned when its report is no longer in context. Delete any copy of the checkout an agent named as left behind, and name in the outcome report one that still remains. Then apply each fix directly, skipping only findings that are wrong. A finding that the code weakens a security default or a permission check, or fails open where it should fail closed, counts as wrong only when the code refutes it. When it holds and you judge the behavior acceptable, or when its premise stays unsettled, output its technical detail as text and use AskUserQuestion to let the user decide between Apply the fix, Keep the behavior, and Get a second opinion, which runs the /consult-codex skill for the soundest choice on technical merit alone and then applies or keeps with that answer in hand. Place the genuinely best option first and append (Recommended) to its label, or say that merit cannot settle it. When a deletion recommendation and a refactor recommendation land on the same code, the deletion wins. When two agents agree the code should change but propose opposing remedies, prefer the remedy whose measurement reports a result concrete enough to re-run over one resting on reading; a bare claim to have measured ranks no higher than reading. Where neither reports one, apply the narrower remedy and state what the other proposed.
When a recommendation rests on a factual premise that reading the code in question cannot settle — what a platform API returns at runtime, or what a value measures once the system runs — establish that premise before implementing it rather than taking the agent's assertion, using the cheapest check that settles it: a targeted search or count over the source, the implementation behind the premise (the platform's or dependency's own source, or an open-source counterpart of the component checked against the shipped binary as installed on this machine where the two may differ), or a measurement from a surface already running in this session. When the premise is that a guard, check, or rule is redundant and the evidence is a comparison of runs with and without it, those runs must include the inputs it exists for, built on purpose where the condition it protects is hardest to meet. Runs that never reach those inputs leave the premise unsettled. When nothing available settles it, skip the finding and name the unverified premise as its reason, unless it is a security finding of the kind above, which goes to the user. Reading alone cannot catch a false premise: the recommendation is coherent, the change lands cleanly, and the checks pass, leaving a change that cannot do what it was made to do.
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 AskUserQuestion 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:
/backlog skill to capture it/consult-codex 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 handOnce 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:
Where one criterion recurs across many sites, or many sites fall within one file, a single row may cover that group. Name the directory or file cluster it spans and the count. Every Skipped and Escalated finding keeps its own row with its reason, since those are the rows a reader acts on.
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 use the TaskList tool and proceed to any remaining task.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tobihagemann/turbo --plugin turbo74 skills in this plugin
/apply-findingsApply accepted review findings as code changes, escalating ambiguous ones to the user. Use when the user asks to "apply findings", "apply fixes", or "apply the review results"./assess-technical-debtAssess project-wide technical debt (hotspots, deprecated APIs, duplication, low-value tests) into a ranked report. Use when the user asks to "assess technical debt" or "what should we refactor"./backlogCapture an out-of-scope improvement or accepted simplification in .turbo/backlog.md. Use proactively mid-task, or when the user asks to "backlog this", "note this idea", or "track this for later".Other plugins' skills for the same job