simplify-code
Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by fixes
Install / Use
npx skills add tobihagemann/turbo --skill simplify-codeInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of simplify-code
simplify-code scores 84/100 on our quality scale, 3005th of 4,616 Development & Engineering skills we index.
Its SKILL.md is 13 KB long, well organised into 10 sections and no code examples: a thorough specification that gives an agent plenty to work with.
It has 405 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 12 days ago, so simplify-code is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-05. Automated pattern scan on 2026-10-05. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
simplify-code compared with similar skills
All 4 of these similar skills score higher than simplify-code; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| simplify-code (this skill)by tobihagemann | 84 | 405 | 12d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 45.0k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.8k | 5d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 13d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 13d ago | SKILL.md |
Frequently asked questions
- How do I install simplify-code?
- Run
npx skills add tobihagemann/turbo --skill simplify-code. The install tabs above show the steps for each supported agent. - Which AI agents does simplify-code work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is simplify-code safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is simplify-code still maintained?
- The repository was last updated 12 days ago, so simplify-code is actively maintained.
Skill content
View source on GitHubname: 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 withgh pr view --json baseRefName --jq '.baseRefName', rungit fetch origin <base-branch>, and diff againstorigin/<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
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. For an empirical check that verifies a finding, the agent works in a copy of the checkout created in the session scratchpad directory 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 in the session scratchpad directory 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.
Agent 1: Scope Review
Review the changes for code that should not exist:
- 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.
- 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.
- 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.
- 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:
- 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.
- Flag any new function that duplicates existing functionality. Suggest the existing function to use instead.
- 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:
- Redundant state: state that duplicates existing state, cached values that could be derived, reactive subscriptions that could be direct calls
- Parameter sprawl: adding new parameters to a function instead of generalizing or restructuring existing ones
- Copy-paste with slight variation: near-duplicate code blocks that should be unified with a shared abstraction
- Leaky abstractions: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
- Stringly-typed code: using raw strings where constants, enums, or dedicated types already exist in the codebase
- 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:
- Unnecessary work: redundant computations, repeated file reads, duplicate network/API calls, N+1 patterns
- Algorithmic complexity: nested iterations, repeated linear searches replaceable by sets/maps, missing early exits
- Missed concurrency: independent operations run sequentially when they could run in parallel
- Hot-path bloat: new blocking work added to startup or per-request hot paths
- Unnecessary existence checks: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
- Memory: unbounded data structures, missing cleanup, resource leaks
- 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:
- 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
CLAUDE.mdand 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 from - 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 == trueinstead ofx) - Unclear code: choose clarity over brevity — explicit code is better than overly compact code. Consolidate related logic, but not at the cost of readability
- 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
- Dead weight: code no longer reached by any path, and variables, imports, or parameters the change orphaned
- 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)
Agent 6: Altitude and Fix-Depth Review
Review the same changes for whether each is implemented at the right depth:
- 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.
- 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.
- 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
Aggregate the agents' 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 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:
- Apply — make the change
- Keep the approved shape — leav
Truncated for display — read the full file on GitHub.
Related Skills
ai-job-search
45.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.8kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
