simplify
Skill11 starsChanged 27 days agoMITView on GitHub
用户明确要求简化、清理或重构近期改动且保持行为不变时使用;也用于只列不改的过度设计审查、全仓过度设计审计,以及汇总代码中 `simplify:` 简化债务注释。普通实现、缺陷修复、正确性代码评审或行为变更不触发。
119 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- Ovich/charrettetheir own version, first seen Nov 8, 2026
- caidanw/skillstheir own version, first seen Nov 8, 2026
- Ovich/swarmstormtheir own version, first seen Nov 8, 2026
- alexandrosandre/agentic-engineeringtheir own version, first seen Nov 8, 2026
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.
gaebalaiSkillcodex-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
gaebalaiSkilldesign-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
mike22890Skillclonedeps
将项目依赖的第三方库源码克隆到本地,便于深入阅读和调试。当需要查看库的实现细节、阅读源码、调试第三方依赖、理解 SDK/framework 内部机制、查看 node_modules 之外的原始代码、分析开源库架构、学习他人代码、查看依赖的 TypeScript 类型定义时使用。
Also in 3 projects that use this
mdrubelamin2Skillverification-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
devbrother2024Skillartifact-design
단독 self-contained HTML 산출물(랜딩 페이지, 정적 문서·리포트, 독립 대시보드, 데모·게임, 개발 전 UX/UI 대안 비교 목업)을 만들 때 팔레트·타이포그래피·레이아웃을 의도적으로 설계하고 템플릿·AI스러운 디자인을 피하도록 돕는 디자인 가이드. HTML/CSS를 쓰기 전에 로드한다. "랜딩 만들어줘", "이 내용 단일 HTML로 예쁘게", "UX 대안 HTML로 비교해줘", "디자인 잡아줘"처럼 단독 HTML 아티팩트를 만들거나 비교하는 요청에 활성화하고, 기존 앱(React·Vue 등)의 인앱 컴포넌트 수정이나 순수 백엔드·로직 작업에는 쓰지 않는다.
Also in 3 projects that use this
codebycoreySkillbatch
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
Other versions119 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 119
- Z3Prover/z3★ 13ksame name
- aaddrick/claude-desktop-debian★ 5.5ksame name
- CherryHQ/cherry-studio-app★ 4.1ksame name
- elliothux/open-compute★ 3.3ksame name
- meta-pytorch/OpenEnv★ 2.8ksame name
- huggingface/OpenEnv★ 2.8ksame name
- bholmesdev/hubble.md★ 1.5ksame name
- kdlbs/kandev★ 1.1ksame name
- truffle-ai/dexto★ 659same name
- deadlock-mod-manager/deadlock-mod-manager★ 584same name
109 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.
In this repository20 other files it gives its agents.
- absorb-skillSkill
- agent-healthSkill
- architecture-decision-recordSkill
- benchmark-checklistSkill
- brainstormingSkill
- codecov-coverageSkill
- frontend-design-reviewSkill
- gh-stackSkill
- linux-performance-analysisSkill
- loop-on-ciSkill
- pull-requestSkill
- requesting-code-reviewSkill
- runtime-verificationSkill
- shared-memorySkill
- show-meSkill
- systematic-debuggingSkill
- technical-writingSkill
- test-scenariosSkill
- writing-plansSkill
- x-tweet-fetcherSkill
The file
Files
简化代码
在完全保留功能的前提下简化代码。优先选择易读、行为明确的写法,而非紧凑或巧妙的写法。
模式
- 简化(默认):按下文流程修改近期改动并验证行为不变。
- 过度设计审查:用户要求“看看哪里过度设计”“能删什么”时,只审查指定差异,不修改文件。
- 全仓审计:用户要求审计整个仓库的冗余时,扫描整个仓库(跳过依赖、生成物和构建输出),不修改文件。
- 债务清单:用户要求列出有意留下的简化或“以后再做”的位置时,汇总
simplify:注释,不修改文件。
后三种模式只覆盖复杂度;正确性缺陷、安全问题和性能交给 requesting-code-review 或对应 skill。单个冒烟测试或基于断言的自检是最低限度的验证,不当作冗余删除。
边界
- 已有失败或异常行为先用系统化调试定位;本技能不把修缺陷伪装成等价重构。简化过程中发现的正确性问题只报告,不在本轮修复。
- 需要改变功能、API、错误语义或兼容行为时停止,并将它作为单独变更讨论。
- 默认只处理当前任务或会话中的改动,遵守项目指令并保留工作区中的无关改动。
流程
- 确定用户要求的范围、最近修改的代码,以及能证明现有行为的测试、命令或可观察结果。
- 阅读适用的项目指令和相邻代码约定。
- 按四个角度找候选:复用(新代码是否重写了仓库已有的 helper、类型或服务)、简化(多余或可推导的状态、近似复制、深层嵌套、遗留的死代码)、效率(重复计算或 I/O、可并行却串行、启动或热路径上新增的阻塞工作)、修复深度(在共享机制上叠加特例而不是改底层机制)。每个候选记录文件、行和具体代价:重复了什么、浪费了什么、哪里更难维护。判断细则和不该做的简化见 检查角度。差异较大且可用子代理时,可以按角度并行审查后合并。
- 合并指向同一行或同一机制的候选。跳过会改变既有行为、需要改动明显超出本次差异或判断为误报的候选,并记录原因。效率和修复深度的候选常会改变调用顺序、并发或其他调用方的行为,这类候选只报告,作为单独变更处理。
- 做保持行为不变的最小改进。
- 检查差异,逐项确认没有改变控制流、错误行为、输出、副作用、并发顺序或兼容边界。重命名或移动后,再搜索字符串、配置、文档和反向引用中的旧名称,这些位置不会被编译或类型检查发现。
- 使用修改前的同一行为入口验证,再按风险补充更宽检查。
- 只报告重要改进、跳过或只报告的候选及原因,以及验证缺口。
无法建立行为基线时,只做可以由静态等价直接证明的局部简化,并报告未验证边界。验证失败、差异显示行为变化或需要猜测原意时,停止本轮简化并恢复本轮未成立的改动,不用“代码更短”作为成功依据。
输出
- 简化了什么复杂度,以及为什么行为保持不变;
- 实际执行的行为基线和验证结果;
- 没有执行的运行面及其影响;
- 没有安全简化机会时,明确说明保持现状。
只读模式
过度设计审查与全仓审计只看复杂度,每条候选标一个标签,并给出具体替换:
delete:死代码、没人用的灵活性、推测性功能。替换为“无”。stdlib:手写了标准库已有的能力。写出要用的函数名。native:代码或依赖在做平台已经提供的事。写出平台特性名,常见对照见 平台原生能力。yagni:只有一个实现的抽象、没人设置的配置、只有一个调用方的层。写出内联或删除后的形态。shrink:同样逻辑可以更短。直接给出更短的写法。
示例:
L12-38: stdlib: 27 行的邮箱校验类. 用 "@" in email 一行,真正的校验靠确认邮件.
L4: native: 为一次日期格式化引入 moment.js. Intl.DateTimeFormat,0 依赖.
repo.py:L88: yagni: AbstractRepository 只有一个实现. 内联,等出现第二个实现再抽.
L52-71: delete: 对幂等本地调用包了一层重试. 无需替换.
L30-44: shrink: 手写循环构造 dict. dict(zip(keys, values)),一行.不写“可以考虑是否需要……”这类泛泛建议,每条都要指出删什么、换成什么。
- 审查模式:默认看当前差异,每条一行
L<行>: <标签> <问题>. <替换方案>.,多文件差异写成<文件>:L<行>: ...;最后一行写net: -<N> lines possible.。没有可删内容时只回答“已经足够精简,可以交付”。 - 全仓审计:扫描整个仓库(跳过依赖、
.git和构建产物),重点找标准库或平台已提供能力的依赖、单一实现的接口、只生产一种产品的工厂、只做转发的包装、只导出一个符号的文件、失效的开关和配置、手写的标准库功能。按可删减规模从大到小排序,每条写<标签> <删什么>. <替换方案>. [<路径>],最后一行写net: -<N> lines, -<M> deps possible.。
两种模式都不修改文件,用户要求落实时转入简化模式逐项处理。
债务清单
- 用
rg -n '(#|//|--|/\*) ?(simplify|ponytail):'搜索整个仓库,跳过依赖、.git与构建产物;项目语言使用其他注释前缀时一并加入。要求注释前缀是为了排除只是提到这个约定的正文。ponytail:是历史写法,一并收集。 - 按文件分组,每条一行:
<文件>:<行>, <简化了什么>. ceiling: <上限>. upgrade: <何时升级>.,上限和触发条件直接取自注释。用户需要负责人时,用git blame -L<行>,<行>补上。 - 注释没写升级方式或触发条件的标为
no-trigger,这类最容易被永久遗忘。 - 最后一行写
<N> markers, <M> with no trigger.;没有找到时回答“没有简化债务”。 - 只读不改;用户要求持久化时,把清单写到用户指定的文件。用户要求补齐触发条件或偿还某条债务时,转入简化模式或常规实现。
统一约束
- 证据与验收:遵循
../_shared/common-acceptance.md,本 skill 只补充其中没有的要求。
来源
改编自 Anthropic 的 code-simplifier 代理,采用 Apache License 2.0 授权,已改编为可移植的 Agent Skills 格式。只读模式与债务清单改编自 ponytail 的 ponytail-review、ponytail-audit 和 ponytail-debt,采用 MIT License 授权。
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
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.

