agentleFS
LegendAppLegendApp/legend-skills/simplify/SKILL.md

simplify

Skill40 starsChanged 58 days agoMITView on GitHub

Simplify the requested code or diff while preserving behavior and meaningful coverage.

73 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use clonedeps, deepwork 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.
  • hbollonSkill

    clonedeps

    Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use when the user asks to clone dependencies, inspect dependency/source internals, understand SDK/framework behavior from source, debug library implementation details, or make core dependency repos locally readable. Do not use for ordinary API/docs questions where @librarian is enough.

    Also in 3 projects that use this

  • hbollonSkill

    deepwork

    Orchestrator-only workflow for heavy coding sessions, multi-phase implementation, and risky refactors. Use for complex work that needs planning, review gates, and persistent progress tracking.

    Also in 3 projects that use this

  • JordanCoinSkill

    codemap

    Analyze codebase structure, dependencies, changes, cross-agent handoffs, and get code-aware intelligence. Use when user asks about project structure, where code is located, how files connect, what changed, how to resume work, before starting any coding task, when you need risk analysis and skill guidance, or when Codemap should tune project config before analysis.

    Also in 4 projects that use this

  • llama-farmSkill

    commit-push-pr

    Commit changes, push to GitHub, and open a PR. Includes quality checks (security, patterns, simplification). Use --quick to skip checks.

    Also in 3 projects that use this

  • nicolasestremSkill

    finalize

    Complete project finalization with quality gates and git workflow automation.

    Also in 3 projects that use this

  • PostHogSkill

    react-doctor

    Diagnose and fix React codebase health issues. Use when reviewing React code, fixing performance problems, auditing security, or improving code quality.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 71 edited versions we read keep these.

  • 10

    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:

    When changes are requested, implement directly and reuse existing mechanisms where they fit.

    line 22
  2. Distinctive:

    Prefer deletion, reuse, or a direct change over a new abstraction.

    line 28
  3. Distinctive:

    Keep one source of truth; avoid mirrored state, overlapping guards, duplicate registries, and compensating mechanisms.

    line 29
  4. Distinctive:

    Avoid speculative fallbacks, compatibility paths, configuration, parameters, and generic APIs.

    line 30
  5. Distinctive:

    Prefer straightforward positive control flow over early-return chains or empty branches.

    line 32
  6. Distinctive:

    When duplicate or ineffective regression coverage is suspected, deliberately break the claimed invariant and confirm the remaining test …

    line 40
  7. Distinctive:

    Do not rewrite branch history without authorization.

    line 42
  8. Distinctive:

    Do not replace clear code with compressed or clever code merely to reduce lines.

    line 51
  9. Distinctive:

    Leave unrelated and user-authored changes untouched.

    line 53
  10. Distinctive:

    Stop when every remaining concept supports a requirement, invariant, clarity, or measured performance need.

    line 55

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

Produce the smallest clear implementation that fully satisfies the required behavior. Minimize concepts and moving parts, not line count.

Cadence

  • During construction, apply the priorities locally while discovering behavior. Allow clearly temporary instrumentation or scaffolding when it accelerates learning.
  • At convergence, once a logical behavior slice passes, simplify that slice, remove superseded attempts, and rerun focused validation.
  • For an explicitly requested branch audit, compare with the intended base. Otherwise review only the requested change; do not broaden a small cleanup into a whole-branch audit.

Workflow

  1. Identify the required behavior, invariants, constraints, and non-goals.
  2. Inspect the relevant diff and separate it into logical concepts. For a final branch audit, compare the full branch with its merge base and check history for superseded attempts when relevant.
  3. Inspect the existing owners, sources of truth, common path, and decision points before adding anything.
  4. Choose the design with the fewest necessary concepts and the least work at runtime.
  5. When changes are requested, implement directly and reuse existing mechanisms where they fit.
  6. Validate behavior with checks proportional to the risk.
  7. Review the final code, tests, names, comments, documentation, configuration, and relevant history for anything that no longer earns its complexity.

Simplification Priorities

  • Prefer deletion, reuse, or a direct change over a new abstraction.
  • Keep one source of truth; avoid mirrored state, overlapping guards, duplicate registries, and compensating mechanisms.
  • Avoid speculative fallbacks, compatibility paths, configuration, parameters, and generic APIs.
  • Inline one-use helpers when doing so makes the policy clearer at its decision point.
  • Prefer straightforward positive control flow over early-return chains or empty branches.
  • On hot paths, minimize allocations, callback recreation, subscriptions, renders, passes, I/O, and native work.
  • For prose, remove repetition and keep the shortest wording or example that remains self-sufficient.

Existing Work

Establish a passing baseline before simplifying working code. Test one questionable concept at a time, rerun the relevant validation, and restore it if behavior or meaningful coverage weakens. Do not restructure several accumulated fix attempts before establishing which changes are causally necessary.

When duplicate or ineffective regression coverage is suspected, deliberately break the claimed invariant and confirm the remaining test fails. Passing tests alone do not prove that every test or implementation concept is necessary.

Do not rewrite branch history without authorization.

Performance Changes

Name the exact common-path work being removed: allocations, scans, mounts, renders, subscriptions, I/O, or native calls. Control-flow evidence plus regression tests can justify removing work that is structurally unused. Require a benchmark, profile, or repeated repro when an optimization changes semantics or introduces a tradeoff. Do not add complexity for theoretical gains.

Guardrails

  • Preserve correctness, required behavior, type safety, distinct regression coverage, and useful clarity.
  • Do not replace clear code with compressed or clever code merely to reduce lines.
  • Make scoped, behavior-preserving improvements directly. If the better design requires a sweeping API or architecture change, explain and suggest it instead of expanding the task without approval.
  • Leave unrelated and user-authored changes untouched.

Stop when every remaining concept supports a requirement, invariant, clarity, or measured performance need. Report only material simplifications, validation, and unresolved opportunities.

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.