Agent skill

Simplify Code

by tobihagemann in tobihagemann/turbo

Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by fixes.

MITAuto-check passedDevelopment

Install Simplify Code

skills CLI
$ npx skills add tobihagemann/turbo --skill simplify-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tobihagemann/turbo simplify-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/codex/skills/simplify-code .claude/skills/simplify-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
simplify-code
GitHub stars
406
Token cost
~3.5k tokens
SKILL.md length
2,067 words
Files
1
Skills in repo
81
Repo updated
First seen
Licence
MIT

At a glance

Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by fixes.

  • Works in 3 steps: Determine the Scope → Launch Six Review Agents in Parallel → Fix Issues
  • The user asks to simplify code
  • SKILL.md covers Step 1: Determine the Scope, Step 2: Launch Six Review… and Step 3: Fix Issues
  • Calls git and gh

What it does

Simplify Code is an agent skill from tobihagemann/turbo. Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by 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".

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code simplification, Refactoring and Code review. It works with Git. The repository describes itself as: Reusable workflows for planning, building, reviewing, and shipping with Claude Code and Codex. The licence is MIT.

When your agent uses it

  • The user asks to simplify code
  • Review changed code
  • Check for code reuse
  • Review code quality

Example prompts

  • “simplify code”
  • “review changed code”
  • “check for code reuse”
  • “/simplify-code”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Determine the Scope
  2. Launch Six Review Agents in Parallel
  3. Fix Issues

What it can do on your machine

Read from SKILL.md and the folder at commit 1293ed6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Simplify Code loads about 3.5k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 2,067 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tobihagemann/turbo at commit 1293ed6, republished under its MIT licence (© tobihagemann). 2,067 words, ~3,451 tokens.

