code-simplifier

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

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 skills/saski/arnesto/code-simplifier
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.

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. 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.00040 $0.00464
Opus 5 $0.00020 $0.00232
Sonnet 5 $0.00008 $0.00093
Haiku 4.5 $0.00004 $0.00046

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

.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. yesterday 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 6d ago), licensed Unlicense. It adds 40 tokens to every session and 464 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

pixir-delegate

Use Pixir as a headless subagent runtime from Claude Code or any harness with skill ! preprocessing (Codex roots and other no-hydration hosts use pixir-delegate-codex instead) — one-shot workers (pixir --json), parallel fan-out to N children (pixir delegate --spec), resumable steering (pixir resume), evidence…

Ranvier-Technologies/pixir · 126 tokens

pixir-delegate-codex

Use when a Codex CLI/Desktop root should fan out subagents, delegate to Pixir workers, run parallel workers, or manage a resident delegation daemon via Pixir Delegate; covers Codex preflight, AGENTS.md, approvals/sandbox, dry-run, daemon start/status/attach/cancel, closure evidence, and audited single-run execution…

Ranvier-Technologies/pixir · 89 tokens

pixir-diagnostics

Diagnose Pixir and T3 Code Pixir incidents from local canonical evidence. Use when a Pixir run, ACP/T3 thread, subagent/workflow, provider replay, or daily-driver dogfood session appears stuck, inconsistent, missing tool output, or hard to classify.

Ranvier-Technologies/pixir · 61 tokens

readonly-review

Run a no-network read-only review practice with two explorer steps and one synthesis step.

Ranvier-Technologies/pixir · 20 tokens

pixir-delegate-native

Delegate work to subagents from INSIDE a Pixir session using the native Subagent tools (spawnagent, waitagent, closeagent, listagents, sendinput) instead of shelling out to the pixir CLI. Use when you are a Pixir session that needs to fan out parallel workers, steer a child, or run skill-backed workflow templates …

Ranvier-Technologies/pixir · 89 tokens

repo-contracts-and-boundaries

Use when turning architecture, layering, ownership, dependency direction, schemas, structural metrics, quality thresholds, baselines, allowlists, or generated quality snapshots into repository checks.

yfge/agent-harness-skills · 41 tokens