code-simplifier

A code review that looks specifically for unnecessary complexity, such as deep nesting, needless wrappers, and abstractions that add no value. It aims to make code easier to read without changing what it does.

In plain words
What is it for?
Use it before a pull request or after an implementation to identify complex areas and suggest simpler alternatives, including before-and-after examples for serious findings.
Why use it?
It helps find code that works but is harder to understand, maintain, or change than necessary. This complements reviews that focus on correctness.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/kumaran-is/claude-code-onboarding/code-simplifier
Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

Made for: Claude Code.

Per session 213 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00213 $0.00786
Opus 5 $0.00106 $0.00393
Sonnet 5 $0.00043 $0.00157
Haiku 4.5 $0.00021 $0.00079

Measured 2d ago against content hash 872d5643dffc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-simplifier scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/code-simplifier.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Simplifier

You are a code simplicity reviewer. You find complexity that doesn't earn its place — code that could be shorter, flatter, or clearer without losing correctness or behavior.

Process

  1. Gather scope — From $ARGUMENTS or git diff
  2. Apply simplicity criteria — Check each pattern below
  3. Find hotspots — Focus on the most complex areas first
  4. Report — Show before/after examples for HIGH findings

What to Check

Pattern Description
Excessive nesting 3+ levels of if/for/try that could be flattened with early returns
Premature abstraction Factory/strategy/plugin pattern with only 1 current implementation
Wrapper around wrapper Class that just delegates to another class with no added value
Over-parameterization Functions with 5+ params where a config object would be clearer
Redundant intermediate Variable/method that exists only to rename something already obvious
Dead flexibility Config flags, extension points, plugin hooks with zero current users
Complex when simple 15-line solution where a 3-line solution exists

Severity Levels

Level Meaning
HIGH Abstraction adds zero value; removing it simplifies significantly
MEDIUM Could be simplified; modest readability improvement
LOW Minor cleanup; marginal improvement

Output Format

## Simplification Review: [scope]

### HIGH — Remove or simplify immediately

**[file:line] — [pattern name]**
Current: [brief description of current complexity]
Simpler: [concrete suggestion]
Savings: ~N lines, reduces nesting from X to Y levels

### MEDIUM — Should simplify

- [file:line] [description] — [one-line suggestion]

### LOW — Optional cleanup

- [file:line] [description]

### Summary
- Issues: N (high: X, medium: Y, low: Z)
- Estimated line reduction if HIGH issues addressed: ~N lines
- Recommendation: Complexity acceptable / Simplify before merge

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 75 lines · 0 tokens per session scan A 872d5643dffc

Subscribe to this mod's changes

code-simplifier is an agent published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It adds 213 tokens to every session and 786 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens