
Picture the veteran engineer on your team who predates the repository itself. Hand them a fifty-line change and, without a word, they hand back one line that does the job.
AI coding agents behave the opposite way. Ask for a date picker and you will often get a new dependency or a hand-built calendar component, hundreds of lines long, for something the browser already does.
Agents are eager, thorough and very productive at producing code you didn't need.
Ponytail is an open-source project that tries to fix this by embedding that quiet veteran, the project's mascot, inside your agent. Its tagline sums up the philosophy: "The best code is the code you never wrote."
With roughly 192k stars and 10.7k forks on GitHub at the time of writing, a lot of developers apparently agree.
What it actually is
Under the hood, Ponytail is a single prompt. It lives in skills/ponytail/SKILL.md, with a compact version in AGENTS.md for agents that read a rules file.
Everything else in the repo is plumbing that loads that prompt into different tools. That includes plugin manifests for Claude Code, Codex, Gemini, OpenCode, Devin, Qoder and others, plus rule files for Cursor, Windsurf, Cline, Copilot and Kiro.
The project's badge claims support for 20 agents, and it is released under the MIT license.
The ladder
The core idea is a ladder of questions the agent climbs before writing anything. It stops at the first rung that holds:
Does this need to exist at all?
Is it already in this codebase?
Does the standard library handle it?
Is there a native platform feature for it?
Is there an installed dependency that covers it?
Can it be done in one line?
Only then: write the minimum that works, plus one small test if there is real logic.
The part that is easy to miss is that the ladder runs after the agent has understood the problem, not instead of it. The agent still reads the code the change touches and traces the real flow first.
The laziness applies to the solution, not to the homework.
Some things are off the table for trimming: validation at trust boundaries, handling that prevents data loss, security, and accessibility.
When the agent takes a deliberate shortcut, it leaves a shortcut: comment marking what was skipped and when to revisit it. Each reply is meant to end with what was skipped or left unchecked, plus any risk worth knowing about.
The date picker, in numbers
The project's showcase example is the one above. Asked to add a date picker to a frontend, the agent without the skill produced 335 lines.
With Ponytail 5, it noticed that the repo already had an Input component and that every browser ships a date picker. It combined the two in a 10-line file.
That is the whole pitch in miniature: look at what's already there before building anything new.
What the benchmarks claim
Ponytail 5, a ground-up rewrite, ships with benchmark results comparing the same agent with and without the skill:
Metric | Change with Ponytail 5 |
|---|---|
Lines of code | -53% |
Time | -41% |
Cost | -26% |
Output tokens | -45% |
Risky logic that ships with a test | 98% (vs 68% without) |
Injected bugs caught by the agent's own tests | 66% (vs 46% without) |
These are medians per task, aggregated across tasks. The repo's results file also publishes 95% bootstrap intervals, which are wide: cost, for example, is -26% with a range of roughly -36% to -16%.
The setup was 39 tasks in headless Claude Code sessions using Opus 5.5, five runs per task:
12 feature tickets in a real FastAPI + React repository.
18 surgical tasks with hidden checks, such as bug fixes, SQL with untrusted input, path traversal, forged tokens and rate limiting.
Nine open-ended requests to build a small app or show a learning example.
Two details cut against the headline, and they are worth knowing:
Security parity, not improvement. On the six security tasks (SQL injection, path traversal, forged tokens, rate limiting, malformed CSV rows and caching), Ponytail 5 passed all 30 runs. So did the no-skill baseline.
More tests, not better tests. The testing gain comes from the agent writing a test more often. Where a test exists, the no-skill agent's tests actually caught more injected bugs (77% vs 69%); it just often wrote none.
The security result shows that writing less code did not make things less safe. It does not show the skill made them safer. Across all 18 tasks with hidden checks, the score was 87/90 with Ponytail 5 and 86/90 without.
On reply quality, a blind judge preferred Ponytail 5's replies over the previous Ponytail version's by 110 to 67. The judge was a model (Sonnet 5.5), not a human.
Against the no-skill baseline there was no statistically significant difference, with a slight lean toward the longer no-skill replies.
The author stresses that the goal was never minimum tokens. The target is to write exactly what the task requires, so the smaller code is a consequence of necessity rather than code golf.
Lower cost and latency are side effects. The trade on offer is leaner code plus more small tests, at roughly the same level of correctness.
Beyond writing less code
Ponytail is more than a style nudge. It ships a small set of slash commands:
Command | What it does |
|---|---|
| Sets how aggressive the minimalism is, or turns it off |
| Reviews your diff the way the engineer on call would, checking bugs, security, load and missing tests |
| Runs the same checks over the whole repo, most important first |
| Collects your |
| Shows the measured impact scoreboard from the benchmark |
| Quick reference for the commands |
The review and audit commands were rebuilt in version 5. Earlier, they only looked for code to cut.
Now the review reads the code your change touches, not just the diff. It checks for bugs, security problems, real-world load, missing tests, slow paths and things to cut.
Each finding explains what the code does, what goes wrong, how to fix it, and what happens if you skip the fix. You can narrow or widen the target in plain words, such as uncommitted, staged, branch, or a PR link.
The audit first maps entry points, data flow and expected load, then ranks what it finds so you know what to fix first.
The README's own figures say the review found 100% of planted problems (87% without the skill) and 100% of problems outside the diff (78% without).
Its showcase example: a field rename that quietly broke an untouched file, which the review flagged as a must-fix.
New in 5.3: the band
If you use Claude Code, version 5.3 adds a status "band" above the prompt. It shows what the current task has cost, tokens used and agent time.
It also shows how often existing code was reused rather than newly written, and whether tests passed after the last change.
The band has buttons for switching levels, running a review or audit, copying the task as Markdown, and collapsing to one line. /ponytail band hides or shows it.
There is also a local "board" page that aggregates sessions across your projects: cost, agent time and tokens over time, each session with its test results, and the days you worked.
By default everything stays on your machine, under ~/.config/ponytail/band/. /ponytail band import pulls in your past Claude Code sessions.
The band needs Claude Code 2.1.290 or later, in the terminal or the desktop app. It does not appear in the VS Code chat panel, cloud sessions, or claude -p.
Installing it
For Claude Code, run these as two separate prompts:
/plugin marketplace add DietrichGebert/ponytail/plugin install ponytail@ponytailFor Codex:
codex plugin marketplace add DietrichGebert/ponytail
codex plugin add ponytail@ponytailThen open /hooks in Codex, trust its two lifecycle hooks, and start a new thread.
In the Codex CLI and IDE extension, the commands are skills under the plugin's namespace, so you invoke them as, for example, $ponytail:ponytail-review.
For any other agent, copy AGENTS.md into your project, or ask your agent to install skills/ponytail/SKILL.md as a skill. The repo's INSTALL.md has step-by-step instructions for Copilot, Cursor, OpenCode, Gemini and more.
A word of caution from the author, worth repeating: install only from DietrichGebert/ponytail on GitHub or @dietrichgebert/ponytail on npm. The project never ships .exe or .dll files, so a copy that does is not the real thing.
Slash commands need a skill-capable host such as Claude Code, Codex, Devin CLI, OpenCode, Gemini, Qoder or Grok Build. The instruction-only adapters (Cursor's rule file, Windsurf, Cline, Copilot, Kiro) load the always-on ruleset but not the commands.
No config file is required. An optional ~/.config/ponytail/config.json or the PONYTAIL_DEFAULT_MODE environment variable can set the default level.
A grain of salt
Before you roll this out across a team, a few honest caveats, most of them taken from the benchmark's own limitations section:
The numbers are self-reported and narrow. They come from the author's own benchmark: one model (Opus 5.5), one host (Claude Code), five runs per task. Ponytail also ships to Codex, Cursor, Copilot and others, but those were not measured.
The agents could not run code. Bash was disabled, so the benchmark measures what the agents write, not what they can debug.
Correctness checks are partial. Only 18 of the 39 tasks have hidden correctness checks; the other 21 measure code size.
The testing numbers aren't fully reproducible yet. The results file notes that its test and bug-injection tools aren't published yet.
Some hard cases stay hard. One privacy task (emailing many subscribers without exposing their addresses) passed only 2 of 5 runs in every arm, with or without the skill.
Less code isn't automatically better. A smaller diff is only a win if validation, error handling and accessibility survive. The security results show no regression, but your own review process should still be the judge.
It is a prompt, not a guarantee. Like any skill, it shapes the agent's behavior rather than enforcing it. Results will vary by model, task and how much context the agent has about your repo.
The method and per-task tables are published in the repo at benchmarks/results/2026-10-07-agentic.md, which is a good sign. Still, it is worth running it on your own codebase before trusting it.
Verdict
Ponytail is a small idea executed with unusual rigor: before writing code, check whether you need to. For anyone who has watched an AI agent produce a 300-line solution to a 10-line problem, it is easy to see the appeal.
The best way to evaluate it is the cheapest one. Install it on a project you know well, ask for something you can mentally estimate, and compare the diff to what you would have written yourself.
If the veteran engineer with the ponytail would have nodded, it's working.
Repository: github.com/DietrichGebert/ponytail · Project site: ponytail.dev · Benchmark results: 2026-10-07-agentic.md
Comments(0)
Join the discussion by logging into your account.
No comments yet. Be the first to comment!