Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/halflength-ampleness75/claude-code-recipes/performance-auditgit clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/performance-audit)<a href="https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/performance-audit"><img src="https://agentmods.dev/badge/commands/halflength-ampleness75/claude-code-recipes/performance-audit.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00017 | $0.01282 |
| Opus 5 | $0.00009 | $0.00641 |
| Sonnet 5 | $0.00003 | $0.00256 |
| Haiku 4.5 | $0.00002 | $0.00128 |
Grade A, and why
performance-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a performance engineer. Audit this codebase for performance bottlenecks and optimization opportunities.
Step 1 — Identify the Stack
Determine the project type and tech stack to focus on the most relevant checks:
- Frontend: React, Vue, Svelte, Angular — check rendering, bundle size, lazy loading
- Backend: Express, Fastify, Django, Flask, Rails — check queries, caching, async patterns
- Full-stack: Check both sides plus the data transfer layer
- CLI/Library: Check algorithmic complexity, memory usage, startup time
Read package.json, tsconfig.json, webpack.config.*, vite.config.*, build configs, and ORM configuration to understand the setup.
Step 2 — Database and Query Performance
Search for database queries and ORM usage:
N+1 Query Detection
- Look for queries inside loops: a query in a
for/forEach/mapthat runs once per item - In ORMs, look for lazy-loaded relationships accessed in loops without eager loading
- Search for patterns like: loop ->
await Model.findById(), loop ->.query(), loop ->SELECT - Check for missing
.include(),.populate(),.prefetch_related(),.joins(),.eager_load()
Missing Indexes
- Find
WHERE,ORDER BY,GROUP BYclauses and check if the filtered columns are indexed - Look at schema/migration files for index definitions
- Flag foreign key columns without indexes
Unbounded Queries
- Search for queries without
LIMITor pagination - Look for
SELECT *when only specific columns are needed - Check for missing cursor-based or offset pagination on list endpoints
Connection Management
- Verify connection pooling is configured (not opening a new connection per request)
- Check for missing connection cleanup or pool exhaustion risks
Step 3 — Frontend Performance (if applicable)
Rendering Efficiency
- Search for components that re-render unnecessarily: missing
React.memo,useMemo,useCallbackon expensive computations or callbacks passed as props - Look for state updates that trigger re-renders of large subtrees
- Check for inline object/array/function creation in JSX props (new reference every render)
- Search for
useEffectwith missing or overly broad dependency arrays
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 135 lines · 17 tokens per session scan A 3874b426d318
performance-audit is a command published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed 5d ago), licensed MIT. It adds 17 tokens to every session and 1,282 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
pull-repos
Pull all repos (parent + marketplace clones + configured project repos).
security-scan
Run security audit on codebase.
test-suite
Run comprehensive test suite with coverage analysis.
standardize-claude-md
Add missing toolkit sections (Related Global Rules, Quick Start) to existing CLAUDE.md.
help
Explain Ralph Wiggum technique and available commands.
update-counts
Update all hardcoded counts (skills, agents, marketplace repos/skills) across documentation from filesystem.