DietrichGebert /
ponytail
A skill that makes AI coding agents write the least code that works
- 173.7k stars
- 22.8k stars since 3 Oct
- JavaScript
- Updated 5 days ago
- Beginner friendly
- Agent skills & plugins
AI coding agents often over-build. Ask for a date picker and you may get a new library, a wrapper component and a stylesheet. Ponytail gives the agent a habit instead: stop at the first option that works, and write only what the task needs.
Before coding, the agent walks a seven-step ladder. Does this need to exist? Is it already in the codebase? Does the standard library, the platform or an installed dependency do it? Can it be one line? Only then does it write the minimum. It reads and traces the relevant code first, so it is lazy about the solution but not about understanding.
The README says validation at trust boundaries, data-loss handling, security and accessibility are never cut. It compares itself with a no-skill agent, a terse-prose skill (caveman) and a plain 'YAGNI + one-liners' prompt. In the author's own benchmark (Haiku 4.5, 12 tasks, 4 runs each), lines of code fell about 54% on average. The gain is near zero where code is already minimal.
What it does
Seven-step decision ladder
The agent checks whether the code is needed, already exists, or is covered by the stdlib, the platform or an installed dependency. It writes new code only as a last step.
Safety guards kept
Trust-boundary validation, data-loss handling, security and accessibility are explicitly protected from trimming.
Levels and commands
You can switch between lite, full, ultra and off. The README also lists commands for review, audit, debt, gain and help.
Wide agent support
Install steps cover Claude Code, Codex, Copilot CLI, Gemini CLI, OpenCode, Hermes, Swival, Devin CLI and others.
Reproducible benchmarks
The repo includes a benchmarks folder and a writeup of the method and limitations, so you can rerun the tests yourself.
What you could build
- Install it in Claude Code to stop the agent adding libraries for things the browser already does.
- Run the review command to find over-built code in an existing project.
- Use the audit and debt commands to spot code that could be deleted or simplified.
- Drop AGENTS.md into a project so agents like CodeWhale or Qoder follow the same rules.
- Rerun the benchmarks to check the savings on your own model and tasks.
Get started
In Claude Code, send the two /plugin commands as separate prompts: first add the marketplace, then install the plugin. Other agents have their own commands in the README. Make sure node is on your PATH so the lifecycle hooks run cleanly.
/plugin marketplace add DietrichGebert/ponytail/plugin install ponytail@ponytailCommands are copied from the project's README. Read it on GitHub for the full setup.
Anything better than ponytail?
Ponytail is the only pick here that targets the specific job of making an agent write less code (skip, reuse, shrink). Look elsewhere if you need a full workflow (superpowers, agent-skills) or lower token cost (caveman, headroom).
-
superpowersUse alongside Use it alongside Ponytail to get a plan, test-first, review workflow, while Ponytail keeps the code the agent writes small. Trade-off: It adds a fixed, heavier process that can feel slow on small tasks, and its steps may produce more code than Ponytail wants.
-
agent-skillsUse alongside Use it with Ponytail for lifecycle skills (spec, plan, build, test, review, ship) and slash commands, with Ponytail trimming what gets built. Trade-off: 25 skills is a lot of instruction to load, and none of them target minimal code specifically.
-
cavemanUse alongside
Use it with Ponytail if you also want terse replies and smaller logs read, cutting token spend beyond the code itself.
Trade-off: It shortens output and input text, not the amount of code written, and the proxy adds setup.
-
headroomUse alongside Use it with Ponytail to compress tool output, logs and files before the model sees them, lowering token cost. Trade-off: It runs as a proxy, library or wrapper, which is more setup, and it doesn't change how much code gets written.