code-simplifier

code-simplifier is a skill for Claude Code, Codex from saski/arnesto. It costs 40 tokens per session (464 once invoked), scanned A, original, Unlicense.

A code-cleanup workflow that makes existing code easier to read and maintain while preserving its behavior. It focuses on the code changed in the current session unless a wider scope is requested.

In plain words
What is it for?
Use it to simplify functions, remove unused code, clarify names and conditions, reduce duplication, and improve maintainability.
Why use it?
It reduces unnecessary complexity, deep nesting, dead code, and confusing conditions without changing what the program does. Available tests are used to check that behavior was preserved.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; installed under .agents/ (shared by several agents).

Good fit Use it to simplify functions, remove unused code, clarify names and conditions, reduce duplication, and improve maintainability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saski/arnesto/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.

Any agent
npx skills add saski/arnesto --skill code-simplifier
Clone the repo
git clone --depth 1 https://github.com/saski/arnesto

Made for: Claude Code, Codex.

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/skills/saski/arnesto/code-simplifier/github.svg)](https://agentmods.dev/skills/saski/arnesto/code-simplifier)
Your own site
<a href="https://agentmods.dev/skills/saski/arnesto/code-simplifier"><img src="https://agentmods.dev/badge/skills/saski/arnesto/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/skills/saski/arnesto/code-simplifier"><img src="https://agentmods.dev/badge/skills/saski/arnesto/code-simplifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 464 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.00040 $0.00464
Opus 5.5 $0.00016 $0.00186
Sonnet 5.5 $0.00008 $0.00093
Haiku 4.5 $0.00004 $0.00046

Measured 1mo ago against content hash cca806d2c549, 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 1mo 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.

.agents/skills/code-simplifier/SKILL.md · 53 lines

What it actually says

STARTER_CHARACTER = 🧹

When starting, announce: "🧹 Using CODE-SIMPLIFIER skill".

Scope

Default scope: code modified in the current session or specified by the user. Broader scope only when explicitly requested.

Read CLAUDE.md for project-specific coding standards before making changes.

Process

  1. Identify the code sections in scope
  2. Analyze each section for simplification opportunities
  3. Apply changes one at a time — run tests if available to verify behavior preservation
  4. Summarize what changed and why

Simplification Principles

Prioritize clarity over brevity.

  • Reduce nesting depth — extract early returns, guard clauses
  • Eliminate dead code, unreachable branches, unused variables
  • Replace complex conditionals with named booleans or extracted functions
  • Consolidate duplicated logic only when the duplication is real (same reason to change), not coincidental
  • Remove comments that restate what the code already says
  • Flatten callback chains or deeply nested structures
  • Use domain language in names — describe what things ARE, not implementation details

Over-Simplification Anti-Patterns

These make code worse, not better. Do not apply them:

  • Nested ternaries: Use if/else or switch for multiple conditions
  • Dense one-liners: A readable 3-line version beats a clever 1-line version
  • Premature abstraction: Three similar lines are better than a generic helper used once
  • Merging unrelated concerns: Two simple functions beat one "smart" function with flags
  • Stripping useful abstractions: If an abstraction improves organization or testability, keep it
  • Compressing at the cost of debuggability: Code that's hard to step through with a debugger is too compressed

What NOT to Change

  • Test code (unless imports/names must follow production renames)
  • Public API signatures (unless explicitly requested)
  • Behavior — the code must do exactly what it did before
  • Code outside of scope
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. 1mo ago First seen · 53 lines · 40 tokens per session scan A cca806d2c549

Subscribe to this mod's changes

code-simplifier is a skill published in the GitHub repository saski/arnesto (5 stars, last pushed yesterday), licensed Unlicense. It adds 40 tokens to every session and 464 once invoked, about $0.0002 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.