agentleFS
lordmaculordmacu/nexo-rs/skills/simplify/SKILL.md

Simplify

Skill8 starsChanged 7 months agoApache-2.0View on GitHub

Bounded simplification pass for a file or hunk that preserves behavior while reducing complexity.

119 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 3 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 3 projects that use this

  • mike22890Skill

    clonedeps

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

    Also in 3 projects that use this

  • mdrubelamin2Skill

    verification-planning

    Plans how to prove a change works or broke nothing: frames the claim, designs an evidence path from the system itself, and requires every check to be able to fail.

    Also in 3 projects that use this

  • devbrother2024Skill

    artifact-design

    단독 self-contained HTML 산출물(랜딩 페이지, 정적 문서·리포트, 독립 대시보드, 데모·게임, 개발 전 UX/UI 대안 비교 목업)을 만들 때 팔레트·타이포그래피·레이아웃을 의도적으로 설계하고 템플릿·AI스러운 디자인을 피하도록 돕는 디자인 가이드. HTML/CSS를 쓰기 전에 로드한다. "랜딩 만들어줘", "이 내용 단일 HTML로 예쁘게", "UX 대안 HTML로 비교해줘", "디자인 잡아줘"처럼 단독 HTML 아티팩트를 만들거나 비교하는 요청에 활성화하고, 기존 앱(React·Vue 등)의 인앱 컴포넌트 수정이나 순수 백엔드·로직 작업에는 쓰지 않는다.

    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

  • +3 more from gaebalai

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 111 edited versions we read keep these.

  • 9

    Distinctive

    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:

    If structured args are provided, use them directly.

    line 37
  2. Very specific:

    If target is still missing, ask for one concrete file or hunk.

    line 46
  3. Distinctive:

    Read the target and identify purpose, invariants, and public interfaces.

    line 51
  4. Distinctive:

    remove dead code / unreachable branches

    line 54
  5. Very specific:

    If preserve_behavior=true, avoid interface/semantic changes.

    line 60
  6. Distinctive:

    If a behavior change seems necessary, stop and ask for confirmation.

    line 61
  7. Very specific:

    Run targeted checks (lint/test/build scope relevant to changed files).

    line 63
  8. Very specific:

    no further meaningful simplification remains (status=already_simple), or

    line 65
  9. Distinctive:

    Never run unbounded refactor loops.

    line 72
  10. Distinctive:

    Do not introduce speculative abstractions with no local payoff.

    line 73
  11. Distinctive:

    Do not touch unrelated files "while here".

    line 74
  12. Distinctive:

    Prefer small, reviewable edits over sweeping rewrites.

    line 75
  13. Distinctive:

    Keep comments only for non-obvious WHY.

    line 76

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

Simplify code in a bounded, evidence-driven way: smaller, clearer, and easier to maintain while preserving behavior unless the user explicitly asks otherwise.

Use when

  • User asks for refactor/cleanup without adding new features.
  • A file or hunk looks noisy (duplication, dead code, redundant guards).
  • You need clearer names and tighter structure with minimal risk.

Do not use when

  • User is requesting new behavior or a product-level redesign.
  • You do not have a concrete target file/hunk.
  • The change would require broad API/contract breakage without approval.

Input contract

  • target (required): file path or hunk identifier to simplify.
  • scope (optional): file or hunk (default file).
  • max_passes (optional): default 2, clamp to [1, 4].
  • preserve_behavior (optional): default true.
  • focus (optional): subset of reuse, dead_code, redundant_guards, naming, duplication, efficiency.

Parsing rules (priority order)

  1. If structured args are provided, use them directly.
  2. Else infer from user language:
    • "this file", explicit path, or pasted diff -> target
    • "just this block/hunk" -> scope=hunk
    • "two passes/max 3 rounds" -> max_passes
    • "don't change behavior" -> preserve_behavior=true
    • keywords like "remove dead code", "rename", "dedupe" -> focus
  3. Defaults:
    • scope=file, max_passes=2, preserve_behavior=true
  4. If target is still missing, ask for one concrete file or hunk.

Canonical workflow

  1. Understand baseline
    • Read the target and identify purpose, invariants, and public interfaces.
  2. Run bounded simplify passes (1..max_passes)
    • Apply only high-signal improvements:
      • remove dead code / unreachable branches
      • collapse redundant guards and repeated conditionals
      • deduplicate copy-paste logic into local helpers where appropriate
      • improve naming for intent clarity
      • replace ad-hoc logic with existing utilities when available
  3. Behavior safety check
    • If preserve_behavior=true, avoid interface/semantic changes.
    • If a behavior change seems necessary, stop and ask for confirmation.
  4. Verification
    • Run targeted checks (lint/test/build scope relevant to changed files).
  5. Stop when:
    • no further meaningful simplification remains (status=already_simple), or
    • simplification applied safely (status=simplified), or
    • blocked by missing context/approval (status=needs_user_input), or
    • pass budget reached (status=max_passes_reached).

Guardrails

  • Never run unbounded refactor loops.
  • Do not introduce speculative abstractions with no local payoff.
  • Do not touch unrelated files "while here".
  • Prefer small, reviewable edits over sweeping rewrites.
  • Keep comments only for non-obvious WHY; remove narrative noise.

Output format

Always return:

  • status: simplified | already_simple | needs_user_input | max_passes_reached
  • passes_run: number of simplify passes executed
  • target: normalized file/hunk target
  • focus_used: normalized focus dimensions
  • changes: concise bullet list of concrete simplifications
  • behavior_safety: why behavior is preserved (or what approval is needed)
  • verification: checks run + outcomes
  • next_action: required unless status=simplified or already_simple

Examples

  • target="crates/core/src/agent/mod.rs" max_passes=2 focus="dead_code,redundant_guards"
  • target="src/main.rs#L120" scope="hunk" preserve_behavior=true
  • target="diff:latest" focus="reuse,duplication,naming" max_passes=3

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.