skills/cpu-profiling/SKILL.md
Profile CPU usage to identify hot spots and bottlenecks. Optimize code paths consuming most CPU time for better performance and resource efficiency.
npx skillsauth add aj-geddes/useful-ai-prompts cpu-profilingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 |
development
Implement Zero Trust security model with identity verification, microsegmentation, least privilege access, and continuous monitoring. Use when building secure cloud-native applications.
development
Prevent Cross-Site Scripting (XSS) attacks through input sanitization, output encoding, and Content Security Policy. Use when handling user-generated content in web applications.
tools
Create wireframes and interactive prototypes to visualize user interfaces and gather feedback early. Use tools and techniques to communicate design ideas before development.
development
Implement real-time bidirectional communication with WebSockets including connection management, message routing, and scaling. Use when building real-time features, chat systems, live notifications, or collaborative applications.