Ponytail Installation Guide: How to Use It with Codex, Claude Code, and Gemini CLI

Ponytail is a rule and plugin set for AI coding agents. It helps Codex, Claude Code, Copilot CLI, Gemini CLI, and similar tools decide whether new code is really needed before writing it, and encourages reuse of existing code, standard libraries, platform features, and installed dependencies.

Ponytail is an interesting plugin for AI coding agents.

It does not try to make AI more flashy. It does the opposite: it reminds the agent to pause before writing code and check whether the task can be solved by deleting code, reusing existing code, using a standard library, or relying on a browser or platform feature.

Project: DietrichGebert/ponytail

If you often see this:

1
2
3
You only asked for a date picker, but the AI installed a component library, wrote a wrapper, added styles, and started discussing time zones.
You only wanted a small logic change, but the AI extracted three layers of helpers.
You only wanted to fix a bug, but the AI refactored half the file.

Ponytail’s direction is exactly the point: make the AI behave more like a lazy but reliable senior developer, looking for the smallest useful change first.

What Ponytail is

Ponytail is a set of working rules for AI coding agents.

It asks the agent to follow a simple ladder before writing code:

1
2
3
4
5
6
7
1. Does this thing really need to exist?
2. Does the codebase already have it?
3. Can the standard library do it?
4. Can the platform do it natively?
5. Can an installed dependency do it?
6. Can one line solve it?
7. Only then write just enough new code.

This is not code golf. It is not about blindly making everything shorter. It is about avoiding unnecessary work: delete when possible, reuse when possible, and use native capabilities before reinventing them.

The README gives a typical example: a date picker.

A normal AI may install flatpickr, write a wrapper, add styles, and explain many edge cases.

The Ponytail style first considers:

1
<input type="date">

That is the habit it tries to teach the agent.

It solves overengineering, not just long code

Ponytail is easy to misunderstand as “make AI write one-liners.”

A better description is: make AI avoid unnecessary design.

It keeps safety boundaries. It does not encourage removing necessary validation, error handling, security handling, or accessibility. Necessary work still needs to be done; Ponytail simply pushes the agent away from adding complexity for small requests.

Good use cases include:

  • Small frontend features;
  • Form controls;
  • Simple helper functions;
  • Configuration changes;
  • Small bug fixes;
  • Code review for overimplementation;
  • Adding constraints before an AI edits code;
  • Asking the agent to search existing code first.

Do not interpret it as:

  • Always write one line;
  • Never add dependencies;
  • Never refactor;
  • Sacrifice maintainability to reduce code;
  • Skip reading the codebase for speed.

Ponytail is lazy about implementation, not lazy about reading.

Supported AI coding tools

According to the README, Ponytail covers many tools, including:

  • Claude Code;
  • Codex;
  • GitHub Copilot CLI;
  • Pi agent harness;
  • OpenCode;
  • Gemini CLI;
  • Antigravity CLI;
  • CodeWhale;
  • Swival;
  • OpenClaw;
  • Cursor, Windsurf, Cline, Aider, Kiro, Zed, and other rule-file based tools.

The nice part is that you do not necessarily need to change your main AI tool.

If you use Codex, install it as a Codex plugin. If you use Claude Code, use the Claude Code plugin marketplace. If you only want the rules inside your editor, copy the matching rule files.

How to install Ponytail in Codex

For Codex CLI, the README gives this entry point:

1
2
codex plugin marketplace add DietrichGebert/ponytail
codex

Then inside Codex:

  1. Open /plugins;
  2. Select the Ponytail marketplace;
  3. Install Ponytail;
  4. Open /hooks;
  5. Review and trust its two lifecycle hooks;
  6. Start a new conversation.

For the Codex desktop app, the README says to restart the app after installation so the plugin can be detected.

One detail matters: Ponytail’s Claude Code and Codex plugins run two small Node.js lifecycle hooks, so node must be available in PATH. The README also notes that if node is missing, the skills can still work, but always-on activation will not happen automatically.

Check first:

1
node -v

If the command is not found, install Node.js or make sure the non-interactive shell PATH can find node.

How to install it in Claude Code

For Claude Code, use:

1
/plugin marketplace add DietrichGebert/ponytail

Then send:

1
/plugin install ponytail@ponytail

The README explicitly says these should be sent as two separate messages.

If you use the Claude desktop app and do not have /plugin, add a personal plugin marketplace from the UI:

  1. Open Customize;
  2. Click the plus button next to personal plugins;
  3. Create a plugin and add the marketplace;
  4. Choose Add from repository;
  5. Enter the Ponytail GitHub repository URL.

