agentleFS
emiliodominguezemiliodominguez/flow-skills/skills/flow-simplify/SKILL.md

flow-simplify

Skill1 starsChanged 47 days agoMITView on GitHub

Targeted cleanup of provably dead code and accidental complexity. Use for dead paths, needless indirection or generated slop, not redesign. Hands off to `flow-review` or `flow-refactor`.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Remove a defensive guard only when input provenance proves it redundant.

    line 28
  2. Very specific:

    Use flow-review for the diff or flow-refactor for a separate ownership or structure problem.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Subtract only where it improves understanding without changing required behavior. Fewer lines is a possible outcome, not the acceptance criterion.

Process

  1. Bound the cleanup, establish relevant checks and preserve unrelated staged/unstaged work. Name the concrete complexity: dead paths, needless indirection, duplicate responsibility, stale comments or generated slop.
  2. Order reduction passes by semantic risk. For large scopes, authorized read-only reviewers can inspect disjoint areas; one writer per file. No arbitrary agent or file-count threshold.
  3. Caller-check before deleting a symbol: imports, dynamic lookup, registries, reflection, routes, config, templates, tests, generated sources, package exports. Repository search cannot see external consumers of a published API.
  4. Mark a deletion CONFIRMED-DEAD only with usage and runtime evidence; keep uncertain exports or negotiate the compatibility change. Keep side-effect imports (registration, polyfills) and license, compiler and tool-directive comments.
  5. Inspect single-use abstractions instead of auto-inlining. Components, Hooks, closures and effects carry identity, state lifetime and evaluation order even with one caller.
  6. Remove a defensive guard only when input provenance proves it redundant. Static types do not validate network, JSON, storage, DOM or JavaScript consumers.
  7. Cut in small steps, run behavior and repository checks, inspect the combined diff. Stop when the stated complexity is resolved.

Anti-patterns

  • Net-negative lines as a quality gate, or every single-use component as waste.
  • Removing imports, comments or guards on regex or type evidence alone.
  • Deleting a public export because internal grep finds no caller.
  • Quietly changing error behavior or component state lifetime.

Done when

  • The targeted code is easier to understand with semantics and compatibility preserved.
  • Deletions have evidence; uncertain consumers remain explicit.
  • Required checks ran on the resulting artifact, not an earlier baseline.

Use flow-review for the diff or flow-refactor for a separate ownership or structure problem.

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.