DietrichGebert/ponytail
A ruleset that teaches AI coding agents to say no to writing code
ponytail is a set of rules (shipped as a plugin/skill) that makes AI coding agents like Claude Code and Codex check whether code even needs to be written before writing it. It pushes the agent to reuse existing code, standard libraries, or native platform features before reaching for a new dependency or component. In a real test on a FastAPI+React repo, the same agent with ponytail wrote 54% less code on average while keeping all its safety checks (validation, error handling, security, accessibility) intact.
What it does
- The problem: ask an AI agent for a date picker and it installs a library (flatpickr), writes a wrapper component, adds a stylesheet, and starts overthinking edge cases like timezones.
- The fix: before writing anything, the agent is made to check a fixed order of questions - does this need to exist, is it already in the codebase, does the standard library do it, does the platform have it natively, is a dependency already installed, can it be one line - and only builds the minimum after all of those fail.
- The result: on 12 real feature tickets in the tiangolo full-stack-fastapi-template repo, run with a headless Claude Code session (Haiku 4.5 model, 4 runs each), ponytail cut lines of code by 54% on average (up to 94%) versus the same agent with no skill, cut tokens by 22%, cost by 20%, and time by 27%, while keeping a safety score of 100%.
- Comparison: a plain terse-prose control (caveman) and a simple 'YAGNI plus one-liners' prompt were also tested; both did worse on cost/time/tokens or dropped safety to 95%, while ponytail was the only approach that improved every metric without losing safety.
- Setup: it installs as a plugin or a copied rules file across more than 20 AI coding tools, including Claude Code, Codex, GitHub Copilot CLI, Cursor, Windsurf, and Gemini CLI.
Why it matters
AI coding agents tend to over-build - adding unnecessary dependencies, components, and complexity - which increases maintenance burden and attack surface; this tool addresses that with plain instruction text rather than retraining any model. It gives teams adopting AI coding agents a concrete, measured way to control both code bloat and the cost/time of agent sessions.
Terms in this repo
- YAGNI · 'You Aren't Gonna Need It' - a principle against building features before they're actually needed
- LOC · Lines of Code
- AGENTS.md · A shared instruction file many AI coding tools automatically read from a project
- n=4 · Each task was run 4 times to get the measurement
- Haiku 4.5 · The AI model used for this benchmark
Repository description (English)
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Open on GitHubTrending repos
- liustack/modlensA plugin that lets text-only AI models like DeepSeek 'see' pasted images by turning them into structured text data
- marin-community/marinMarin is an open-source platform that publishes the entire process of building large language models, not just the final model
- TauricResearch/TradingAgentsA framework where multiple LLM agents split into analyst, researcher, trader and risk-management roles, debate, and decide stock trades
- Shubhamsaboo/awesome-llm-appsA free collection of 100+ ready-to-run AI agent and RAG app examples
- asciimoo/histerA personal search engine that indexes the full text of every page and file you've seen
- anthropics/claude-plugins-officialAnthropic's official catalog for add-ons that plug new abilities into Claude Code
- vorssaint/vorssaint-utilsOne free menu bar app replaces a dozen paid Mac utilities
- MadsLorentzen/ai-job-searchAn open-source framework that runs your entire job search through Claude Code, built by someone who actually got hired using it
Latest from METAL LAB
- Anthropic funds $5M research program for AI wellbeing evaluations
- Keenable Raises $26M Seed to Build Web Search for AI Agents
- Gamma acquires Accel-backed design startup Lica
- Oura's rumored September IPO is being priced on AI, not the ring
- Alabama Launches Investigation into OpenAI Agent Breakout Incident