agentleFS
kumaran-iskumaran-is/claude-code-onboarding/.claude/skills/code-simplifier/SKILL.md

code-simplifier

Skill36 starsChanged 6 months agoMITView on GitHub

Reviews code for unnecessary complexity, excessive nesting, redundant abstractions, and over-engineering. Use when code feels over-engineered, before PRs, or after implementations. Complements code-reviewer (correctness) by focusing purely on simplicity and readability.

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use performance, setup-matt-pocock-skills and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • pluginagentmarketplaceSkill

    performance

    Optimize application performance through caching strategies, load balancing, database scaling, and monitoring. Build systems handling thousands of concurrent users.

    Also in 3 projects that use this

  • AWSSkill

    setup-matt-pocock-skills

    Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

    Also in 3 projects that use this

  • AWSSkill

    to-spec

    Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 9 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 5 projects that use this

  • NVIDIASkill

    deep-research

    Queue deep, multi-step research and analysis tasks to the DeepAgents worker. Supports execution depth presets, request-specific rubrics, SubAgent delegation, and RubricMiddleware cross-validation.

    Also in 3 projects that use this

  • +2 more from aws

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Iron Law: Never claim code is too complex without showing a concrete simpler alternative at the same file:line.

    line 17
  2. Distinctive:

    Before opening a PR on new implementation

    line 26
  3. Distinctive:

    When a reviewer says "couldn't you just do X?"

    line 27
  4. Distinctive:

    After implementing a feature that grew beyond its original scope

    line 28

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Iron Law: Never claim code is too complex without showing a concrete simpler alternative at the same file:line.

Code Simplifier

Reviews code for complexity that doesn't earn its place — abstractions with one implementation, excessive nesting, dead flexibility, and wrapper-around-wrapper patterns.

When to Use

  • Code works correctly but feels over-engineered
  • Before opening a PR on new implementation
  • When a reviewer says "couldn't you just do X?"
  • After implementing a feature that grew beyond its original scope

What to Check

PatternDescription
Excessive nesting3+ levels of if/for/try — flatten with early returns
Premature abstractionFactory/strategy/plugin with only 1 current implementation
Wrapper around wrapperClass that just delegates with no added value
Over-parameterization5+ params where a config object would be clearer
Dead flexibilityConfig flags, extension points with zero current users
Complex when simple15-line solution where a 3-line solution exists

Severity Levels

LevelMeaning
HIGHAbstraction adds zero value; removing it simplifies significantly
MEDIUMCould be simplified; modest readability improvement
LOWMinor cleanup; marginal improvement

Output Format

## Simplification Review: [scope]

### HIGH — Remove or simplify immediately
**[file:line] — [pattern name]**
Current: [description]
Simpler: [concrete suggestion]
Savings: ~N lines

### MEDIUM — Should simplify
- [file:line] [description] — [suggestion]

### Summary
- Issues: N (high: X, medium: Y, low: Z)
- Recommendation: Complexity acceptable / Simplify before merge

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.