If you have ever watched an AI agent write 500 lines for something that only needed 50, this is for you. The agent is not being lazy, it is being the opposite: it happily rebuilds things that already exist and pads out simple jobs. More code sounds productive, but it usually means more bugs, more to maintain, and a bigger bill.
Ponytail is a skill by DietrichGebert (over 100,000 stars on GitHub) that fixes this. It forces the agent through a short decision ladder before it writes anything.
Before writing new code, the agent has to answer, in order:
The tagline sums it up: the best code is the code you never wrote.
It is two commands. Open Claude Code and run:
/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytail
That is it. From now on it runs on your coding sessions automatically.
Ponytail also ships rule files for other agents. Copy the matching file from the repo into your editor's rules folder:
.cursor/rules/.windsurf/rules/.clinerules/AGENTS.md: drop it in at the project root.On the author's own benchmark (a real full-stack repo, 12 feature tickets), Ponytail produced up to 54% less code, about 20% cheaper, and 27% faster, using around 22% fewer tokens.
Two honest caveats so you are not disappointed:
The point underneath the numbers is the good part: it only writes what the task actually needs, and it never cuts corners on validation, error handling, or security to hit a smaller number.