Ponytail: Put Claude Code on a Code Diet
Dietrich Gebert's open-source tool teaches coding agents to reach for the smallest thing that works first. Less code, less cost, same safety.
AI coding agents have a habit you have probably seen yourself. You ask for a small feature and you get a new dependency, a config layer, three helper files, and an abstraction nobody asked for. The code works, but it is two or three times the size it needed to be. More code means more surface area for bugs, more to review, and more tokens spent generating and re-reading it all. Ponytail, an open-source tool by Dietrich Gebert (GitHub: DietrichGebert), puts your agent on a code diet so it reaches for the smallest thing that works first.
It is not a linter and it does not run after the fact. Ponytail ships a ruleset and a set of skills that change how the agent decides what to write, before it writes it. The core idea is a 'lazy senior developer' mindset: the kind of engineer who deletes more than they add and reuses what already exists instead of building a new layer. It works across Claude Code, Codex, Copilot CLI, Gemini CLI, OpenCode, and editor rules for Cursor, Windsurf, Cline, Kiro, and Zed.
The decision ladder it enforces
The mechanism is a short ladder the agent runs through before generating code. Each rung is a chance to write less. Only when every cheaper option fails does it fall through to writing new code, and even then the target is the minimum that works.
- Does this need to exist at all? If not, skip it (plain YAGNI).
- Is it already in this codebase? Reuse it instead of rewriting.
- Can the standard library do it? Use that.
- Is there a native platform feature for it? Use that.
- Is it already covered by an installed dependency? Use that.
- Can it be one line? Make it one line.
- Only after all of that: write the smallest thing that works.
That ordering is the whole point. Most over-engineering happens because the agent jumps straight to rung seven and starts building. Forcing it to check rungs one through six first is what cuts the bulk.
Install it in Claude Code
/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytailHow you actually use it
Once installed, you steer it with slash commands. Day to day you mostly set an intensity and let it run, then occasionally point a review at your diff. The default mode is full.
- 1Set the intensity with /ponytail [lite | full | ultra | off]. Run it with no argument and it reports the current level. The repo notes that ultra exists 'for when the codebase has wronged you personally', so treat it as the aggressive setting.
- 2Before you commit, run /ponytail-review. It reads your current diff for over-engineering and hands back a delete-list of what to cut.
- 3To go wider than the diff, run /ponytail-audit, which scans the whole repo for the same patterns.
- 4Run /ponytail-debt to collect the shortcuts you deferred (the 'do it properly later' notes) into a single ledger, so later does not quietly become never.
- 5Run /ponytail-gain to see the measured impact scoreboard, and /ponytail-help for the quick reference.
If you want a default that sticks across sessions, the tool reads an optional config at ~/.config/ponytail/config.json or a PONYTAIL_DEFAULT_MODE environment variable, both accepting lite, full, ultra, or off.
What the numbers say, and how to read them
The repo reports roughly 54% less code (up to 94% on heavily over-built tasks), about 20% cheaper, about 27% faster, and 100% safe, meaning validation, error handling, and security were kept intact. Worth knowing exactly how that was measured before you quote it: twelve feature tickets run on a real open-source FastAPI plus React repo, the same agent with and without the skill, n=4, on Haiku 4.5. That is a small, honest benchmark on one codebase and one model, not a universal guarantee. Treat the direction as reliable and the exact percentages as setup-dependent.
When to use it, and when to ease off
Reach for Ponytail on feature work, glue code, and anything where the agent tends to pad the solution. It pairs well with a review step: let it write lean, then run /ponytail-review to catch whatever still slipped through. Ease off the heavier modes when you genuinely need scaffolding the agent might otherwise skip, like a deliberate abstraction you plan to build on, or early exploratory code where a bit of structure helps you think. The safety claim covers validation and error handling, so this is about cutting bulk, not cutting corners. Start at full, drop to lite when it feels too eager, and reserve ultra for the codebase that has wronged you personally.
Want the next drop first?
New builds and skills land in the Vault every week.
Follow for the weekly drops