From aj-geddes-useful-ai-prompts-4
Profiles CPU usage to identify hot spots and bottlenecks using browser DevTools, flame graphs, and React Profiler for optimizing code paths.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:cpu-profilingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
CPU profiling identifies which functions consume most CPU time, enabling targeted optimization of expensive code paths.
Minimal working example:
Browser Profiling:
Chrome DevTools:
Steps:
1. DevTools → Performance
2. Click record
3. Perform action
4. Stop recording
5. Analyze flame chart
Metrics:
- Function call duration
- Call frequency
- Total time vs self time
Firefox Profiler:
- Built-in performance profiler
- Flame graphs
- Timeline view
- Export and share
React Profiler:
- DevTools → Profiler
- Component render times
- Phase: render vs commit
- Why component re-rendered
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Profiling Tools | Profiling Tools |
| Analysis & Interpretation | Analysis & Interpretation |
| Optimization Process | Optimization Process |
| Monitoring & Best Practices | Monitoring & Best Practices |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Profile application performance, identify bottlenecks, and optimize hot paths using CPU profiling, flame graphs, and benchmarking. Use when investigating performance issues or optimizing critical code paths.
Profiles apps to identify CPU/memory bottlenecks using runtime tools: clinic.js/0x for Node.js, py-spy/cProfile for Python, Chrome DevTools/Lighthouse for frontend. For slow apps, leaks, high CPU.
CPU/memory profiling, identifying bottlenecks, flame graphs, hotspot analysis.