---
name: ponytail-review
trigger: /ponytail-review
description: >
  Diff review through the ponytail lens. One line per finding: file, the
  over-engineering spotted, and a simpler alternative.
user_invocable: true
---

> **External skill** — [ponytail](https://github.com/DietrichGebert/ponytail)
> by DietrichGebert, MIT license. Included here because I use it daily.

# ponytail-review — diff review for over-engineering

Run with `/ponytail-review` after staging changes, or pass a diff directly.
Integrates into the code review workflow as a pre-review simplicity check.

## What it catches

- **Single-caller abstractions** — a function extracted from one call site that could just be inlined.
- **Wrapping that adds nothing** — a class or function that only delegates without adding behavior.
- **Speculative parameters** — arguments that have no current callers passing a non-default value.
- **Unnecessary dependencies** — a new `import` or `require` for something stdlib or the platform provides.
- **Over-typed boilerplate** — type aliases or interfaces that wrap a primitive with no added constraint.
- **Configuration for one value** — a config key that is never anything but its default.

## Output format

One line per finding. No paragraphs.

```
FILE                       FINDING                                          SIMPLER
src/utils/formatDate.ts    Single-caller helper, used only in Header.tsx   Inline the format call
src/api/HttpClient.ts      Wrapper around fetch with no added behavior      Use fetch directly
src/models/Config.ts       retryCount param always called as retryCount=3  Hardcode 3 or use a constant
src/hooks/useTheme.ts      Imports 'color-convert' for one hex→rgb call    Use CSS custom properties
```

## Severity

Only findings that affect **shipped code** are reported. Test-only files, storybook, and
examples are noted separately if they add real weight (e.g., a heavy dependency pulled
in only for tests).

## Integration

Use `/ponytail-review` before `/code-review` to clean up over-engineering before a
human reviewer sees the diff. This keeps review comments focused on logic and correctness
rather than structure.

After applying fixes, re-run to confirm the diff is clean. An empty report is a pass.
