TokenRa
Get API Key

Third-party skill ยท Claude Code

Ponytail for Claude Code

Ponytail is an open-source skill that makes coding agents write less code. This page covers installing it in Claude Code, switching its levels, what its benchmark actually claims about tokens and cost, and how to run it against TokenRa instead of Anthropic.

Repository
DietrichGebert/ponytail
License
MIT, open source
Also works with
Codex CLI, Cursor, OpenCode, Gemini CLI and 15 more agents
Levels
lite / full / ultra / off

Overview

What Ponytail is

Ponytail injects a short ruleset into your agent so that it writes only what the task needs: it reuses what the repository already has instead of adding a library, it skips abstractions nobody asked for, and it does not pad a diff. The project frames the persona as the laziest senior developer in the room — the code you never wrote is the cheapest code.

What it does not cut is safety. The ruleset explicitly keeps validation, error handling, security and accessibility: the code is small because it is necessary, not golfed.

Not made by TokenRa
Ponytail is a third-party open-source project maintained by Dietrich Gebert at github.com/DietrichGebert/ponytail. It is unrelated to TokenRa and to Anthropic, and it does not change any API — it only changes what the agent is told to write. TokenRa is where you get the model that runs it.

Install

Install Ponytail in Claude Code

You need Claude Code already running and node on your PATH. The Claude Code plugin ships two small Node.js lifecycle hooks; without Node the skills still work, but every hook call prints a harmless node: command not found error.

The install is two slash commands, and they have to be sent as two separate prompts — pasting both at once does not work:

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

Start a new session afterwards. In a session, /ponytail reports the level that is active, and a band above the prompt shows what the current task is costing in tokens and agent time.

In the Claude Code desktop app

Type the same two commands into the prompt box in the Code tab, or click the + button next to it and choose Plugins → Add plugin to pick the marketplace you just added.

If the plugin does not show up

  • Run the two commands one at a time and wait for each to finish. Sending them together is the most common reason the install silently does not happen.
  • Check that the marketplace line succeeded before installing: /plugin marketplace list should contain ponytail.
  • Restart the session. The ruleset is injected on session start, so a session opened before the install does not pick it up.

Other agents

Installing it for other agents

Ponytail ships adapters for around twenty agents. The two that come up most next to Claude Code:

HostInstallNotes
Codex CLIcodex plugin marketplace add DietrichGebert/ponytail
codex plugin add ponytail@ponytail
Then open /hooks, review and trust the two lifecycle hooks, and start a new thread.
Skills CLI (many agents)npx skills add DietrichGebert/ponytailCopies the six skills into the agent's skills folder. --agent picks the host, --global installs for your user. Skills only — no always-on ruleset.

Cursor uses native hooks instead of a plugin: clone the repo and run node ponytail/scripts/cursor-hooks.js install. Agents without a plugin system read the repo's AGENTS.md, or the matching rules file for Cline, Windsurf, Kiro or Copilot — copy it into your project. The full matrix is in the repository's INSTALL.md.

Levels

Switching levels

Ponytail runs at one of four levels. Send the command as a plain message inside the session:

CommandEffect
/ponytailReports the level that is active for this session.
/ponytail liteThe lightest ruleset.
/ponytail fullThe default level.
/ponytail ultraThe strictest level.
/ponytail offStops injecting the ruleset for the rest of the session.

Making a level the default

Set the environment variable PONYTAIL_DEFAULT_MODE to lite, full, ultra or off, or write a defaultMode field into the config file:

config.json
# Linux / macOS: ~/.config/ponytail/config.json
# Windows: %APPDATA%\ponytail\config.json
{
  "defaultMode": "full"
}

Without either setting the default is full. The ruleset is also injected into subagents; set PONYTAIL_SUBAGENT_MATCHER to a regex of agent types if you want to keep it off read-only search agents.

Uninstall

