agentleFS
hsienchiaoleehsienchiaolee/agent-skills/simplify/SKILL.md

simplify

Skill0 starsChanged 50 days agoMITView on GitHub

Simplify code and tests changed by the current pull request, branch, commit range, or local working tree while preserving behavior. Use when the user invokes simplify, asks to clean up or refactor recent changes, reduce duplication or complexity, improve clarity and maintainability, or perform a focused simplification pass before review or commit.

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

22 rules. 0 are common, 21 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 111 edited versions we read keep these.

  • 21

    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 repository instructions and identify its required checks.

    line 14
  2. Distinctive:

    Add all staged, unstaged, and untracked changes to that committed scope.

    line 22
  3. Distinctive:

    If the scope is empty, report that there is nothing to simplify and stop.

    line 23
  4. Distinctive:

    Read the complete diff before editing.

    line 27
  5. Distinctive:

    Run the repository's required checks before editing.

    line 34
  6. Distinctive:

    Reuse: Prefer an existing project helper or idiom over new duplicate logic.

    line 41
  7. Distinctive:

    Efficiency: Remove demonstrably redundant work, allocations, or repeated lookups when the result is also at least as readable.

    line 46
  8. Distinctive:

    Do not create or preserve single-line pass-through functions.

    line 52
  9. Distinctive:

    Keep code DRY, but extract shared logic only when it represents one stable concept.

    line 59
  10. Distinctive:

    Do not launch parallel review subagents unless the user explicitly asks for them.

    line 63
  11. Distinctive:

    Treat string and data literals as behavior.

    line 70
  12. Distinctive:

    Do not mix in new features, speculative architecture, or unrelated bug fixes.

    line 74
  13. Distinctive:

    Prefer explicit readable control flow over dense expressions, nested conditionals, clever one-liners, or fewer lines for their own sake.

    line 76
  14. Distinctive:

    Keep abstractions that communicate a useful boundary.

    line 78
  15. Distinctive:

    Avoid generated, vendored, and imported artifacts unless the repository explicitly treats them as source.

    line 82
  16. Distinctive:

    Leave code unchanged when an alternative is merely different, not clearly simpler.

    line 84
  17. Very specific:

    Keep tests DRY. Move repeated per-example setup and cleanup into framework lifecycle hooks such as GSpec before_each/after_each or …

    line 91
  18. Distinctive:

    Keep distinct behaviors independently diagnosable.

    line 96
  19. Distinctive:

    Never weaken assertions, delete unique coverage, replace focused checks with broad snapshots, or make tests pass by changing expectations.

    line 98
  20. Distinctive:

    Prefer readable test arrangement over minimizing test line count.

    line 100
  21. Distinctive:

    Run all required formatting, linting, and test commands after editing.

    line 108
  22. Distinctive:

    If a check fails, fix or revert the simplification.

    line 109

“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 Changed Code

Refine the selected change set in place. Prefer the smallest clear design that preserves observable behavior, project conventions, and useful test coverage. Make edits when worthwhile; do not stop at a review report.

Establish the scope

  1. Read the repository instructions and identify its required checks.
  2. Honor an explicit user-provided commit, range, branch, or path scope.
  3. Otherwise determine the comparison base without fetching or mutating Git:
    • On a pull-request or non-default branch, prefer the PR base from available metadata. Fall back to the remote default branch, then local main or master. Include committed changes since the merge base.
    • On the default branch, include commits ahead of its upstream when an upstream exists. Do not revisit unrelated already-pushed history.
  4. Add all staged, unstaged, and untracked changes to that committed scope.
  5. If the scope is empty, report that there is nothing to simplify and stop.
  6. State exactly which range and local changes are included. Treat the initial diff as the intended behavior and changed paths as the editing boundary.

Read the complete diff before editing. Inspect surrounding code, callers, scenes, and tests only as needed to understand the changed behavior. Modify an adjacent file only when the simplification cannot remain coherent without it; call out that scope expansion.

Confirm the baseline

Run the repository's required checks before editing. If the baseline is red, stop and report the failure rather than refactoring on top of it.

Look for meaningful simplifications

Evaluate production code and tests with three concerns in mind:

  • Reuse: Prefer an existing project helper or idiom over new duplicate logic. Consolidate repeated concepts, not merely similar-looking syntax.
  • Clarity: Reduce avoidable nesting, branches, state, indirection, boilerplate, stale comments, and misleading names. Keep responsibilities coherent and execution paths easy to trace.
  • Efficiency: Remove demonstrably redundant work, allocations, or repeated lookups when the result is also at least as readable. Avoid speculative micro-optimization.

Prefer direct code:

  • Do not create or preserve single-line pass-through functions. Update callers to invoke the underlying operation directly. If an external API or framework requires the callable, leave that boundary intact rather than adding another wrapper.
  • Inline a function or variable used only once when it merely renames a simple operation or fragments the local flow. Keep a single-use helper only when its logic is complex enough that a precise name materially improves understanding.
  • Keep code DRY, but extract shared logic only when it represents one stable concept. Do not trade small duplication for indirection or hidden coupling.

Apply project-specific standards from repository instructions and nearby code. Do not launch parallel review subagents unless the user explicitly asks for them; this is a focused editing workflow, not an independent code review.

Preserve behavior

  • Preserve public APIs, outputs, errors, ordering, timing-sensitive behavior, side effects, serialization formats, and saved-data compatibility.
  • Treat string and data literals as behavior. Do not rewrite user-facing text, error messages, keys, paths, prompts, fixtures, or snapshots merely for style.
  • For Godot changes, preserve node paths and names, exported properties, resources, signals, input mappings, scene-tree lifecycle, and process timing.
  • Do not mix in new features, speculative architecture, or unrelated bug fixes. Report a discovered behavior issue separately instead of hiding it in cleanup.
  • Prefer explicit readable control flow over dense expressions, nested conditionals, clever one-liners, or fewer lines for their own sake.
  • Keep abstractions that communicate a useful boundary. Add or merge an abstraction only when it makes the affected callers easier to understand.
  • Preserve comments that explain constraints or intent. Remove only comments that restate self-evident code or no longer match it.
  • Avoid generated, vendored, and imported artifacts unless the repository explicitly treats them as source.
  • Leave code unchanged when an alternative is merely different, not clearly simpler.

Simplify tests carefully

  • Preserve behavioral, boundary, negative-path, integration, and regression coverage.
  • Keep tests DRY. Move repeated per-example setup and cleanup into framework lifecycle hooks such as GSpec before_each/after_each or beforeEach/afterEach when the shared lifecycle remains clear.
  • Consolidate repeated assertions with a helper or data-driven case only when intent and failure diagnostics become clearer.
  • Keep distinct behaviors independently diagnosable. Do not hide meaningful cases in opaque loops or oversized shared fixtures.
  • Never weaken assertions, delete unique coverage, replace focused checks with broad snapshots, or make tests pass by changing expectations.
  • Prefer readable test arrangement over minimizing test line count.

Apply and verify

  1. Apply only high-confidence simplifications with a clear readability, maintainability, or non-speculative efficiency benefit.
  2. Review the resulting diff against the original scope and remove drive-by or behavior-changing edits.
  3. Run all required formatting, linting, and test commands after editing.
  4. If a check fails, fix or revert the simplification; do not weaken the check.
  5. Report the reviewed scope, material simplifications, changed paths, and exact verification results. If no worthwhile edits exist, say so plainly.

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.