Skip to content
Back to skills

Simplify

ASecurity

Code simplification for high-complexity files. Targets deep nesting, copy-paste patterns, god functions, and files over 200 lines.

  • 3 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 12, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add thedixitjain/the-mega-skill-library --skill simplify --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Simplify?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Simplify
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedixitjain-simplify/badge)](https://www.skillsdirectory.com/skills/thedixitjain-simplify)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: simplify
description: "Code simplification for high-complexity files. Targets deep nesting, copy-paste patterns, god functions, and files over 200 lines."
category: engineering-core
source_repo: hashgraph-online/awesome-codex-plugins
source_path: "plugins/epicsagas/epic-harness/skills/simplify/SKILL.md"
source_url: https://github.com/hashgraph-online/awesome-codex-plugins/blob/HEAD/plugins/epicsagas/epic-harness/skills/simplify/SKILL.md
---


# Simplify — Code Simplification

## When to Trigger
- File exceeds 200 lines
- Function exceeds 40 lines
- Deeply nested code (3+ levels)
- Copy-pasted blocks detected
- "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. |

## Evidence Required

Before claiming simplification is done, show ALL of these:

- [ ] Before/after metrics: line count, function count, or nesting depth reduced
- [ ] All tests pass after change (show output)
- [ ] No behavior change: same inputs produce same outputs
- [ ] Each extraction is independently justified (not "because it felt cleaner")

**"I cleaned it up" without metrics = opinion, not simplification.**

## Red Flags
- Simplifying code you don't understand
- Over-abstracting (3 files for a 10-line utility)
- Mixing simplification with feature additions

---

**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/epicsagas/epic-harness/skills/simplify/SKILL.md`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.