agentleFS
0xrohan100xrohan10/skills/simplify/SKILL.md

simplify

Skill2 starsChanged 4 months agoMITView on GitHub

Behavior-preserving cleanup of a working-tree or explicit base/head diff. Use after implementation or when asked to simplify current or committed changes.

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 9 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

  • 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

  • OpenAISkill

    sentry

    Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry CLI; perform read-only queries using the `sentry` command.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 71 edited versions we read keep these.

  • 6

    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. Distinctive:

    Read the repository instructions that apply to each changed file, including root-to-file AGENTS.md, CLAUDE.md, and any documents they …

    line 13
  2. Distinctive:

    Treat the user's stated focus and intended changes as the boundary.

    line 14
  3. Distinctive:

    test meaning and coverage.

    line 26
  4. Distinctive:

    Run git diff --check, repository-required checks, and the narrowest tests, type checks, lint, builds, or behavioral exercises that cover …

    line 74
  5. Distinctive:

    Every in-scope changed hunk has a recorded pass through all four lenses.

    line 80
  6. Very specific:

    Every finding has an applied or skipped disposition with evidence and a preservation rationale.

    line 81
  7. Distinctive:

    Every applied edit satisfies every item in the preservation contract.

    line 82
  8. Very specific:

    If any statement is false, report BLOCKED and name each unmet statement.

    line 87

“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

Own behavior-preserving cleanup. Produce a smaller, clearer diff while keeping the implemented design intact.

Scope

  1. Resolve the initial diff: use the current working tree by default, or an explicit base/head comparison supplied by the user or calling skill for committed changes. For a committed comparison, record its merge base and head, and verify the head is checked out before editing. Inspect git status --short, the complete initial diff and stat, and relevant hand-authored untracked files.
  2. Read the repository instructions that apply to each changed file, including root-to-file AGENTS.md, CLAUDE.md, and any documents they reference. Derive conventions and validation commands from those instructions, nearby code, package scripts, and CI configuration.
  3. Treat the user's stated focus and intended changes as the boundary. Preserve unrelated work and include generated files only when the task owns their source and regeneration.

Scope is established when the initial diff is reproducible, every in-scope file and applicable instruction is named or inspected, and unrelated changes are identified. The final candidate diff is the post-edit working-tree diff for working-tree scope; for committed scope, it is the recorded merge base compared with the checked-out head plus its staged, unstaged, and relevant untracked cleanup edits.

Preservation Contract

An edit qualifies only when evidence shows that all observable contracts remain equivalent:

  • public APIs, types, inputs, outputs, request/response shapes, and serialization
  • database schemas, persisted data meaning, migrations, and compatibility expectations
  • errors, status codes, logging relied on by consumers, side-effect order, concurrency, and timing guarantees
  • user-visible UI, interactions, accessibility semantics, and state transitions
  • test meaning and coverage; test cleanup retains the same assertions while production equivalence remains independently evidenced

Apply the smallest local edit with affirmative equivalence evidence. Record uncertain, speculative, cross-cutting, or redesign-dependent ideas as skipped. This section is the authoritative preservation boundary for every lens and finding below.

Reviewer Lenses

Review every changed hunk through all four lenses:

LensTargetEvidence to inspect
ConventionsMatch established repository and domain patternsApplicable instructions, neighboring implementations, imports, naming, typing, errors, tests
SimplicityRemove accidental indirection and cognitive loadRedundant wrappers or state, nesting, stale comments, over-generalized functions, needless parameters
DuplicationReuse a natural existing source of truth or a small local shared expressionRepeated parsing, validation, mapping, literals, branches, and nearby helpers without awkward dependencies
DataflowMake work and ownership direct while removing obvious wasteRepeated I/O, N+1 work, unnecessary sequencing or recomputation, leaked listeners, redundant updates

Clear code outranks shorter code. Repository precedent outranks generic taste. Efficiency findings qualify when the simpler dataflow also satisfies the preservation contract.

Finding Record

Maintain one coverage row per in-scope hunk: path:line-range | conventions | simplicity | duplication | dataflow. Mark each lens clear or list its finding IDs so a no-finding pass remains checkable.

Record each actionable opportunity before editing:

id: S1
lens: conventions | simplicity | duplication | dataflow
location: path/to/file.ts:line
evidence:
  current: exact construct in the changed hunk
  precedent: nearby pattern, instruction, caller, or measured waste
issue: concrete accidental complexity
change: smallest proposed edit
preservation: contracts examined and why each remains equivalent
payoff: code, branch, dependency, state, or work removed
risk: low | medium | high
confidence: low | medium | high
disposition: applied | skipped
reason: evidence supporting the disposition
verification: command or inspection tied to this finding

A finding names local evidence and a concrete action. Apply findings only when preservation evidence is complete, confidence is high, and the edit is local and reviewable.

Execution

  1. Review every in-scope hunk against every lens, reading surrounding code and affected callers where equivalence depends on them.
  2. Resolve overlapping findings into one smallest change. Re-read the current file immediately before editing so concurrent work remains intact.
  3. Apply findings sequentially and update each disposition. Inspect the complete resulting diff after all edits.
  4. Run git diff --check, repository-required checks, and the narrowest tests, type checks, lint, builds, or behavioral exercises that cover the edited surfaces. Expand validation when a failure or risk requires it.

Completion Gate

Report SIMPLIFIED only when all statements are true:

  • Every in-scope changed hunk has a recorded pass through all four lenses.
  • Every finding has an applied or skipped disposition with evidence and a preservation rationale.
  • Every applied edit satisfies every item in the preservation contract; no affected contract surface is unaccounted for.
  • The final candidate diff includes every original in-scope hunk and every cleanup edit, contains only intended changes and simplifications, and leaves unrelated working-tree changes intact.
  • git diff --check, every applicable repository-required check, and every selected targeted validation pass.
  • Each omitted or unavailable check is named with the concrete reason and leaves no unsupported success claim.

If any statement is false, report BLOCKED and name each unmet statement. A valid no-edit result records exhaustive lens coverage and explains why no finding qualified.

Report

Return the outcome, applied findings by file, skipped findings with reasons, validation commands and results, and totals. Keep explanations proportional to the evidence.

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.