CPU and latency profiling — sampling profilers and flame graphs, tracing spans for latency breakdown, async profiling in Node.js and other runtimes, lock contention, I/O waits, browser performance panel, isolating the hot path, verifying fixes. Use to find where time is spent (profiling, flame graph, CPU profile, hot path, latency breakdown).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Performance Profiling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-performance-profiling)
---
name: performance-profiling
description: CPU and latency profiling — sampling profilers and flame graphs, tracing spans for latency breakdown, async profiling in Node.js and other runtimes, lock contention, I/O waits, browser performance panel, isolating the hot path, verifying fixes. Use to find where time is spent (profiling, flame graph, CPU profile, hot path, latency breakdown).
metadata:
category: performance
---
# Performance profiling
## Purpose
Locate where time goes with evidence before optimizing.
**Use when:** slow endpoints, high CPU, UI jank.
**Not for:** memory growth (`memory-profiling`).
## Inputs
- Reproducible slow scenario.
## Outputs
- Profile, hot path, fix with before/after.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "performance profiling"` for prior decisions, patterns and anti-patterns.
- [Performance standard](../../../standards/performance.md)
## Steps
1. **Reproduce.** Reliable scenario and baseline numbers.
Done when baseline recorded.
2. **Profile.** Sampling profile under load; flame graph; traces for I/O.
Done when top frames identified.
3. **Hypothesize.** Explain why the hot path is hot.
Done when hypothesis testable.
4. **Verify.** Fix and re-profile on the same scenario.
Done when improvement evidenced.
## Best practices
- Profile in production-like builds.
- Fix the biggest frame first.
## Common mistakes
- Micro-optimizing cold code.
- Profiling debug builds.
## Example
Flame graph shows 41% in JSON serialization of a 4 MB response; pagination cut p95 by 70%.
## Reusable prompt
```text
Apply the Performance profiling skill (.agents/skills/performance-profiling/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Reproduce, profile, explain the hot path and verify the fix with before/after numbers.
Return: Profile, hot path, fix with before/after..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```