ponytail-review

作者: dietrichgebert

仅关注过度工程的代码审查。找出可删除的内容:重新发明的标准库、不必要的依赖、推测性抽象、无用的灵活性。每个发现一行:位置、要删除的内容、替代方案。当用户说“审查过度工程”、“可以删除什么”、“这是否过度工程”、“简化审查”或调用/ponytail-review时使用。补充以正确性为重点的审查,此审查仅追踪复杂性。

npx skills add https://github.com/dietrichgebert/ponytail --skill ponytail-review

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.

来自 dietrichgebert 的更多技能

ponytail
dietrichgebert
强制采用实际可行的最懒方案,追求最简单、最短、最精简。模拟资深开发者的思维:质疑任务是否真的需要存在(YAGNI),优先使用标准库而非自定义代码,优先使用平台原生功能而非依赖项,优先用一行代码而非五十行。支持强度级别:轻量、完整(默认)、极致。当用户提及"ponytail"、"be lazy"、"lazy mode"、"simplest solution"、"minimal solution"、"yagni"、"do less"等关键词时启用。
developmentcode-review
ponytail-audit
dietrichgebert
对整个仓库进行过度工程审计。类似ponytail-review,但扫描整个代码库而非差异:生成一个排序列表,列出应删除、简化或替换为标准库/原生等价物的内容。当用户说“审计此代码库”、“审计过度工程”、“此仓库中可删除什么”、“查找臃肿”、“ponytail-audit”或“/ponytail-audit”时使用。一次性报告,不应用修复。
code-reviewdevelopment
ponytail-help
dietrichgebert
所有马尾辫模式、技能和命令的快速参考卡。一次性显示,非持久模式。触发方式:/ponytail-help、“ponytail help”、“what ponytail commands”、“how do I use ponytail”。
ponytail-debt
dietrichgebert
Harvest every `ponytail:` comment in the codebase into a debt ledger, so the deliberate shortcuts and deferrals ponytail leaves behind get tracked instead of rotting into "later means never". Use when the user says "ponytail debt", "/ponytail-debt", "what did ponytail defer", "list the shortcuts", "ponytail ledger", or "what did we mark to do later". One-shot report, changes nothing.
developmentcode-reviewproject-management