agentleFS
UsmanBukUsmanBuk/Skills/skills/simplify/SKILL.md

simplify

Skill0 starsChanged 8 days agoMITView on GitHub

Simplify existing code without changing its intended behavior. Use when the user invokes $simplify, asks to simplify or clean up the current diff, reduce unnecessary complexity or duplication, improve reuse/readability/efficiency, or requests behavior like Claude's /simplify workflow. Default to uncommitted changes unless the user names another scope. Do not use for net-new feature work, broad redesigns, or formatting-only requests.

130 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use codex-system, design-tracker 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.
  • gaebalaiSkill

    codex-system

    PROACTIVELY consult Codex CLI, your highly capable supporter with exceptional reasoning and task completion abilities. Codex is a trusted expert you should ALWAYS consult BEFORE making decisions on: design choices, implementation approaches, debugging strategies, refactoring plans, or any non-trivial problem. When uncertain, consult Codex. Don't hesitate - Codex provides better analysis. Explicit triggers: "think deeper", "analyze", "second opinion", "consult codex".

    Also in 4 projects that use this

  • gaebalaiSkill

    design-tracker

    PROACTIVELY track and document project design decisions without being asked. Activate automatically when detecting architecture discussions, implementation decisions, pattern choices, library selections, or any technical decisions. Also use when user explicitly says "記録して", "設計どうなってる", "record this". Do NOT wait for user to ask - record important decisions immediately.

    Also in 4 projects that use this

  • mike22890Skill

    clonedeps

    将项目依赖的第三方库源码克隆到本地,便于深入阅读和调试。当需要查看库的实现细节、阅读源码、调试第三方依赖、理解 SDK/framework 内部机制、查看 node_modules 之外的原始代码、分析开源库架构、学习他人代码、查看依赖的 TypeScript 类型定义时使用。

    Also in 3 projects that use this

  • paulingramSkill

    verification-planning

    Use BEFORE verifying any claim -- fix, feature, deploy, diagnosis -- to choose HOW. Enumerate venues (local, dev, replay, seeded fixture, prod read-only), pick the cheapest faithful one, record a verification_plan. Adds cheaper-faithful-method-found; a gate needing a live environment makes the run PROVIDE one.

    Also in 3 projects that use this

  • codebycoreySkill

    batch

    Create multiple proposals from free-form feature descriptions. Use when planning several features at once, batch creating proposals, or setting up related changes.

    Also in 4 projects that use this

  • mehd-ioSkill

    dataviz

    Also in 3 projects that use this

  • +6 more from gaebalai

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 119 edited versions we read keep these.

  • 17

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Read applicable repository instructions before evaluating code.

    line 14
  2. Distinctive:

    Use the files, commit, branch, or PR explicitly named by the user.

    line 16
  3. Distinctive:

    If the working tree is clean, ask for a scope instead of simplifying unrelated code.

    line 18
  4. Distinctive:

    When subagents are available, run these lanes in parallel as read-only reviewers.

    line 26
  5. Distinctive:

    Prefer a well-matched existing abstraction over adding another one.

    line 34
  6. Distinctive:

    Do not create generic helpers for a single speculative future use.

    line 36
  7. Distinctive:

    Look for avoidable branches, nesting, state, indirection, weak names, stale comments, leaky abstractions, and error handling that obscures …

    line 40
  8. Distinctive:

    Prefer direct control flow and explicit data shapes over clever compression.

    line 44
  9. Distinctive:

    Remove dead code only when the selected scope proves it unreachable or unused.

    line 45
  10. Distinctive:

    Do not turn a simplification pass into a performance project.

    line 53
  11. Distinctive:

    Keep comments only for non-obvious intent.

    line 73
  12. Distinctive:

    Do not modify generated files or unrelated lint/test failures.

    line 74
  13. Distinctive:

    Do not commit, push, open a PR, or mutate tickets unless the user separately requests it.

    line 75
  14. Distinctive:

    Run focused tests for changed behavior, followed by broader checks in proportion to risk.

    line 80
  15. Distinctive:

    Run formatter, type, lint, and diff-whitespace checks applicable to touched files.

    line 81
  16. Distinctive:

    If behavior preservation cannot be demonstrated, revert or revise the risky simplification.

    line 83
  17. Distinctive:

    Keep the report concise. Do not praise churn or report line-count reduction as proof of quality.

    line 94

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

