代码过度工程审查
ponytail-review
专注于过度工程化的代码审查。找出应当删除的内容:重复造标准库轮子、不必要的依赖、投机性的抽象、僵死的灵活性。每条发现一行:位置、要删什么、用什么替代。当用户说「review for over-engineering」「what can we delete」「is this over-engineered」「simplify review」或调用 /ponytail-review 时使用。与侧重正确性的代码审查互补,本技能只搜寻复杂性。
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-02
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- ponytail-review
- description
- Code review focused exclusively on over-engineering. Finds what to delete: reinvented standard library, unneeded dependencies, speculative abstractions, dead flexibility. One line per finding: location, what to cut, what replaces it. Use when the user says "review for over-engineering", "what can we delete", "is this over-engineered", "simplify review", or invokes /ponytail-review. Complements correctness-focused review, this one only hunts complexity.
03 SKILL.md 正文
Review diffs for unnecessary complexity. One line per finding: location, what to cut, what replaces it. The diff's best outcome is getting shorter.
Format
L<line>: <tag> <what>. <replacement>., or <file>:L<line>: ... for
multi-file diffs.
Tags:
delete:dead code, unused flexibility, speculative feature. Replacement: nothing.stdlib:hand-rolled thing the standard library ships. Name the function.native:dependency or code doing what the platform already does. Name the feature.yagni:abstraction with one implementation, config nobody sets, layer with one caller.shrink:same logic, fewer lines. Show the shorter form.
Examples
❌ "This EmailValidator class might be more complex than necessary, have you considered whether all these validation rules are needed at this stage?"
✅ L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.
✅ L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.
✅ repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.
✅ L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.
✅ L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.
Scoring
End with the only metric that matters: net: -<N> lines possible.
If there is nothing to cut, say Lean already. Ship. and stop.
Boundaries
Scope: over-engineering and complexity only. Correctness bugs, security holes,
and performance are explicitly out of scope. Route them to a normal review
pass, not this one. A single smoke test or assert-based
self-check is the ponytail minimum, not bloat, never flag it for deletion.
Does not apply the fixes, only lists them.
"stop ponytail-review" or "normal mode": revert to verbose review style.
04 同仓库更多 Skills
极简编码方案
ponytail
强制采用最懒但实际可行、最简单、最短、最精简的解决方案。化身一位见多识广的高级开发者:质疑任务本身是否有存在的必要(YAGNI),在编写自定义代码之前先用标准库,在引入依赖之前先用原生平台能力,一行胜过五十行。支持强度级别:lite、full(默认)、ultra。适用于任何编码任务:编写、添加、重构、修复、审查或设计代码,以及选择库或依赖。当用户说「ponytail」「be lazy」「lazy mode」「simplest solution」「minimal solution」「yagni」「do less」或「shortest path」,或抱怨过度工程、臃肿、样板代码或不必要的依赖时也使用。不用于非编码请求(常识、散文、翻译、摘要、食谱)。
ponytail 命令速查
ponytail-help
面向所有 ponytail 模式、技能和命令的快速参考卡。一次性展示,不是持久模式。触发词:/ponytail-help、“ponytail help”“有哪些 ponytail 命令”“如何使用 ponytail”。
代码优化成效看板
ponytail-gain
以精简的记分板展示 ponytail 的可量化成效:基于基准测试中位数,代码更少、成本更低、速度更快。一次性展示,不是持久模式,也不是针对单个仓库的数值。触发词:/ponytail-gain、“ponytail gain”“ponytail 节省了多少”“展示 ponytail 成效”“ponytail 记分板”。
技术债务台账整理
ponytail-debt
将代码库中的每个 `ponytail:` 注释汇总到一份债务台账中,使 ponytail 有意留下的捷径和延后事项得到跟踪,而不是烂尾成“以后再说就等于永远不做”。当用户说“ponytail 债务”“/ponytail-debt”“ponytail 推迟了什么”“列出这些捷径”“ponytail 台账”或“我们标记了哪些以后要做的事”时使用。一次性报告,不做任何更改。
代码库过度工程审计
ponytail-audit
对整个代码仓库进行过度工程审计。类似 ponytail-review,但扫描的是整个代码库而非代码差异:给出一份按优先级排序的清单,列出可删除、简化或替换为标准库/原生等效实现的内容。当用户说“审计这个代码库”“检查过度工程”“这个仓库里能删掉什么”“找出冗余”“ponytail-audit”或“/ponytail-audit”时使用。一次性报告,不会应用任何修复。
技能编写与编辑指南
writing-great-skills
关于如何编写和编辑技能的参考指南——阐述让技能可预测、行为一致的词汇与原则。