Remove the plugin with /plugin remove ponytail. A small amount of state lives outside the plugin folder — the mode flag, the config file and, if you accepted the prompt, a statusLine entry in ~/.claude/settings.json. Run node scripts/uninstall.js from a clone of the repository before the remove command to clean those up too.

Benchmarks

What it actually saves

The numbers most people quote come from the project's own benchmark: 39 tasks, including a real FastAPI + React repository, run five times each in Claude Code on Opus 5.5, with and without the skill.

MeasureClaimed changeShare of the no-skill baseline
Lines of code−53%47%
Output tokens−45%55%
Cost−26%74%
Wall-clock time−41%59%

The same benchmark reports that 98% of risky logic shipped with a test, against 68% without the skill, and that the agent's own tests caught 66% of injected bugs against 46%. On six security tasks — SQL injection, path traversal, forged tokens, rate limiting, malformed CSV rows and caching — it passed all thirty runs.

Read the numbers as the project's own
These are self-reported benchmarks from one project, not an independent evaluation. Treat the percentages as a direction, not a guarantee: how much you save depends on the repository, the task and the level. The honest framing from the project itself is that the point was never the fewest tokens — it is writing only what the task needs.

Cost moves less than tokens because the cached prompt prefix and the fixed part of every request do not shrink. If your bill is dominated by input tokens on a large repository, expect a smaller saving than the table suggests.

TokenRa

Running Ponytail on TokenRa

Ponytail changes the prompt, not the transport, so it works the same on any endpoint that speaks the Anthropic Messages API. Point Claude Code at TokenRa and the skill keeps injecting its ruleset as usual:

settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://tokenra.io",
    "ANTHROPIC_AUTH_TOKEN": "sk-...",
    "ANTHROPIC_MODEL": "kimi-k3.1-pro"
  }
}

The full walkthrough — key, model aliases, subagent model, error codes — is on the Claude Code setup page. Two things are worth knowing before you combine the two:

  • Ponytail's status-line band reports tokens and cost for the current task. TokenRa's Usage Logs give you the same numbers per request, billed at live rates, which is how you check the saving on your own repository instead of trusting a benchmark.
  • Anything the agent runs locally — /plugin, the hooks, the config file — stays local. Only the model calls go to TokenRa.

FAQ

FAQ

What is Ponytail in Claude?

It is an open-source skill (also packaged as a plugin) that adds a "lazy senior developer" ruleset to a coding agent, so the agent writes the smallest change that solves the task. It is not a Claude model and not an Anthropic product.

How do I add Ponytail to Claude Code?

Send /plugin marketplace add DietrichGebert/ponytail, then, as a separate prompt, /plugin install ponytail@ponytail. Start a new session and check with /ponytail.

Does Ponytail really cut tokens?

The project's own benchmark reports about 45% fewer output tokens and 26% lower cost on 39 tasks. Independent write-ups have found the effect much smaller, and it depends heavily on the task: work that mostly reads a large repository saves less, because the input side does not shrink.

Is Ponytail good for Claude?

It is a trade. You get smaller diffs and less unnecessary code; you give up some freedom for the agent to choose a heavier solution. It suits greenfield and refactor work less than it suits patching an existing codebase, and the strictest level can be too aggressive on tasks that genuinely need new structure. Start at full and try lite on your own repository before trusting the numbers.

Does it work with models other than Claude?

Yes. The ruleset is plain text, so it works with any agent that can be given instructions — Codex CLI, Gemini CLI, OpenCode, Cursor and others. On TokenRa, any model in the model list that supports tool calling will run it.

Why does the status line print node: command not found?

The lifecycle hooks are Node.js scripts. Install Node, or make sure node is on the non-interactive shell's PATH — with nvm or Nix it often is not. The skills keep working either way.

Do my prompts go to TokenRa?

Yes, when Claude Code is configured with the TokenRa base URL. Your prompts and the file contents the agent reads are sent to TokenRa, which forwards them to the model provider. Zero data retention describes how that content is handled.