Make the smallest behavior-preserving improvements that leave the selected code easier to understand, maintain, and execute. Treat a smaller diff as a constraint, not an objective by itself: do not trade correctness or clarity for fewer lines.

Establish scope and baseline

  1. Read applicable repository instructions before evaluating code.
  2. Resolve the scope in this order:
    • Use the files, commit, branch, or PR explicitly named by the user.
    • Otherwise use staged, unstaged, and untracked code in the current repository.
    • If the working tree is clean, ask for a scope instead of simplifying unrelated code.
  3. Inspect the full changed functions and their important callers, not only diff hunks.
  4. Preserve pre-existing user changes and exclude generated, vendored, and unrelated files.
  5. Identify the narrowest relevant validation commands. Run a baseline check when practical; record unrelated failures instead of silently absorbing them into the task.

Review in three lanes

When subagents are available, run these lanes in parallel as read-only reviewers. Give each reviewer the raw diff and relevant files, not proposed answers. Keep all editing in the main agent. When subagents are unavailable, perform the same lanes sequentially.

Reuse

  • Find new logic that duplicates an existing helper, constant, type, query, component, or established project pattern.
  • Prefer a well-matched existing abstraction over adding another one.
  • Consolidate duplication only when the shared concept is stable and the result is clearer.
  • Do not create generic helpers for a single speculative future use.

Quality

  • Look for avoidable branches, nesting, state, indirection, weak names, stale comments, leaky abstractions, and error handling that obscures the main path.
  • Preserve public contracts, error semantics, authorization boundaries, persistence behavior, and user-visible behavior unless the user explicitly authorizes a change.
  • Prefer direct control flow and explicit data shapes over clever compression.
  • Remove dead code only when the selected scope proves it unreachable or unused.

Efficiency

  • Find repeated I/O, duplicate queries, unnecessary renders or allocations, redundant passes, and obviously poor algorithmic work introduced or exposed by the selected changes.
  • Optimize only where the benefit is concrete. Avoid caching, concurrency, batching, or data model changes without evidence that they are safe and useful.
  • Do not turn a simplification pass into a performance project.

Decide what to change

For every finding, require all of the following:

  • The current code provides concrete evidence of the issue.
  • The proposed edit reduces complexity, duplication, or unnecessary work.
  • Intended behavior and external contracts remain unchanged.
  • The improvement is proportionate to the risk and diff size.
  • A relevant check can verify the result, or the limitation can be stated clearly.

Skip subjective rewrites, broad renames, dependency swaps, architecture changes, style churn, and abstractions justified only by possible future needs. If nothing meets the bar, make no code changes and report that the code is already appropriately simple.

Implement

  1. State the simplifications worth making and the behavior that must remain invariant.
  2. Apply one surgical group of edits at a time.
  3. Keep comments only for non-obvious intent; update comments that no longer match the code.
  4. Do not modify generated files or unrelated lint/test failures.
  5. Do not commit, push, open a PR, or mutate tickets unless the user separately requests it.

Verify

  1. Re-read the final diff and confirm every changed line serves the simplification.
  2. Run focused tests for changed behavior, followed by broader checks in proportion to risk.
  3. Run formatter, type, lint, and diff-whitespace checks applicable to touched files.
  4. Compare against the baseline and distinguish new failures from existing failures.
  5. If behavior preservation cannot be demonstrated, revert or revise the risky simplification.

Report

Lead with whether the code was simplified and is ready for review. Summarize:

  • Simplifications applied and why they are clearer or cheaper.
  • Validation performed and exact outcomes.
  • Findings deliberately not changed because they were speculative, behavioral, or out of scope.
  • Any remaining risk or pre-existing failure.

Keep the report concise. Do not praise churn or report line-count reduction as proof of quality.

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.