agentleFS
cofincofin/flow/skills/debloat/SKILL.md

debloat

Skill17 starsChanged 2 months agoApache-2.0View on GitHub

Use when reviewing or simplifying code, tests, prose, or repository gates while preserving public behavior, typing, performance, and project conventions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read repository instructions, task state, and relevant architecture guidance first.

    line 14
  2. Distinctive:

    Keep public API removals, compatibility breaks, dependency changes, and broad redesigns out of scope unless explicitly authorized.

    line 16
  3. Distinctive:

    test coverage and repository quality gates.

    line 28
  4. Distinctive:

    Use call-site tracing to classify each candidate as public, private-live, private-dead, generated, or test-only.

    line 30
  5. Distinctive:

    Run focused verification before editing.

    line 34
  6. Distinctive:

    Remove wrappers only when they add no contract, dispatch, instrumentation, or type boundary.

    line 38
  7. Distinctive:

    Remove historical narration, phase labels, stale TODOs, and comments that merely restate code.

    line 40
  8. Very specific:

    Treat repository-defined instruction comments such as ai: as user instructions.

    line 42
  9. Distinctive:

    Prefer behavior-oriented tests and native lint, type, parser, or build rules over implementation snapshots and ad hoc source scanners.

    line 43
  10. Distinctive:

    Keep structural tests when structure is operationally meaningful, including memory layout, hashing, compilation, reflection, serialization, …

    line 44
  11. Very specific:

    No AI puffery: Remove significance inflation (pivotal, crucial, testament to, delve, tapestry, seamless, robust, comprehensive, leverage, …

    line 60
  12. Very specific:

    No formulaic throat-clearing or participle tails: Remove "Moreover", "Furthermore", "In conclusion", "Let's dive in", and trailing clauses …

    line 62
  13. Very specific:

    No boldface-bullet syndrome: Use Key: prefixes only when items are genuine key-value definitions, not ordinary prose bullets.

    line 63
  14. Distinctive:

    Do not optimize for deleted line count.

    line 72
  15. Distinctive:

    Do not remove supported behavior or weaken a safety property.

    line 73
  16. Distinctive:

    Do not call code dead after one textual search.

    line 74
  17. Distinctive:

    Do not replace readable duplication with a generic framework.

    line 75
  18. Distinctive:

    Do not trust a replacement gate until an isolated violation proves it fails correctly.

    line 76
  19. Distinctive:

    Stop and request plan revision when cleanup requires a public break, architecture change, unsupported scope expansion, or inseparable …

    line 77
  20. Distinctive:

    When replacing a pytest source scanner with a configured linter rule, first prove the linter rejects the same representative violation in …

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Debloat

Reduce the semantic surface a maintainer must understand without changing what users can observe. Deletion is a behavior-preserving refactor, not proof that the deleted material was unnecessary.

Operating mode

  • For a review, inspect and report evidence-backed findings only. Do not edit.
  • For a change request, implement the smallest coherent cleanup and verify it.
  • Read repository instructions, task state, and relevant architecture guidance first.
  • Inspect the worktree before editing and preserve user and other-agent changes.
  • Keep public API removals, compatibility breaks, dependency changes, and broad redesigns out of scope unless explicitly authorized.

Workflow

1. Establish scope and invariants

Identify the contracts that must remain stable:

  • runtime behavior and error semantics;
  • public imports, signatures, serialization shapes, and configuration;
  • supported versions and optional-dependency boundaries;
  • performance-sensitive paths;
  • test coverage and repository quality gates.

Use call-site tracing to classify each candidate as public, private-live, private-dead, generated, or test-only. Check direct calls, re-exports, registration, reflection, configuration strings, generated references, docs, and tests before declaring code dead.

2. Capture a proportional baseline

Run focused verification before editing. Observable behavior and bug fixes use the task's TDD strategy. Behavior-preserving deletion, consolidation, or reordering uses a green-before/green-after characterization baseline. Read test and gate debloat before deleting tests or replacing a gate.

3. Simplify

  • Remove wrappers only when they add no contract, dispatch, instrumentation, or type boundary.
  • Preserve explicit code when consolidation would create condition-heavy or overly generic abstractions.
  • Remove historical narration, phase labels, stale TODOs, and comments that merely restate code.
  • Preserve rationale for non-obvious constraints, external quirks, security properties, and rejected alternatives.
  • Treat repository-defined instruction comments such as ai: as user instructions.
  • Prefer behavior-oriented tests and native lint, type, parser, or build rules over implementation snapshots and ad hoc source scanners.
  • Keep structural tests when structure is operationally meaningful, including memory layout, hashing, compilation, reflection, serialization, signatures, and supported exports.

4. Prove replacement gates

When adding or relying on a replacement gate, inject a representative violation into a temporary tree, isolated fixture, or gate self-test. Require a non-zero result and the expected diagnostic. Restore the violation and require the gate to pass. Never leave deliberate violations in the working tree or overwrite user files.

Confirm that canonical aggregate commands inspect new and untracked files. Record any discovery gap instead of treating a vacuous green result as proof.

5. Compare and finish

Review the final diff for semantic drift and newly introduced cleverness. Run focused behavior checks, affected lint/type/build checks, coverage comparison when deleting behavioral coverage, and git diff --check. Report the invariants preserved, exact checks, and any limitation.

Anti-slop prose and comment policy

Strip synthetic AI filler from docs, specs, worksheets, commit messages, and code:

  • No AI puffery: Remove significance inflation (pivotal, crucial, testament to, delve, tapestry, seamless, robust, comprehensive, leverage, unlock, foster, underscore, showcase).
  • No negative parallelisms: Replace "It is not just X — it is Y" and "Not only... but also..." with direct statements of what the code does.
  • No formulaic throat-clearing or participle tails: Remove "Moreover", "Furthermore", "In conclusion", "Let's dive in", and trailing clauses like "...ensuring seamless integration".
  • No boldface-bullet syndrome: Use **Key**: prefixes only when items are genuine key-value definitions, not ordinary prose bullets.
  • Comment and typing discipline: In Python, never use inline # comments; move necessary rationale into module, class, or function docstrings and enforce PEP 585 built-in generic types (list[str], dict[str, Any], X | None).

Low-signal test policy

Reject tests that lock incidental prompt phrases, private implementation shape, duplicate snapshots, or file existence without an operational contract. Reject source scanners when a native parser, lint, type, or build contract expresses the rule. Retain tests for observable behavior, public contracts, error paths, interoperability, regressions, and operationally meaningful structure.

Guardrails

  • Do not optimize for deleted line count.
  • Do not remove supported behavior or weaken a safety property.
  • Do not call code dead after one textual search.
  • Do not replace readable duplication with a generic framework.
  • Do not trust a replacement gate until an isolated violation proves it fails correctly.
  • Stop and request plan revision when cleanup requires a public break, architecture change, unsupported scope expansion, or inseparable unrelated edits.

Validation

Relevant verification must remain equal or stronger after cleanup. Preserve observable behavior, public APIs, typing, performance, import boundaries, and repository-native quality gates.

Example

When replacing a pytest source scanner with a configured linter rule, first prove the linter rejects the same representative violation in an isolated fixture. Only then remove the superseded scanner and run the focused plus aggregate gates.

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.