Skip to main content
subagent

performance-profiler — Claude Code subagent: profile and optimize

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.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --agent development-tools/performance-profiler
Open on GitHub

What performance-profiler 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.

What it helps with

  • 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 for the agent

  • 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

How to install performance-profiler

1claude-code-templates

npx claude-code-templates@latest --agent development-tools/performance-profiler

2Manually: put the files in place

.claude/agents/performance-profiler.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about performance-profiler

How do I install performance-profiler in Claude?

Use the templates CLI: npx claude-code-templates@latest --agent development-tools/performance-profiler. The subagent file lands at .claude/agents/performance-profiler.md.

What does performance-profiler do?

It profiles an application: response times, CPU load, memory leaks, event loop delay and database work. Then it points at what to optimize.

What do the profiling scripts need?

The Node.js scripts depend on v8-profiler-next and @airbnb/node-memwatch, plus the built-in perf_hooks. Reports are written to ./performance-reports.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →
performance-optimization addyosmani An agent skill that measures before it changes code: Core Web Vitals budgets, N+1 queries, missing indexes and slow endpoints. CX Codex +1 65,200installs golang-performance samber Guides AI coding agents through profiling, memory allocation cuts, and CPU optimization in Go projects using a strict measurement-first cycle. CX Codex +1 41,900installs performance-engineer VoltAgent Community A Claude Code subagent designed to identify performance bottlenecks across code, databases, and infrastructure under heavy load. 671installs frontend-developer VoltAgent Community Subagent for building complete frontend applications with React 18+, Vue 3+, and Angular 15+. Handles component architecture, state management, testing, and accessibility. 40,905installs dx-optimizer VoltAgent Community Subagent profiles and accelerates your entire development cycle: build times, feedback loops, testing. Use it when the project is slow or developers waste time waiting. 1,198installs mlops-engineer VoltAgent Community This subagent designs ML infrastructure, model CI/CD, and versioning workflows. Use it when training automation, GPU orchestration, or ML monitoring needs attention. 1,009installs postgres-pro VoltAgent Community A PostgreSQL subagent for query tuning, replication design, backups, and database troubleshooting. Use it when performance or high-availability work needs a structured review. 897installs agent-installer VoltAgent Community Subagent for discovering, browsing, and installing Claude Code agents from the awesome-claude-code-subagents repository. Simplifies finding and integrating new tools into your workflow. 363installs

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor