# /ponytail-audit: Rank what to fix first across a whole repository

Source: https://trendhub.net/skills/dietrichgebert-ponytail/ponytail-audit
Skill folder: https://github.com/DietrichGebert/ponytail/tree/main/skills/ponytail-audit
Pack: Ponytail (https://trendhub.net/skills/dietrichgebert-ponytail)
Works with: Claude Code, Codex

Ponytail-audit applies the review checks to an entire repo or a named folder. The agent maps entry points, build and deploy config, dependencies and tests, follows the main data flows fully, and concentrates on paths where mistakes cost most. It returns at most twenty ranked findings in plain English, a verdict on what to fix first, and the parts it did not read.

## When to use it

- You have inherited a codebase and need to know where the real risks are.
- You want to find dead code, duplicate helpers or dependencies the platform already covers.
- You need a prioritized list before planning a cleanup.

## How it works

1. **Map the repo**: The agent reads the README, deploy and build config, dependency list, entry points such as routes, jobs and CLI commands, and the tests.
2. **Set the load**: It works out whether the project serves one person or many concurrent users and judges scale problems against that.
3. **Trace main flows**: It follows user input, money, auth, data writes and background jobs end to end, going deep where mistakes are costly.
4. **Verify before reporting**: Each finding needs a concrete failing case, and code is called unused only after searching the whole tree including config and dynamic references.
5. **Rank and report**: It lists numbered must, should and nice-to-have findings, possible line and dependency savings, and the parts it did not check.

## What it steers the agent away from

- Calling code unused without searching tests, fixtures and string references
- Splitting functions just to make them shorter
- Overwhelming lists with no clear first fix

## What it can touch

Reads repository files and config and runs searches; it is a one-shot report that changes no code.

## Pairs well with

- `/ponytail-debt`
- `/ponytail-review`

## Questions

### Can I limit it to part of the repo?

Yes. Name a folder or package and it audits only that; with nothing named it covers the whole repo.

### What does it do on a very large codebase?

It prioritizes the paths where errors cost most rather than reading every file, and lists what it skipped.
