AI writes way too much code — and you pay for every extra token, especially on Opus 🔥
By default the agent likes to go big: its own date picker instead of the native <input type="date">, its own helper instead of a ready-made method from the stdlib, fifty lines where one would have done. More code → more tokens → more expensive, slower, and then you have to maintain it. Ponytail turns the agent around: think like the laziest senior on the team. The best code is the code you didn't write.
What it does
An open-source plugin/skill for Claude Code (per the author's README — also for Codex and GitHub Copilot CLI). Before generating anything, it walks the agent down a "ladder of 6 questions" and only lets it write the minimum that works once it has been through them. The ladder:
- Is this code needed at all? (YAGNI — maybe the task is invented)
- Does this already exist in this repository? (reuse it)
- Can the standard library do it?
- Is there a native platform/language feature?
- Is there an already-installed dependency?
- Does it fit on one line?
Intensity levels: lite, full (default), ultra, plus off to turn it off. Works on any task and any model (Opus/Sonnet/Haiku) — writing, adding, refactoring, fixing, reviewing code, picking a library.
Important (ADVISORY): this is a set of rules the skill mixes into the agent's context every turn, not a hard runtime gate. It steers the model ("think lazy") but doesn't physically stop it from writing something extra — the README says outright that the model can ignore these instructions. So the effect is "reaches for the ready-made thing more often", not "guaranteed".
The result: shorter diffs, less hand-rolled code, fewer tokens. Per the author's claim (his own measurement on a FastAPI + React repository, Haiku 4.5, 12 tasks) — about 54% less code, ~20% cheaper and ~27% faster than a plain agent. That's his personal benchmark on a single project, not an independent test — treat it as a ballpark, not a guarantee.
How to install
The commands are typed inside Claude Code — this is a plugin from its marketplace:
/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytail
MIT licence, nothing to pay. It installs on top of Claude Code and coexists happily with Cline.
When to use it
- Your Opus/Sonnet token bill is climbing and half of what gets generated is "just in case".
- The agent over-engineers: its own utilities instead of the stdlib, its own components instead of native ones.
- You want a minimalist reviewer on top of Claude Code — a counterpart to "thinking" ultrathink, but pulling the other way: that one adds reasoning, Ponytail cuts volume.
- Skip it if the task honestly needs a lot of code: at the
ultralevel it can start arguing and cutting things you actually need — drop back toliteorfullin that case. And remember: it's advice to the agent, not a guarantee — still read the critical parts yourself.
Example
You ask for "add a date picker" — instead of a couple hundred lines of hand-rolled calendar, the agent drops in the native <input type="date"> in two lines.