← 开源
DietrichGebert

ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

AI EngineeringPrompt & ScaffoldJavaScript
在 GitHub 打开
增长势头
+1,57924 小时新增 Star+1.0%
155.6k
Star
8.36k
Fork
+8,470
本周
91
贡献者
创建于 2026-06-12 · 更新于 2026-10-05 · 今日第 3 名
主要开发者
README

Ponytail, the lazy senior dev

Ponytail

He says nothing. He writes one line. It works.

DietrichGebert%2Fponytail | Trendshift

Stars Release npm Works with 20 agents MIT license

DietrichGebert/ponytail | Trendshift DietrichGebert/ponytail | Trendshift DietrichGebert%2Fponytail | Trendshift monthly ranking

~54% less code (up to 94%) · ~20% cheaper · ~27% faster · 100% safe

Real Claude Code sessions editing a real FastAPI + React repo, the same agent with and without the skill (12 feature tasks, Haiku 4.5, n=4). Details.

Español · 한국어 · 简体中文 · 日本語


Something's coming, join the waitlist

Already built with Ponytail

Retriever


You know him. Long ponytail. Oval glasses. Has been at the company longer than the version control. You show him fifty lines; he looks at them, says nothing, and replaces them with one.

Ponytail puts him inside your AI agent.

The prompt

Ponytail is one prompt: skills/ponytail/SKILL.md. The compact version, for agents that read a rules file, is AGENTS.md. Everything else in this repo loads that prompt into different agents.

Install

Claude Code, as two separate prompts:

/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytail

Codex:

codex plugin marketplace add DietrichGebert/ponytail
codex plugin add ponytail@ponytail

Then open /hooks in Codex, trust its two lifecycle hooks, and start a new thread.

Any other agent: copy AGENTS.md into your project, or ask your agent to install skills/ponytail/SKILL.md as a skill. Step by step for Copilot, Cursor, OpenCode, Gemini and the rest: INSTALL.md.

That was it. He'd be proud. He won't say it.

Active every session, with a handful of commands (see Commands). /ponytail ultra exists for when the codebase has wronged you personally. Startup and mode-change text shows the current mode.

Only install ponytail from DietrichGebert/ponytail on GitHub or @dietrichgebert/ponytail on npm. It never ships .exe or .dll files; a copy that does is not mine.

Before / after

You ask for a date picker. Your agent installs flatpickr, writes a wrapper component, adds a stylesheet, and starts a discussion about timezones.

With ponytail:



More survivors in examples/.

How it works

Before writing code, the agent stops at the first rung that holds:

1. Does this need to exist?   → no: skip it (YAGNI)
2. Already in this codebase?  → reuse it, don't rewrite
3. Stdlib does it?            → use it
4. Native platform feature?   → use it
5. Installed dependency?      → use it
6. One line?                  → one line
7. Only then: the minimum that works

The ladder runs after it understands the problem, not instead of it: it reads the code the change touches and traces the real flow before picking a rung. Lazy about the solution, never about reading.

Lazy, not negligent: trust-boundary validation, data-loss handling, security, and accessibility are never on the chopping block.

Commands

Command What it does
/ponytail [lite | full | ultra | off] Set the intensity, or turn it off. No argument switches ponytail on at the default level if it is off, and otherwise reports the current level.
/ponytail-review Review the current diff for over-engineering, hands back a delete-list. Name a target in plain words to narrow or widen it: uncommitted, staged, branch, or a PR link.
/ponytail-audit Audit the whole repo for over-engineering, not just the diff.
/ponytail-debt Harvest the ponytail: shortcuts you've deferred into a ledger, so "later" doesn't become "never".
/ponytail-gain Show the measured impact scoreboard (less code, less cost, more speed) from the benchmark.
/ponytail-help Quick reference for the commands above.

Commands need a skill-capable host (Claude Code, Codex, Devin CLI, OpenCode, Gemini, pi, Hermes Agent, Qoder, Grok Build). In Codex CLI and the IDE extension they're skills under the plugin's namespace; invoke with $ponytail:ponytail-review. Cursor with the hooks gets /ponytail level switching only, typed as a plain message. The instruction-only adapters (Cursor's rule file, Windsurf, Cline, Copilot, Kiro, Antigravity) load the always-on ruleset without the commands.

Numbers

The honest measurement is a real agent doing real work: a headless Claude Code session editing tiangolo's full-stack-fastapi-template (a real FastAPI + React repo), scored on the git diff it leaves behind. Twelve feature tickets, the same agent with and without the skill, n=4, Haiku 4.5.

Each arm as a percent of the no-skill baseline across LOC, tokens, cost and time (Haiku 4.5). ponytail is lowest on every metric (LOC 46%, tokens 78%, cost 80%, time 73%); caveman rises above 100% on tokens, cost and time; yagni-oneliner LOC 67%. Safety, separate adversarial tier: baseline, caveman and ponytail 100%, yagni-oneliner 95%.

vs no-skill baseline LOC tokens cost time safe
ponytail -54% -22% -20% -27% 100%
caveman (terse-prose control) -20% +7% +3% +2% 100%
"YAGNI + one-liners" prompt -33% -14% -21% -30% 95%

ponytail is the only arm that cuts every metric, and the only one that stays fully safe while doing it. The cut is biggest where there is a real over-build trap (date picker 404 to 23 lines, color picker 287 to 23, because it reaches for a native `` instead of a component) and near zero on code that is already minimal. Full method, per-task tables, and limitations: benchmarks/results/2026-06-18-agentic.md.

Older single-shot numbers (isolated generation)

Five everyday tasks, three models, three arms (no skill, caveman, ponytail), ten runs, median reported. One prompt, one completion, counting lines of the answer:

Median lines of code per arm across Haiku, Sonnet and Opus

This showed 80-94% less code. #126 fairly pointed out that the bare-model baseline pads its answer with prose and options, so that gap is partly a conversational-baseline artifact. The agentic numbers above are the corrected, defensible version. Reproduce the single-shot run with npx promptfoo eval -c benchmarks/promptfooconfig.yaml.

The rule was never "fewest tokens." It is: write only what the task needs, and never cut validation, error handling, security, or accessibility. The code ends up small because it is necessary, not golfed. Lower cost and latency are a side effect on the models that follow the ladder; a terse reasoning model that spends thinking tokens deliberating the rungs can go the other way (on GPT-5.5 it does).

FAQ

Can I use it with caveman? Yes, and you should. Caveman shrinks what the agent says; ponytail shrinks what it builds. Different halves, no overlap: caveman leaves code byte-for-byte exact, ponytail stays out of the prose. Terse talk about minimal code.

Does it need a config file? No. An optional ~/.config/ponytail/config.json or PONYTAIL_DEFAULT_MODE env var can set the default level, but nothing is required.

What if I really need the 120-line cache class? You don't. Insist anyway and he'll build it. Slowly. Correctly. While looking at you.

Does it scale? The code you never wrote scales infinitely. Zero bugs, zero CVEs, 100% uptime since forever.

Why "ponytail"? You know exactly why.

Sponsors

GreenPT

License

MIT. The shortest license that works.

Star History

Star History Chart