agentleFS
gaebalaigaebalai/claude-code-orchestrator/.claude/skills/simplify/SKILL.md

simplify

Skill18 starsChanged 9 months agoMITView on GitHub

Simplify and refactor code while preserving functionality and library constraints.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 101 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the file(s) to understand current structure

    line 23
  2. Very specific:

    Check constraints in .claude/docs/libraries/

    line 30
  3. Distinctive:

    Verify it doesn't break library usage

    line 38
  4. Distinctive:

    Always preserve library features/constraints

    line 84
  5. Distinctive:

    Don't change behavior (refactoring only)

    line 86
  6. Distinctive:

    Run tests after each significant change

    line 87

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

Simplify and refactor $ARGUMENTS.

Simplification Principles

  1. Single Responsibility - 1 function = 1 thing
  2. Short Functions - Target under 20 lines
  3. Shallow Nesting - Early return, depth ≤ 2
  4. Clear Naming - Clear enough to not need comments
  5. Type Hints Required - On all functions

Steps

1. Analyze Target Code

  • Read the file(s) to understand current structure
  • Identify complexity hotspots (deep nesting, long functions)
  • List functions/classes to simplify

2. Check Library Constraints

  • Identify libraries used in target code
  • Check constraints in .claude/docs/libraries/
  • Web search for unclear library behaviors

3. Plan Refactoring

For each complexity issue:

  • What change to make
  • Why it improves readability
  • Verify it doesn't break library usage

4. Execute Refactoring

Apply changes following these patterns:

Early Return:

# Before
def process(value):
    if value is not None:
        if value > 0:
            return do_something(value)
    return None

# After
def process(value):
    if value is None:
        return None
    if value <= 0:
        return None
    return do_something(value)

Extract Function:

# Before
def main():
    # 50 lines of mixed concerns
    ...

# After
def main():
    data = load_data()
    result = process_data(data)
    save_result(result)

5. Verify with Tests

uv run pytest -v

Notes

  • Always preserve library features/constraints
  • Web search for unclear points
  • Don't change behavior (refactoring only)
  • Run tests after each significant change

Download now (ZIP)

  • Other versions108 projects use a version of this.

    Word for word · 1

    1. ilhae-ai/claude-code-orchestrator★ 18100% same

    Edited · 1

    1. DeL-TaiseiOzaki/claude-code-orchestra★ 19917% same

    Wrote their own version · 106

    1. Z3Prover/z3★ 13ksame name
    2. aaddrick/claude-desktop-debian★ 5.5ksame name
    3. CherryHQ/cherry-studio-app★ 4ksame name
    4. huggingface/OpenEnv★ 2.8ksame name
    5. meta-pytorch/OpenEnv★ 2.7ksame name
    6. elliothux/open-compute★ 2ksame name
    7. bholmesdev/hubble.md★ 1.5ksame name
    8. kdlbs/kandev★ 1ksame name
    9. truffle-ai/dexto★ 659same name
    10. bex-co/bex★ 577same name

    96 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use verification-planning, clonedeps and 5 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.
    • 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

    • mike22890Skill

      clonedeps

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

      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

    • 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

    • ibahgatSkill

      loop

      Enforce repeated exec-verify-fix cycles until acceptance criteria pass or blockers are explicit.

      Also in 5 projects that use this

    • jaydubya818Skill

      thermo-nuclear-code-quality-review

      Use when the user requests an intentionally strict maintainability review.

      Also in 6 projects that use this

  • In this repository13 other files it gives its agents.

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.