How to install it in GitHub Copilot CLI

Copilot CLI can use:

1
2
copilot plugin marketplace add DietrichGebert/ponytail
copilot plugin install ponytail@ponytail

Inside an interactive Copilot CLI session, you can also use slash commands:

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

After installation, Copilot CLI can use Ponytail commands mentioned in the README, such as:

1
2
/ponytail:ponytail ultra
/ponytail:ponytail-review

Gemini CLI and Antigravity CLI

For Gemini CLI:

1
gemini extensions install https://github.com/DietrichGebert/ponytail

It loads the rule set as session context and registers /ponytail commands.

For Antigravity CLI:

1
agy plugin install https://github.com/DietrichGebert/ponytail

The README also notes that Google is renaming Gemini CLI to Antigravity CLI, so both paths may exist for a while. Use the CLI name that matches your installed tool.

How to use it with OpenCode

OpenCode can add this to opencode.json:

1
{ "plugin": ["@dietrichgebert/ponytail"] }

If you run it from a local checkout, point to the local plugin file:

1
{ "plugin": ["./.opencode/plugins/ponytail.mjs"] }

This is convenient if you already manage project configuration through OpenCode.

What if you only want the rules

The Ponytail repository also contains rule files for different tools, such as:

  • AGENTS.md;
  • .cursor/rules/;
  • .windsurf/rules/;
  • .clinerules;
  • .github/copilot-instructions.md;
  • .kiro/steering/.

If your tool can read project-level rules, you can copy the relevant file directly.

For example, the VS Code Codex extension reads AGENTS.md. Putting Ponytail’s AGENTS.md in the project root, or in a global Codex configuration location, lets Codex follow the same style through rules.

The plugin route is more complete. The rule-file route is lighter.

Useful prompts with Ponytail

After installing it, do not rely only on automatic behavior. You can also write prompts that match Ponytail’s direction.

For example:

1
Please check whether similar code already exists first. Reuse existing code where possible, and only add the smallest new implementation if it does not exist.

Or:

1
Do not overengineer this request. First check whether the standard library, native HTML controls, or installed dependencies can solve it.

For code review:

1
Review this change in the Ponytail style. Focus on over-abstraction, duplicate implementation, unnecessary dependencies, and places where native features can replace custom code.

These prompts point in the same direction as Ponytail and usually produce more stable results.

Typical tasks for Ponytail

1. Frontend controls

Date pickers, color pickers, file uploads, numeric inputs, switches, and select boxes.

AI often reaches for a component library, but native HTML controls are enough in many cases.

2. Helper functions

Deduplication, sorting, formatting, path handling, and date handling.

Check the language standard library and existing helpers before writing a new function.

3. Configuration changes

ESLint, TypeScript, Hugo, Vite, Docker, and CI configuration.

Many configuration problems need a one-line change, not a new script or toolchain.

4. Small bug fixes

Ponytail helps look for the smallest fix point instead of turning one bug into a large refactor.

5. Code review

It works well as an overengineering checker.

Ask the AI to inspect a diff and answer:

  • Is anything reinvented?
  • Are there unnecessary dependencies?
  • Can any code be deleted?
  • Is the implementation more complex than the requirement?
  • Can existing modules be reused?

What to watch out for

Ponytail has a good direction, but do not turn it into a new rulebook.

Do not save code at the cost of:

  • Input validation;
  • Permission checks;
  • Data-loss protection;
  • Concurrency and transaction safety;
  • User privacy;
  • Accessibility;
  • Error handling;
  • Important logs;
  • Test coverage.

Simple does not mean sloppy.

If a feature touches security boundaries, money, user data, or production operations, even the smallest implementation must handle the boundaries clearly.

My suggested way to try it

For a first test:

  1. Install it in a small project;
  2. Try a request that AI often overbuilds, such as a date picker or color picker;
  3. Compare what AI writes without Ponytail;
  4. Ask it to review an existing diff;
  5. Then put it into daily projects.

Do not test it first with a large refactor.

Ponytail is most useful for tasks that are small in reality but easy for AI to inflate.

One-sentence summary

Ponytail does not turn AI into a tool that only writes short code. It makes the AI ask one more question before acting:

1
Does this code really need to be written?

If you use Codex, Claude Code, Copilot CLI, Gemini CLI, or similar AI coding agents and often get annoyed by overimplementation, Ponytail is worth trying. It will not make every architecture decision for you, but it adds a useful constraint: reuse first, avoid detours, and stop reinventing wheels.

记录并分享
Built with Hugo
Theme Stack designed by Jimmy