simplify

simplify is a skill for Claude Code from epicsagas/epic-harness. It costs 26 tokens per session (762 once invoked), scanned A, original, Apache-2.0.

A code-cleanup guide for making complicated files and functions easier to read and maintain.

In plain words
What is it for?
Use it to measure complexity, split code by responsibility, extract functions or constants, improve names, and remove unused or unreachable code.
Why use it?
It helps reduce deep nesting, repeated code, oversized functions, and unclear names that make changes risky.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the epic plugin — 27 skills shipped together

Good fit Use it to measure complexity, split code by responsibility, extract functions or constants, improve names, and remove unused or unreachable code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/epicsagas/epic-harness/simplify
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 epicsagas/epic-harness --skill simplify
Clone the repo
git clone --depth 1 https://github.com/epicsagas/epic-harness

Made for: Claude Code.

Or install epic, the plugin that ships this one along with the rest of its 27 skills.

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 simplify

README.md
[![agentmods](https://agentmods.dev/badge/skills/epicsagas/epic-harness/simplify/github.svg)](https://agentmods.dev/skills/epicsagas/epic-harness/simplify)
Your own site
<a href="https://agentmods.dev/skills/epicsagas/epic-harness/simplify"><img src="https://agentmods.dev/badge/skills/epicsagas/epic-harness/simplify/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 simplify

Your own site · 80×15
<a href="https://agentmods.dev/skills/epicsagas/epic-harness/simplify"><img src="https://agentmods.dev/badge/skills/epicsagas/epic-harness/simplify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 762 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.00026 $0.00762
Opus 5.5 $0.00010 $0.00305
Sonnet 5.5 $0.00005 $0.00152
Haiku 4.5 $0.00003 $0.00076

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

Security

Grade A, and why

simplify 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.

skills/simplify/SKILL.md · 77 lines

How it starts

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

Simplify — Code Simplification

When to Trigger

  • File exceeds 500 lines
  • Function exceeds 40 lines or nesting exceeds 3 levels of control flow
  • Repeated copy-paste blocks (same shape, 2+ sites)
  • "This is getting hard to follow" feeling

Process

1. Measure

  • Line count, function count, nesting depth
  • Identify the longest/most complex function

Why: You cannot improve what you cannot quantify. Baseline metrics prove simplification actually happened and prevent subjective "it feels cleaner" claims.

2. Extract

  • Extract function: Turn a code block into a named function
  • Extract constant: Replace magic numbers/strings
  • Extract module: Split large files by responsibility

Why: Named abstractions replace "what does this block do?" with "what does this function promise?" — reducing cognitive load per reading unit.

3. Rename

  • Variables: describe what it holds, not how it's computed
  • Functions: describe what it does, not how
  • Files: match the primary export/class

Why: Precise names eliminate the need for comments and make wrong code look wrong. A reader should understand intent from names alone.

4. Reduce

  • Remove dead code (unused imports, unreachable branches)
  • Replace imperative loops with declarative (map, filter, reduce)
  • Merge duplicate logic into shared utility

Why: Every line of code is a line someone must read, understand, and maintain. Fewer lines with the same behavior means lower lifetime cost.

5. Verify

  • All tests still pass after simplification
  • No behavior changes — only structural improvements

Why: Simplification that breaks behavior is not simplification — it is a regression. Tests are the safety net that makes structural changes safe.

Constraints

  • One simplification at a time — verify between each
  • Never simplify and add features in the same change

Anti-Rationalization

Excuse Rebuttal What to do instead
"We might need this later" YAGNI. Code you don't need is code you maintain for free. Add it when you need it. Delete it. When the need arises, write it with current context — not stale assumptions.
"This abstraction makes it more flexible" Flexibility without a concrete use case is complexity. Simple code is flexible code. Abstract only after you see the second use case. Two concrete examples beat one imagined future.
"It's already working, don't touch it" Chesterton's Fence: understand why it exists first. But if it's needlessly complex, simplify it. Understand it, write tests for it, then simplify it. Working code that nobody can read is a ticking bomb.

Read the full file on GitHub · 77 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. 1mo ago Changed · -1 lines · -6 tokens per session 8ebf46449a61
  2. 1mo ago First seen · 78 lines · 32 tokens per session scan A dc612e213e2d

Subscribe to this mod's changes

simplify is a skill published in the GitHub repository epicsagas/epic-harness (19 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 762 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-30.

Related

Other skills, from other repositories

hypotheses

Turns a research direction into testable hypotheses with predictions, competing explanations and the experiments that discriminate between them, including the design (controls, randomization, blocking), sample size or seed count, the pre-specified analysis, and the result that would falsify each hypothesis. Use when a…

synthetic-sciences/openscience · 99 tokens

crit-cli

Use when an agent needs to author or reply to crit inline comments programmatically (including multi-agent workflows commenting on shared code/plans/docs/proposals), publish or unpublish a crit review with crit share, sync a crit review to or from a GitHub PR or GitLab MR, or read/interpret a crit review JSON file.…

tomasz-tomczyk/crit · 110 tokens

crit-story

Author a crit story and continue the interactive review loop only when the user explicitly invokes crit-story or directly asks you to generate a crit story. Do not infer this skill from generic review, PR, or diff-review requests.

tomasz-tomczyk/crit · 47 tokens

crit

Review code changes, a plan, a live page (running dev server), or a local HTML file with Crit inline comments and structured human feedback. Use only when the user explicitly invokes /crit or directly asks to use Crit; a generic review request does not count.

tomasz-tomczyk/crit · 55 tokens

crossreview

Run when the user invokes /crossreview (or /crossreview:setup to choose the reviewers) or asks for a cross-review, a quorum review or a second opinion from other agents or models: fan a code review (uncommitted work, a branch, a commit range, files, a plan or a document) out to several console code agents (Claude…

coddy-project/coddy-agent · 204 tokens

review-harness

Use when reviewing implementation work that ran through a /tmp Pi task harness. Checks contract drift, unsafe shortcuts, validation evidence, and status honesty.

spences10/my-pi · 33 tokens