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模式、技能與指令的快速參考卡。一次性顯示,非持續模式。觸發方式:/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