Download SKILL.mdSave it as .claude/skills/simplify-code/SKILL.md (or your agent's skills folder).
name
simplify-code
description
Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by 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".

Simplify Code

Review code for scope, reuse, quality, efficiency, clarity, and altitude issues, then fix them.

Step 1: Determine the Scope

Determine what to review:

  • If a specific diff command was provided (e.g., git diff --cached), use that.
  • If a file list or directory was provided, review those files directly (read the full files, not a diff).
  • If neither was provided, determine the appropriate diff command (e.g., 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.

Step 2: Launch Six Review Agents in Parallel

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. For an empirical check that verifies a finding, the agent works in a copy of the checkout created under $TMPDIR and discarded afterward. 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. 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 a uniquely named file under $TMPDIR and to return that path with its report, so a compaction before Step 3 leaves the findings recoverable.

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.

Agent 1: Scope Review

Review the changes for code that should not exist:

  1. Unrequested machinery: an abstraction with one implementation, a configuration point with one caller, a factory for one product, a wrapper that only delegates, scaffolding for an anticipated requirement. Recommend deletion rather than simplification.
  2. Unreachable defensive code: a branch, guard, retry, or fallback for a state the surrounding code's own constraints rule out. When the callers cannot produce the input, the handling for it is dead on arrival.
  3. Reinvented standard library or platform feature: hand-rolled logic the language's standard library or the target platform already ships, or a new dependency for what an already-installed one covers. Name the replacement.
  4. Tests in the wrong shape: a production export, flag, or hook that exists only for a test to call, with no production caller and no public contract behind it. Recommend removing it and driving the test through a boundary production code already uses. For a test that repeats another test's contract, recommend folding its cases into that test. For an assertion on implementation (source text, import or export lists, private call shapes) that breaks under a behavior-preserving refactor, recommend rewriting it against observable behavior, unless it is the cheapest guard on a user-facing name, key, or path. Recommend these remedies rather than deleting a test outright.

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 four checks above.

Agent 2: Code Reuse Review

For each change:

  1. Search for existing utilities and helpers that could replace newly written code. Look for similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
  2. Flag any new function that duplicates existing functionality. Suggest the existing function to use instead.
  3. Flag any inline logic that could use an existing utility — hand-rolled string manipulation, manual path handling, custom environment checks, and similar patterns are common candidates.
Agent 3: Code Quality Review

Review the same changes for hacky patterns:

  1. Redundant state: state that duplicates existing state, cached values that could be derived, reactive subscriptions that could be direct calls
  2. Parameter sprawl: adding new parameters to a function instead of generalizing or restructuring existing ones
  3. Copy-paste with slight variation: near-duplicate code blocks that should be unified with a shared abstraction
  4. Leaky abstractions: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
  5. Stringly-typed code: using raw strings where constants, enums, or dedicated types already exist in the codebase
  6. Unnecessary wrapper nesting: container elements or wrapper layers that add no structural or layout value
Agent 4: Efficiency Review

Review the same changes for efficiency:

  1. Unnecessary work: redundant computations, repeated file reads, duplicate network/API calls, N+1 patterns
  2. Algorithmic complexity: nested iterations, repeated linear searches replaceable by sets/maps, missing early exits
  3. Missed concurrency: independent operations run sequentially when they could run in parallel
  4. Hot-path bloat: new blocking work added to startup or per-request hot paths
  5. Refresh cadence: work triggered more often than its result can change, such as refetching rarely changing data on every event, request, or timer tick
  6. Unnecessary existence checks: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
  7. Memory: unbounded data structures, missing cleanup, resource leaks
  8. Overly broad operations: reading entire files when only a portion is needed, loading all items when filtering for one
Agent 5: Clarity and Standards Review

Review the same changes for clarity, standards, and balance:

  1. Project standards: coding conventions not followed — import sorting, naming conventions, component patterns, error handling patterns, module style. Beyond the auto-loaded instruction files, walk each directory that is an ancestor of a changed file, from the project root down, and read its 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 from
  2. Unnecessary complexity: deep nesting, unclear variable or function names, nested conditionals 3+ levels deep (ternary chains like a ? 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)
  3. Unclear code: choose clarity over brevity — explicit code is better than overly compact code. Consolidate related logic, but not at the cost of readability
  4. Over-simplification: overly clever solutions that are hard to understand, too many concerns combined into single functions or components, "fewer lines" prioritized over readability (dense one-liners), helpful abstractions removed that were aiding code organization
  5. Dead weight: code no longer reached by any path, and variables, imports, or parameters the change orphaned
  6. Unnecessary comments: comments explaining WHAT the code does, narrating the change, or referencing the task/caller — delete; keep only non-obvious WHY (hidden constraints, subtle invariants, workarounds)
Show full SKILL.md (715 more words)Show less
Agent 6: Altitude and Fix-Depth Review

Review the same changes for whether each is implemented at the right depth:

  1. Special case on shared infrastructure: a narrow branch, flag, or conditional bolted onto a shared mechanism to handle one case, where generalizing the mechanism would remove the need for the special case. Name the generalization.
  2. Shallow fix at the symptom: a change applied at one call site that the same shape will require again at the next similar site. Prefer addressing the shared root.
  3. Wrong layer: logic placed in a caller, wrapper, or leaf when it belongs in the shared layer all paths flow through, or pushed into shared infrastructure when it is specific to one caller.

Step 3: Fix Issues

Wait for all six agents to complete. Aggregate their findings, reading each agent's findings file at the path it returned when its report is no longer in context. 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. 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 source 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, or a measurement from a surface already running in this session. When nothing available settles it, skip the finding and name the unverified premise as its reason. 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 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:

  • Apply — make the change
  • Keep the approved shape — leave as-is
  • Get a second opinion — run the $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 hand

A 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:

FileFindingOutcome

Where Outcome is one of:

  • Fixed — the fix was made
  • Escalated — name the resolution the user chose: fixed, kept, or noted for later
  • Skipped — name the reason

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 call update_plan to mark this step completed and continue with the next step of the active workflow.

© tobihagemann, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in codex/skills/simplify-code of tobihagemann/turbo.

Open the folder on GitHubat commit 1293ed6

Compare with similar skills

Simplify Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Simplify Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Simplify Code this skilltobihagemann/turbo406—~3.5kAutomated safety check: PassMIT
Review And Simplify ChangesDimillian/Skills4k—~2kAutomated safety check: PassMIT
Absolute Simplifymaddhruv/absolute218—~6.1kAutomated safety check: PassMIT
Pragmatic Reviewheyitsnoah/claudesidian2.6k—~2.6kAutomated safety check: PassMIT
Code RefinerMathews-Tom/armory327—~3.1kAutomated safety check: PassMIT
SimplifySeifBenayed/cloclo114—~430Automated safety check: NotesMIT

Similar skills

  • Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes.

    4k GitHub stars~2k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Absolute Simplify

    maddhruv/absolute

    A skill your agent uses when the user wants to simplify, clean up, refactor, tidy, or refine code — their staged/unstaged git changes or a target file/path.

    218 GitHub stars~6.1k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Pragmatic Review

    heyitsnoah/claudesidian

    Interactive pragmatic code review focusing on YAGNI and KISS principles.

    2.6k GitHub stars~2.6k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    327 GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Simplify

    SeifBenayed/cloclo

    Review code for unnecessary complexity and simplify it. An agent skill from SeifBenayed/cloclo.

    114 GitHub stars~430 tokensUpdated 6 mo ago
    DevelopmentAuto-check: notes
  • Refactor

    testdouble/han

    Restructure existing code without changing its behavior, through a test-gated refactoring loop: a named target, a green suite over that target before any edit, a planned sequence of small named…

    279 GitHub stars~3.1k tokensUpdated 6 days ago
    DevelopmentAuto-check passed

More from tobihagemann/turbo

All 81 skills in this repo
  • Consult Oracle

    tobihagemann/turbo

    Consult ChatGPT Pro via ChatGPT browser automation for problems that resist standard approaches.

    406 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Fetch PR Comments

    tobihagemann/turbo

    Fetch and summarize review feedback and conversation from a GitHub PR (unresolved review threads, review bodies, and PR conversation comments) without making changes.

    406 GitHub starsUsed in 1 repo~967 tokens
    Auto-check passed
  • Recall Rationale

    tobihagemann/turbo

    Recall why a past change was made by locating the Claude Code transcript that produced it.

    406 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Codex Exec

    tobihagemann/turbo

    Run autonomous task execution using the codex CLI. An agent skill from tobihagemann/turbo.

    406 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Resolve PR Comments

    tobihagemann/turbo

    Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments.

    406 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Investigate

    tobihagemann/turbo

    Systematically investigate bugs, test failures, build errors, performance issues, or unexpected behavior by cycling through characterize-isolate-hypothesize-test steps.

    406 GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed

Works with

Categories

Questions about Simplify Code

What does Simplify Code do?

Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by fixes. Simplify Code is an agent skill from tobihagemann/turbo. Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by fixes.

When should I use Simplify Code?

Simplify Code fits situations like: the user asks to simplify code; review changed code; check for code reuse; review code quality.

How do I install Simplify Code in Claude Code?

Run `npx skills add tobihagemann/turbo --skill simplify-code -a claude-code`. Or copy the skill folder (codex/skills/simplify-code in tobihagemann/turbo) into .claude/skills/simplify-code in your project. Claude Code loads it when a task matches its description.

How do I install Simplify Code in Codex?

Run `npx skills add tobihagemann/turbo --skill simplify-code -a codex`. Or copy the skill folder (codex/skills/simplify-code in tobihagemann/turbo) into .agents/skills/simplify-code in your project. Codex loads it when a task matches its description.

Can I use Simplify Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tobihagemann/turbo --skill simplify-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/simplify-code, .gemini/skills/simplify-code, .github/skills/simplify-code and .opencode/skills/simplify-code in your project.

What does Simplify Code need to run?

Going by SKILL.md and its folder, Simplify Code needs the command-line tools its instructions call (git and gh).

Does Simplify Code access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Simplify Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Simplify Code use?

Simplify Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Simplify Code use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Simplify Code?

Skills that share tags, products or a category with Simplify Code: Review And Simplify Changes (Dimillian/Skills, 4k stars), Absolute Simplify (maddhruv/absolute, 218 stars), Pragmatic Review (heyitsnoah/claudesidian, 2.6k stars) and Code Refiner (Mathews-Tom/armory, 327 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Simplify Code?

tobihagemann (a GitHub user) maintains it in tobihagemann/turbo, which has 406 GitHub stars. The repository holds 81 skills in this directory. The repository was last updated on October 6, 2026.

Source: tobihagemann/turbo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.