performance-auditor · qdhenry — Claude Code subagent: what it does
performance-auditor — a subagent that hunts bottlenecks: algorithm cost, N+1 queries, bundle size, wasted re-renders. You get a prioritized report.
no license ★ 1,357 updated 2026-03-01
.claude/agents/performance-auditor.mdWhat performance-auditor does
It works through five areas. Algorithms: how time and memory grow with input size, loops that repeat work, data structures that don't fit the access pattern, missing memoization. Database: N+1 patterns, absent indexes, joins that pull too much, connection pool settings. Frontend: what landed in the bundle, routes that could load on demand, components re-rendering for no reason, memory that never gets released. Backend: API response times, caching, blocked I/O. Network: payload weight, compression, CDN, batched calls.
Measurement comes first, through Bash: it hunts oversized build files, counts installed packages with npm list, finds large .js files on disk. Then it reads source with Read, Grep and Glob to spot repeated work and blocking calls. The result is a written audit: a score, a table of current numbers against targets, each issue with its location and a fix, and a queue split into now, next sprint, this quarter.
The tool set is Read, Grep, Glob and Bash. Nothing writes to disk, so every fix arrives as text and code samples you apply yourself. Sample measurement commands lean on npm, and a project without Node needs its own.
What it helps with
- Find N+1 queries before a release
- Check how a hot loop scales with input size
- See what inflated the bundle and what to split off
- Get a fix list ranked for the next sprint
- Trace memory that leaks in a component tree
Example prompts for the agent
- Audit
api/orders.jsfor query count and response time. - Check the frontend: bundle size, lazy routes, extra re-renders.
- Write a performance report and rank the fixes by urgency.
How to install performance-auditor
Manually: put the files in place
.claude/agents/performance-auditor.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/performance-auditor.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/performance-auditor.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about performance-auditor
How do I install performance-auditor in Claude Code?
Place the subagent file at .claude/agents/performance-auditor.md inside your project. Claude picks it up from that path.
What does performance-auditor do?
It reviews code for speed and resource use across algorithms, database access, frontend rendering, backend calls and network payloads, then hands back a report with metrics and a fix order.
Which tools does the subagent have?
Read, Grep, Glob and Bash. It can inspect files and run shell commands, but not modify your code.
Similar subagents
All subagents for Agent setup: memory, context, orchestration →performance-auditor by other authors comes first.