agentleFS
LinardsLiepenieksLinardsLiepenieks/honecode/skills/simplify-code/SKILL.md

simplify-code

Skill0 starsChanged 2 months agoMITView on GitHub

Sweeps the code changed this session for code smells (dead code, duplication, data clumps, misplaced responsibility, speculative generality) by spawning read-only sub-agents in parallel, then applies the fixes that simplify without changing behavior. One pass, not a loop; correctness belongs to harden-code. Use after a refactor or feature, or when the user says "simplify", "clean up", or "code quality pass".

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use competitor-news-monitor, blocked-page-recovery and 10 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.
  • aivrarSkill

    competitor-news-monitor

    Watch named companies for material news; cited digests.

    Also in 7 projects that use this

  • aivrarSkill

    blocked-page-recovery

    Recover blocked/paywalled/WAF'd pages via fallbacks.

    Also in 7 projects that use this

  • john-data-chenSkill

    teams-meeting-pipeline

    Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

    Also in 8 projects that use this

  • mae616Skill

    p5js

    p5.js(クリエイティブコーディング)のProcessing由来「コードでスケッチ」思想を軸に、setup/drawループ・座標系・インタラクション・パフォーマンス最適化を整理する。p5.js、Processing、クリエイティブコーディング、ジェネラティブアート、インタラクティブ表現、ビジュアルプログラミング、Canvas描画、パーティクル、フラクタル、ノイズ表現に関する相談で必ず使うこと。ユーザーが「コードでアート」「動くビジュアル」「インタラクティブな描画」と言った場合にも適用する。

    Also in 11 projects that use this

  • john-data-chenSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 5 projects that use this

  • Tommy-ywSkill

    popular-web-designs

    54 production-quality design systems extracted from real websites. Load a template to generate HTML/CSS that matches the visual identity of sites like Stripe, Linear, Vercel, Notion, Airbnb, and more. Each template includes colors, typography, components, layout rules, and ready-to-use CSS values.

    Also in 11 projects that use this

  • +4 more from aivrar

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 28 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Leave alone: bugs, crashes, data loss (note them for harden-code, don't fix here).

    line 20
  2. Very specific:

    Dispatch in parallel: read-only sub-agents, each given its file list and slice name, each returning findings as file:line · smell · …

    line 26

“Common” is measured: kept by at least 6 in 10 of the 28 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

Simplify recently-changed code

One quality pass over the code changed this session: read-only sub-agents surface code smells, you apply the ones worth applying. Not a loop: one pass, done. Correctness (crashes, data loss, contract changes) is harden-code's job; this skill is simplicity only. If nothing changed, ask which scope to use.

The bar is simplicity. The goal is clear, clean-cut features built on the codebase's established patterns, not bells and whistles, and no scaffolding for features that don't exist yet. If a simpler shape does the same job, or an existing pattern already covers it, that's the finding.

Smells to surface

  • Dead code: unused functions, unreachable branches, orphaned exports, commented-out blocks.
  • Duplicate code: the same logic in two places, near-duplicate functions, repeated validation.
  • Data clumps: the same field group or shape redeclared inline across files that should be one shared type/schema.
  • Misplaced responsibility: logic in the wrong layer (business rules in transport, validation in storage, presentation in domain models); anything that violates the separation of concerns CLAUDE.md defines.
  • Speculative generality: abstraction, indirection, or config built for a future that hasn't arrived (per CLAUDE.md's restraint rule).

Leave alone: bugs, crashes, data loss (note them for harden-code, don't fix here); behavior-changing performance tweaks; and nits the formatter already handles.

Process

  1. Scope: the files changed this session (ask if you can't tell reliably).
  2. Partition: group them into cohesive slices, one per import neighborhood or feature path; one sub-agent per slice.
  3. Dispatch in parallel: read-only sub-agents, each given its file list and slice name, each returning findings as file:line · smell · suggested fix. They advise; they never edit.
    • Adversarial variant (agent team): when agent teams are enabled, run this as a team of QA skeptics instead. Each teammate owns a slice, argues that its code isn't earning its keep (is this abstraction premature, does this deviate from an established pattern, is this bell-and-whistle wanted by an actual feature), and teammates cross-examine each other before reporting. A smell that survives the challenge is worth applying.
  4. Triage: apply a finding only if it simplifies and preserves behavior. Skip anything that changes behavior, contradicts CLAUDE.md conventions, or doesn't survive your own scrutiny, each skip with a one-line reason.
  5. Apply the survivors yourself: you have the context, don't delegate to a fixer.
  6. Report, per slice: audited, found, applied, skipped and why.

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.