# performance-profiler

A Claude subagent that hunts down performance bottlenecks, memory leaks and load problems. Useful when an app is slow and the cause is not obvious.

- subagent · `type=agent` · Claude Code · 1875 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/development-tools/performance-profiler.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/performance-profiler

## What it does

The subagent covers several areas at once: response times and throughput, memory leaks and garbage collection, CPU load, API latency, database queries and frontend metrics like bundle size. It starts by capturing a baseline, then compares later runs against it.

Bundled Node.js profiling scripts rely on `perf_hooks`, `v8-profiler-next` and `@airbnb/node-memwatch`, so those packages need to be present in your project. Reports land in `./performance-reports`: a CPU profile as `.cpuprofile` and a heap snapshot as `.heapsnapshot`. There is also event loop delay monitoring that warns when the mean delay goes above 10 ms.

The agent is meant to be invoked proactively, stepping in whenever a task touches performance. Its toolset is limited to reading, writing, editing files and `Bash`, so it will not wire up an external APM service for you. CPU analysis works on a profile the script has already saved, so nothing gets reviewed until the profiler actually runs against your app.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent development-tools/performance-profiler
```

2. **Manually: put the files in place**
- File: `.claude/agents/performance-profiler.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/performance-profiler.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/performance-profiler.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/development-tools/performance-profiler.md

## When to use it
- find the function eating the most CPU
- catch a memory leak and capture a heap snapshot
- measure event loop delay under load
- compare performance before and after a change
- break down slow database queries and API responses

## Example prompts
- profile the CPU of this Node.js service and list the hottest functions
- check the queue handler for a memory leak
- compare metrics before and after the database query change

## Similar
- [performance-optimization](https://affpapa.org/en/nevibecode/skills/performance-optimization.md) — skill · 65200 installs
- [golang-performance](https://affpapa.org/en/nevibecode/skills/golang-performance.md) — skill · 41900 installs
- [performance-engineer](https://affpapa.org/en/nevibecode/agents/performance-engineer.md) — subagent · 671 installs
- [frontend-developer](https://affpapa.org/en/nevibecode/agents/voltagent-community-frontend-developer.md) — subagent · 40905 installs
- [dx-optimizer](https://affpapa.org/en/nevibecode/agents/dx-optimizer.md) — subagent · 1198 installs
- [mlops-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-mlops-engineer.md) — subagent · 1009 installs
- [postgres-pro](https://affpapa.org/en/nevibecode/agents/postgres-pro.md) — subagent · 897 installs
- [agent-installer](https://affpapa.org/en/nevibecode/agents/agent-installer.md) — subagent · 363 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 205 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
