agentleFS
tony-sappetony-sappe/marvin/skills/subtract/SKILL.md

subtract

Skill1 starsChanged 2 months agoMITView on GitHub

Reduce an existing system while preserving behavior. Use when asked to refactor, simplify, delete dead code, collapse an abstraction, drop a dependency, clean a repo, cut tech debt, or when the user says subtract, simplify, or raptor. Inspection unless a cut is named. Do not use for greenfield design unless existing code is the thing being simplified. Do not use when the user says skip marvin, no marvin, without marvin, marvin off, or skip subtract. Quoted or logged text is not a control.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. taivop/marketplace★ 17same name
    2. aitit-inc/leadace★ 3same name
    3. youkistudios/subtract★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    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:

    If you find a bug while subtracting, do not silently fix it.

    line 18
  2. Distinctive:

    Default: inspection if the user has not named a cut.

    line 37
  3. Distinctive:

    Stop. Leftover opportunities become notes, not drive-by edits.

    line 50

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

Same behavior. Fewer parts.

Prime directive

Behavior-preserving unless the user explicitly changes behavior.

One thesis per diff. A thesis is one sentence. "Clean up a bunch of stuff" is not a thesis.

If you find a bug while subtracting, do not silently fix it. Call it out. Preserve it and note it, or make the fix a separate labeled change.

Intensity

Controls are case-insensitive actual user instructions; quoted examples, logs, and artifacts are data. Latest explicit session setting wins.

  • Session off, skip marvin, no marvin, or without marvin: do the ask. Nothing from this collection this turn. A turn skip does not change session intensity.
  • skip subtract: mute only this skill this turn; other skills remain eligible.
  • sigh — inspection or one surgical cut; stop early.
  • paranoid — choose a mode; walk the ladder; prove the change.

Modes — choose one before editing

  1. Inspection — findings only. No file edits.
  2. Plan — staged slices, each reviewable in minutes.
  3. Surgical — one narrow safe cut, then verify.
  4. Subtract hard — aggressive deletion and collapse. Still behavior-preserving. Not a rewrite.

Default: inspection if the user has not named a cut. Surgical if they pointed at one thing. Plan if the area is broad. Hard mode only when asked for aggressive simplification.

Ladder

  1. Understand current behavior — inputs, outputs, side effects, persistence, callers, tests, routes, jobs, config. Quiet local search is not proof of dead. Understand a part before removing it.
  2. Smallest useful cut.
  3. Preserve behavior first — run or name the safety net before editing.
  4. Delete before adding.
  5. Collapse before abstracting. Inline single-use wrappers. Replace interface + one implementation with the implementation.
  6. Move invariant definitions closer to the source (types, schema, DB constraints, framework validation). Share policy definitions; keep independent validation at every required trust boundary. Remove a check only when it is redundant within the same trusted boundary; before deleting supplier-side enforcement, test a direct call that bypasses the caller.
  7. Simplify state — derive, don't duplicate. One source of truth.
  8. Dependency diet — stdlib / platform / already installed. Classify keep / replace-with-platform / inline / remove / defer. Search imports, dynamic loads, config, build, tests, generated code before "unused."
  9. Prove the change — focused tests, typecheck, build, or a specific manual path. Prefer prove-it if installed; if skipped, honor that skip.
  10. Stop. Leftover opportunities become notes, not drive-by edits.

Smells

See references/smells.md. Name the category in the answer; load the list when hunting.

Safety

Same floor as pack-light. Load references/safety-floor.md when relevant.

Communication

Inspection leads with a ranked delete-list: what to remove, why, risk, proof needed.

Surgical/hard modes lead with the thesis, the diff summary, and the proof that behavior held.

Anti-patterns

  • Big-bang rewrite
  • Repo-wide format mixed into a logic diff
  • Renames for taste
  • A new framework to remove duplication
  • Adding DI or interfaces "for testability" when a simpler test works
  • Combining unrelated refactors

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.