Ponytail review skill

Review a diff for over-engineering.

by DietrichGebert·MIT license·★ 153,538 Stars on the repo·GitHub ↗

Use now

Files of Ponytail review

DietrichGebert/main1 file shown
SKILL.md
Show the full text57 lines
ponytail-review/SKILL.md57 lines · 2.3 KB

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.
  • reuse: equivalent helper, util, or pattern already in this repo. Name the path.
  • 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.

✅ L18-29: reuse: slugify helper duplicates src/lib/slug.ts slugify. Delete it, import the existing one.

✅ 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.

1---
2name: ponytail-review
3description: "Review a diff for over-engineering. Finds what to delete: reinvented stdlib, needless deps, speculative abstractions. One line per finding."
4homepage: https://github.com/DietrichGebert/ponytail
5license: MIT
6---
7 
8Review diffs for unnecessary complexity. One line per finding: location, what
9to cut, what replaces it. The diff's best outcome is getting shorter.
10 
11## Format
12 
13`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
14multi-file diffs.
15 
16Tags:
17 
18- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
19- `stdlib:` hand-rolled thing the standard library ships. Name the function.
20- `native:` dependency or code doing what the platform already does. Name the feature.
21- `reuse:` equivalent helper, util, or pattern already in this repo. Name the path.
22- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
23- `shrink:` same logic, fewer lines. Show the shorter form.
24 
25 
26## Examples
27 
28❌ "This EmailValidator class might be more complex than necessary, have you
29considered whether all these validation rules are needed at this stage?"
30 
31✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
32 
33✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
34 
35✅ `L18-29: reuse: slugify helper duplicates src/lib/slug.ts slugify. Delete it, import the existing one.`
36 
37✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
38 
39✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
40 
41✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
42 
43## Scoring
44 
45End with the only metric that matters: `net: -<N> lines possible.`
46 
47If there is nothing to cut, say `Lean already. Ship.` and stop.
48 
49## Boundaries
50 
51Scope: over-engineering and complexity only. Correctness bugs, security holes,
52and performance are explicitly out of scope. Route them to a normal review
53pass, not this one. A single smoke test or `assert`-based
54self-check is the ponytail minimum, not bloat, never flag it for deletion.
55Does not apply the fixes, only lists them.
56"stop ponytail-review" or "normal mode": revert to verbose review style.
57 

Discussion