Ask an agent to remove duplicate tags and it might leave you with a new package and configuration to maintain. Ponytail, an open-source skill by Dietrich Gebert, instructs coding agents to look for existing project code and built-in features before adding anything.
Install in Codex
Run these commands in order from a terminal. Codex needs Node.js on its path to run the plugin’s lifecycle hooks.
codex plugin marketplace add DietrichGebert/ponytail
codex plugin add ponytail@ponytailOpen /hooks in the Codex CLI and inspect the two hooks Ponytail registered. Approve them if you trust what they run, then start a new chat. For the desktop app, restart it after installation. Official Ponytail installation guide
Install in Claude Code
Send each line separately in the Claude Code prompt. After installing, start a new session and use /ponytail full to select the default level explicitly.
/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytailWrite a first request with acceptance criteria
In Codex with the upstream plugin installed, select the Ponytail skill in the composer or invoke it with $ponytail:ponytail. In Claude Code, enable the mode with /ponytail full, then send this request.
Remove duplicate tags from the list.
Keep first-seen order and preserve tags that differ in case.
Check for an existing helper first. Verify empty and duplicate input.Compare the implementation choices
One implementation could introduce a custom duplicate checker and a separate list conversion step. JavaScript’s Set already iterates strings in insertion order and treats differently cased strings as distinct. If the project has no equivalent helper, that covers the requested behavior in one line.
This example illustrates the behavior. Save it as tags.mjs and run node tags.mjs to check ordering, case and empty input.
import assert from 'node:assert/strict';
const uniqueTags = tags => [...new Set(tags)];
assert.deepEqual(uniqueTags(['news', 'AI', 'news', 'ai']), ['news', 'AI', 'ai']);
assert.deepEqual(uniqueTags([]), []);If your product treats tags as case-insensitive, decide which strings count as equal and which spelling to keep. Check the existing callers before adapting the example to your project.
Choose an intensity
Table 1 · Which Ponytail level to use
| Level | When to use it |
|---|---|
| Lite | Keep the requested scope and hear a smaller option if one exists. |
| Full | Find the smallest complete change, starting with existing code and built-in features. This is the default. |
| Ultra | Revisit whether the feature or option needs to exist. |
Keep validation at input boundaries, error handling that protects data, security and accessibility at every level. When the change comes back, read the diff and check that the acceptance criteria from your prompt are covered by the tests. Original Ponytail skill