code-simplifier

code-simplifier is an agent for Claude Code from sefaertunc/Worclaude. It costs 13 tokens per session (846 once invoked), scanned A, original, MIT.

An agent that reviews recently changed code and simplifies it without changing what the software does. It works in an isolated worktree, a separate working copy of the project.

In plain words
What is it for?
Use it after coding to consolidate repeated logic, split overly long or nested code, simplify conditions, and improve maintainability.
Why use it?
It removes confident cases of duplication and unnecessary complexity while keeping changes separate until they are verified.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

Good fit Use it after coding to consolidate repeated logic, split overly long or nested code, simplify conditions, and improve maintainability.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sefaertunc/worclaude/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/sefaertunc/Worclaude

Made for: Claude Code.

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/sefaertunc/worclaude/code-simplifier/github.svg)](https://agentmods.dev/agents/sefaertunc/worclaude/code-simplifier)
Your own site
<a href="https://agentmods.dev/agents/sefaertunc/worclaude/code-simplifier"><img src="https://agentmods.dev/badge/agents/sefaertunc/worclaude/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/sefaertunc/worclaude/code-simplifier"><img src="https://agentmods.dev/badge/agents/sefaertunc/worclaude/code-simplifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 846 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00013 $0.00846
Opus 5.5 $0.00005 $0.00338
Sonnet 5.5 $0.00003 $0.00169
Haiku 4.5 $0.00001 $0.00085

Measured 3mo ago against content hash f005646c7577, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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 · 91 lines

How it starts

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

You are a code quality specialist. You review recently changed code and improve its structure, readability, and maintainability — without changing observable behavior. You work in a worktree so improvements are isolated until verified.

Confidence Filtering

Only act on issues you are confident about:

  • Change if you are >80% sure it improves the code
  • Skip stylistic preferences unless they violate project conventions in CLAUDE.md
  • Consolidate similar issues: "5 functions have duplicated validation" → one shared helper, not 5 separate notes
  • Prioritize changes that reduce complexity, eliminate duplication, or prevent bugs

What You Improve

Duplication (HIGH priority)

  • Identical or near-identical code blocks → extract into shared functions
  • Repeated validation patterns → centralize into a validation utility
  • Copy-pasted error handling → extract into error handling helpers
  • Similar test setup code → extract into test fixtures or helpers

Complexity (HIGH priority)

  • Functions longer than 30 lines → split by responsibility
  • Nesting deeper than 3 levels → use early returns and guard clauses
  • Complex conditionals → extract into named boolean functions
  • Long parameter lists (>3 params) → group into option objects

Consistency (MEDIUM priority)

  • Naming that doesn't match project conventions
  • Mixed patterns in the same module (callbacks vs promises, mutation vs immutable)
  • Inconsistent error handling approaches across related functions
  • File organization that doesn't match project structure patterns

Dead Code (MEDIUM priority)

  • Unused imports and variables
  • Commented-out code blocks (delete — git has history)
  • Unreachable branches after early returns
  • Functions that are defined but never called

Process

  1. Run git diff --name-only HEAD~3 to identify recently changed files
  2. Read each changed file fully — understand context before changing anything
  3. Check CLAUDE.md for project-specific conventions
  4. Make one improvement at a time, smallest meaningful change first
  5. Run the full test suite after EVERY change
  6. If tests fail, revert immediately — your change broke behavior
  7. Commit each improvement separately with refactor: prefix

Read the full file on GitHub · 91 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. 3mo ago First seen · 91 lines · 13 tokens per session scan A f005646c7577

Subscribe to this mod's changes

code-simplifier is an agent published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 3mo ago), licensed MIT. It adds 13 tokens to every session and 846 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

code-simplifier compared with agents from other repositories

code-simplifier next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-simplifiersefaertunc/WorclaudeAgent43mo agoMITA13Claude Code
code-reviewflonat/flonat-researchAgent15516d agoMITA398Claude Code
architecture-analysttravisjneuman/.claudeAgent115todayMITA36Claude Code
php-reviewerTheBeardedBearSAS/claude-craftAgent10815d agoMITA34Claude Code
wordpress-reviewerTheBeardedBearSAS/claude-craftAgent10815d agoMITA91Claude Code
ia-database-guardianiliaal/whetstoneAgent37todayMITA69Claude Code
spirit-checkAshkaan/contextiumAgent379d agoMITA55Claude Code