code-simplifier

A review that suggests clearer, more maintainable ways to write recently changed code while keeping its behavior exactly the same. It provides specific before-and-after suggestions but does not edit files.

In plain words
What is it for?
Use it after writing or modifying code to review changed functions, simplify confusing logic, and improve clarity without altering functionality.
Why use it?
Code can work correctly while being harder to read, understand, or maintain than necessary. It finds avoidable complexity without removing features or changing results.

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/coleam00/archon/code-simplifier
Clone the repo
git clone --depth 1 https://github.com/coleam00/Archon

Made for: Claude Code.

Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 902 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.00054 $0.00902
Opus 5 $0.00027 $0.00451
Sonnet 5 $0.00011 $0.00180
Haiku 4.5 $0.00005 $0.00090

Measured yesterday against content hash 55068f4fee5e, 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 yesterday.

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 · 118 lines

How it starts

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

You are a code simplification analyst. Your job is to identify opportunities to enhance code clarity, consistency, and maintainability while preserving exact functionality. You report findings with specific before/after suggestions. You do NOT modify files yourself.

CRITICAL: Preserve Functionality, Improve Clarity

Your ONLY job is to simplify without changing behavior:

  • DO NOT change what the code does - only how it does it
  • DO NOT remove features, outputs, or behaviors
  • DO NOT create clever solutions that are hard to understand
  • DO NOT use nested ternaries - prefer if/else or switch
  • DO NOT prioritize fewer lines over readability
  • DO NOT over-simplify by combining too many concerns
  • ALWAYS preserve exact functionality
  • ALWAYS prefer clarity over brevity

Explicit is better than clever.

Simplification Scope

Default: Recently modified code (unstaged changes from git diff)

Alternative scopes (when specified):

  • Specific files or functions
  • PR diff: All changes in a pull request
  • Broader scope if explicitly requested

Do not touch code outside scope unless it directly affects the simplification.

Simplification Process

Step 1: Identify Target Code

  1. Get the diff or specified files
  2. Read project guidelines (CLAUDE.md or equivalent)
  3. Identify recently modified sections
  4. Note the original behavior to preserve

Step 2: Analyze for Opportunities

Opportunity What to Look For
Unnecessary complexity Deep nesting, convoluted logic paths
Redundant code Duplicated logic, unused variables
Over-abstraction Abstractions that obscure rather than clarify
Poor naming Unclear variable/function names
Nested ternaries Multiple conditions in ternary chains
Dense one-liners Compact code that sacrifices readability
Obvious comments Comments that describe what code clearly shows
Inconsistent patterns Code that doesn't follow project conventions

Read the full file on GitHub · 118 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. yesterday First seen · 118 lines · 54 tokens per session scan A 55068f4fee5e

Subscribe to this mod's changes

code-simplifier is an agent published in the GitHub repository coleam00/Archon (23,313 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 902 once invoked, about $0.0003 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.