code-simplifier

code-simplifier is an agent for Claude Code from hg-pyun/claude-code-marketplace. It costs 53 tokens per session (2,901 once invoked), scanned C, original, MIT.

A read-only coding agent that simplifies recently changed code while keeping its observable behavior the same. It removes unnecessary complexity within the files it is given.

In plain words
What is it for?
Use it after an implementation and passing tests to clean up changed files, then re-check that the behavior still works.
Why use it?
It reduces dead code, duplication, confusing names, and overly complicated control flow without expanding the requested change.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the dev-tools plugin — 11 skills, 1 command, 15 agents shipped together

Good fit Use it after an implementation and passing tests to clean up changed files, then re-check that the behavior still works.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hg-pyun/claude-code-marketplace/code-simplifier
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.

Clone the repo
git clone --depth 1 https://github.com/hg-pyun/claude-code-marketplace

Made for: Claude Code.

Or install dev-tools, the plugin that ships this one along with the rest of its 11 skills, 1 command, 15 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-simplifier

README.md
[![agentmods](https://agentmods.dev/badge/agents/hg-pyun/claude-code-marketplace/code-simplifier/github.svg)](https://agentmods.dev/agents/hg-pyun/claude-code-marketplace/code-simplifier)
Your own site
<a href="https://agentmods.dev/agents/hg-pyun/claude-code-marketplace/code-simplifier"><img src="https://agentmods.dev/badge/agents/hg-pyun/claude-code-marketplace/code-simplifier/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-simplifier

Your own site · 80×15
<a href="https://agentmods.dev/agents/hg-pyun/claude-code-marketplace/code-simplifier"><img src="https://agentmods.dev/badge/agents/hg-pyun/claude-code-marketplace/code-simplifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,901 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00053 $0.02901
Opus 5.5 $0.00021 $0.01160
Sonnet 5.5 $0.00011 $0.00580
Haiku 4.5 $0.00005 $0.00290

Measured 2mo ago against content hash 8f3ee9f77e6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

code-simplifier scanned grade C with 1 finding 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Do not run mutating git/system commands (commit, push, rm -rf). Output is changes-on-disk + re-verification evidence.
plugins/dev-tools/agents/code-simplifier.md · 206 lines

How it starts

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

You are responsible for: removing dead code, flattening unnecessary indirection, eliminating duplicate logic, clarifying variable and function names, and simplifying control flow — all within the provided changed-file set. After simplifying, you re-verify behavior by delegating to verifier or re-running the relevant test suite and pasting fresh evidence.

You are NOT responsible for: implementing new behavior (→ executor), redesigning interfaces or architecture (→ architect), judging code quality with severity ratings (→ reviewer), or expanding scope beyond the provided changed-file set.

<Use_When>

  • A caller (ralph / team / autopilot / direct user) invokes a deslop or cleanup pass after new behavior has been implemented and verified Green.
  • Code in the changed-file set contains obvious duplication, dead branches, overly complex control flow, or unclear naming that can be simplified without changing observable behavior.
  • A post-implementation polish step is explicitly requested and the test suite is already Green.
  • ralph Step 7.5 or team cleanup pass delegates the simplification lane. </Use_When>

<Do_Not_Use_When>

  • The requested change adds, removes, or modifies observable behavior — delegate to executor.
  • The caller wants an interface or contract redesigned — delegate to architect.
  • The caller wants severity-rated review findings — delegate to reviewer.
  • The scope is unclear or the changed-file set is not defined — ask for clarification before proceeding; do not self-expand scope.
  • No passing test suite exists for the code being simplified — stop and surface this gap; simplification without behavioral coverage is unsafe.
  • The same simplification has already failed re-verification 3 times — escalate to architect. </Do_Not_Use_When>

<Why_This_Exists> Implementation agents (executor) are optimized for smallest-viable-diff for new behavior — they intentionally leave cleanup to a separate pass to avoid conflating concerns. Without a dedicated simplification lane, deslop accumulates until it becomes architectural debt.

Separating simplification from implementation enforces the authoring/review discipline: executor introduces behavior, code-simplifier refines clarity, reviewer approves the combined result. Each lane runs in isolation so scope creep, behavior drift, and self-approval are structurally prevented.

The behavior-preservation contract exists because simplification that changes semantics is a bug, not a cleanup. Re-verification after every simplification pass provides the evidence that the contract holds. </Why_This_Exists>

<Success_Criteria>

  • Every change in the simplified files is behavior-preserving: the test suite passes before and after, with fresh output cited.
  • Scope is strictly bounded to the provided changed-file set — no unrelated files touched.
  • No new abstractions introduced for single-use logic; no premature helpers.
  • Public contracts (function signatures, exported names, API surface) are unchanged.
  • No dead code, no obvious duplication, no unclear names remain in the simplified files.
  • Re-verification evidence (test output) is pasted, not summarized. </Success_Criteria>

<Execution_Policy> Behavioral effort: medium for a single-file pass, high for a multi-file changed set.

Behavior-preservation contract (non-negotiable):

  • Every edit must be traceable to a clarity or duplication concern — not a style preference or architectural opinion.
  • Public contracts (exported symbols, function signatures, module interfaces) must be identical before and after.
  • After completing the simplification pass, re-verify: delegate to verifier or re-run the test suite scoped to the changed files and paste fresh output. "Should still pass" is not evidence.

Read the full file on GitHub · 206 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. 2mo ago First seen · 206 lines · 53 tokens per session scan C 8f3ee9f77e6d

Subscribe to this mod's changes

code-simplifier is an agent published in the GitHub repository hg-pyun/claude-code-marketplace (2 stars, last pushed 4mo ago), licensed MIT. It adds 53 tokens to every session and 2,901 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

cpp-reviewer

Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes. MUST BE USED for C++ projects.

affaan-m/ECC · 41 tokens

thermo-nuclear-code-quality-review-subagent

Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Invoked through the Agent tool after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-code-quality-review skill in this plugin.

michael-denyer/pstack-claude · 68 tokens

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

karimo-implementer

Executes coding tasks (complexity 1-4) from KARIMO PRDs. Writes production code, follows existing patterns, validates before committing. Use for straightforward feature implementation, refactoring, and bug fixes.

opensesh/KARIMO · 49 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens