ponytail
OtherDietrichGebert/ponytail
Agent skill that makes AI coders write minimal code like a lazy senior dev.
Overview
Ponytail is a skill plugin for AI coding agents like Claude Code and Codex that enforces YAGNI discipline: reuse existing code, prefer stdlib and native platform features, and write only the minimum that works. A decision ladder guides the agent to the simplest solution while never cutting validation, security, error handling, or accessibility. Benchmarks show roughly 54% less code, 20% lower cost, and 27% faster runs with full safety retained.
README Preview
\n \n \n \n \n\n\nPonytail\n\n\n He says nothing. He writes one line. It works.\n\n\n\n \n \n \n \n \n\n\n\n \n \n\n\n\n ~54% less code (up to 94%) · ~20% cheaper · ~27% faster · 100% safe\n Measured on real Claude Code sessions editing a real open-source repo (FastAPI + React), against the same agent with no skill. ~54% is the mean across 12 feature tasks (Haiku 4.5, n=4); it reaches 94% where an agent over-builds (a date picker) and is near zero where the code is already minimal. ponytail keeps every safety guard while a bare "write one-liners" prompt drops one. (The earlier single-shot benchmark reported 80-94% as a flat figure; against a fair agentic baseline that is the per-task ceiling, not the average.) Full writeup · reproduce it.\n\n\n\n Español · 한국어\n\n\n---\n\n\n \n\n\nYou 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.\n\nPonytail puts him inside your AI agent.\n\n## Before / after\n\nYou ask for a date picker. Your agent installs flatpickr, writes a wrapper component, adds a stylesheet, and starts a discussion about timezones.\n\nWith ponytail:\n\n```html\n\n\n```\n\nMore survivors in [examples/](examples/).\n\n## Numbers\n\nThe honest measurement is a real agent doing real work: a headless Claude Code session editing [tiangolo's full-stack-fastapi-template](https://github.com/fastapi/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.\n\n\n \n\n\n| vs no-skill baseline | LOC | tokens | cost | time | safe |\n|---|--:|--:|--:|--:|--:|\n| **ponytail** | **-54%** | **-22%** | **-20%** | **-27%** | **100%** |\n| caveman (terse-prose control) | -20% | +7% | +3% | +2% | 100% |\n| "YAGNI + one-liners" prompt | -33% | -14% | -21% | -30% | 95%
FAQ (4)
TroubleshootingHow to fix 'UserPromptSubmit hook timed out after 5s — output discarded' error on Windows in Claude Code?
This is caused by cold-start overhead on Windows (first PowerShell/node launch, antivirus scanning), not by a slow script — the hook itself runs in ~0.15–0.2s. Fix: update the ponytail plugin to the release containing PR #1165, which raises the hook timeouts (e.g. to 15s) and runs hooks directly via node -e "require(...)" instead of the slower PowerShell commandWindows wrapper. Temporary workaround for 4.8.4: edit hooks/claude-codex-hooks.json (in both the plugin cache and marketplace copy) and change "timeout": 5 to "timeout": 15 for UserPromptSubmit (and optionally SessionStart/SubagentStart). Note: local edits are overwritten on every plugin update, so updating the plugin is the permanent fix.
TroubleshootingHow to fix severe input lag in the Codex VS Code extension composer?
The lag is caused by an oversized plugin composerIcon (e.g., Ponytail 5.3.2's 554 KB logo.png) that Codex serializes as ~739 KB Base64 into pluginMention.attrs.iconSmall and duplicates in every prompt-history entry, growing the persisted state past 13 MB and stalling the main thread during state serialization/IPC. Fixes: 1) Update the Ponytail plugin to the release containing PR #1164, which replaces the large composer icon with a small asset. 2) As an immediate workaround, clear the persisted Codex state: close VS Code, open the profile's state.vscdb and delete the openai.chatgpt entry (or use a fresh VS Code profile) — input becomes smooth immediately, though lag returns if the oversized icon repopulates history. 3) Plugin authors should point composerIcon in .codex-plugin/plugin.json to a tiny file (e.g., a ~6 KB SVG like assets/logo-greenpt.svg or an optimized small PNG) instead of a large PNG.
How-toHow to install and use this plugin with oh-my-pi (omp)?
You can install it as an oh-my-pi plugin in two ways: 1) Run omp https://github.com/DietrichGebert/ponytail in your terminal — ponytail will be saved as a plugin automatically. 2) Use the plugin marketplace commands: omp plugin marketplace add DietrichGebert/ponytail, then omp plugin install ponytail@ponytail, and verify with omp plugin list.
TroubleshootingWhy is the Ponytail codebase map missing from SessionStart context in Claude Code on Windows?
Known bug in Ponytail 5.2.0–5.3.2: optional codebase-map generation was moved into a child process with a hard 1,000 ms timeout. On Windows, startup contention from other SessionStart hooks (e.g., superpowers, OpenWolf, claude-mem) or large repositories (~2,000 tracked files) pushes the child process past the 1s limit, so the map is silently omitted while mandatory rules still load. Fix: upgrade to the Ponytail release containing PR #1166 (first release after 5.3.2), which resolves the timeout issue. Workarounds until then: (1) downgrade to Ponytail 5.1.0, which generates the map in-process without a timeout; (2) reduce the number of concurrent SessionStart hooks to lower CPU contention; (3) reduce tracked/untracked file count in the repository (e.g., gitignore bulk JSON/data files) so map generation finishes within 1 second.