agentleFS
Sayhi-bzbSayhi-bzb/CharDesk/.agents/skills/simplify/SKILL.md

simplify

Skill433 starsChanged 5 days agoMITView on GitHub

Simplify code and reduce repository-wide redundancy while preserving behavior. Use after implementation or when asked to refactor, remove dead or duplicate code, reduce code volume, flatten complexity, or audit a repository for unnecessary abstractions and compatibility paths.

123 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, 12 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 114 edited versions we read keep these.

  • 12

    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's AGENTS.md, CLAUDE.md, and relevant nested instructions before analyzing code.

    line 12
  2. Distinctive:

    Do not collapse distinct responsibilities, remove useful boundaries, introduce nested ternaries or dense one-liners, or trade debuggability …

    line 29
  3. Distinctive:

    Use the repository's configured tools when available, and confirm their findings in source and tests:

    line 33
  4. Very specific:

    Use ast-grep --lang <language> -p '<pattern>' for syntax-shaped searches, repeated structures, and structural transformations.

    line 35
  5. Distinctive:

    Use Serena for symbol declarations, implementations, semantic references, file overviews, and language-server diagnostics.

    line 36
  6. Distinctive:

    Use GitNexus for dependency and execution-flow questions.

    line 37
  7. Distinctive:

    Use text search only for non-semantic evidence such as strings, comments, configuration keys, registries, URLs, reflection, dynamic …

    line 38
  8. Distinctive:

    Treat graph and language-server results as navigation evidence, not proof by absence.

    line 40
  9. Distinctive:

    Leave high-risk or insufficiently understood code unchanged.

    line 56
  10. Distinctive:

    Never delete or alter an export, public API, protocol field, plugin or framework entry point, configuration-driven path, migration, …

    line 58
  11. Distinctive:

    Run focused tests and diagnostics for the changed code, then the broadest practical repository checks defined by project-owned scripts.

    line 64
  12. Distinctive:

    Run GitNexus change detection when available and confirm that affected symbols and execution flows match the intended scope.

    line 65
  13. Distinctive:

    Document only decisions that help a reviewer understand the safety or intent of the simplification.

    line 78

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

Improve clarity and reduce unnecessary code. Treat fewer lines as a useful outcome, not the objective: prefer explicit, maintainable code over dense or clever code.

Establish the constraints

  1. Read the repository's AGENTS.md, CLAUDE.md, and relevant nested instructions before analyzing code. Treat those files as the source of project conventions; do not assume generic style rules override them.
  2. Inspect git status and preserve unrelated or pre-existing worktree changes.
  3. Audit the whole repository by default. If the user supplies a narrower scope, honor it.
  4. Identify the public contracts, tests, build commands, and package boundaries relevant to each candidate. Do not infer that repository-local usage is the complete contract surface.

Find simplification candidates

Look for:

  • unreachable or unused private code;
  • duplicated branches, helpers, types, and transformations;
  • redundant conditions, state, wrappers, adapters, and intermediate representations;
  • abstractions with no independent responsibility;
  • comments that only restate the code;
  • nesting or control flow that can be expressed more directly;
  • compatibility or defensive paths whose original consumer may no longer exist.

Do not collapse distinct responsibilities, remove useful boundaries, introduce nested ternaries or dense one-liners, or trade debuggability for a lower line count.

Build an evidence chain

Use the repository's configured tools when available, and confirm their findings in source and tests:

  • Use ast-grep --lang <language> -p '<pattern>' for syntax-shaped searches, repeated structures, and structural transformations.
  • Use Serena for symbol declarations, implementations, semantic references, file overviews, and language-server diagnostics. Read Serena's initial instructions and activate the project before using its semantic tools.
  • Use GitNexus for dependency and execution-flow questions. Resolve the indexed repository first, run upstream impact analysis before changing a shared symbol, and run change detection after editing to check the affected scope.
  • Use text search only for non-semantic evidence such as strings, comments, configuration keys, registries, URLs, reflection, dynamic imports, and generated-code references.

Treat graph and language-server results as navigation evidence, not proof by absence. If an index is stale, follow the repository's re-indexing instructions. If Serena or GitNexus is unavailable or incomplete, continue conservatively and do not interpret missing references as proof that deletion is safe.

Classify before editing

Assign every candidate to one class:

Proven equivalent

Apply the cleanup directly only when source, references, contracts, and tests support preserving all observable behavior. Typical examples include exact duplicate logic, unreachable private branches, and unused private symbols with no dynamic or generated references.

Approval required

Do not edit candidates that appear low risk but may change edge behavior. Report the evidence, uncertainty, affected surface, proposed deletion, and expected reduction, then wait for explicit user approval. This includes obsolete-looking compatibility paths, defensive fallbacks, lifecycle hooks, and symbols that might have external consumers.

Keep

Leave high-risk or insufficiently understood code unchanged. Record the evidence needed to reconsider it when that is useful.

Never delete or alter an export, public API, protocol field, plugin or framework entry point, configuration-driven path, migration, compatibility shim, or reflection/dynamic-loading target solely because no local semantic reference is found.

Refine and verify

  1. Apply only proven-equivalent changes and any approval-required changes the user explicitly accepts.
  2. Re-read the result and remove accidental complexity introduced by the refactor.
  3. Run focused tests and diagnostics for the changed code, then the broadest practical repository checks defined by project-owned scripts.
  4. Run GitNexus change detection when available and confirm that affected symbols and execution flows match the intended scope.
  5. Revert or revise any simplification that changes behavior, weakens a contract, obscures intent, or lacks adequate verification.

Report the result

Summarize:

  • proven-equivalent code removed or simplified;
  • approval-required candidates left unchanged;
  • high-risk candidates intentionally kept;
  • tests, diagnostics, and impact checks run;
  • meaningful reduction in files, symbols, branches, or lines when measurable.

Document only decisions that help a reviewer understand the safety or intent of the simplification.

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.