Profile code performance and suggest optimizations.
--- name: performance-profiler description: Profile code and suggest optimizations version: 1.0.0 --- # Performance Profiler Identify performance bottlenecks and optimization opportunities. ## Analysis Types - CPU profiling - Memory analysis - I/O bottlenecks - Algorithm complexity ## Metrics Tracked - Execution time - Memory usage - Function call counts - Database queries ## Example Report ``` PERFORMANCE REPORT ā±ļø Total execution time: 2.3s š¾ Peak memory: 128MB š Function calls: 45,234 HOT SPOTS: 1. processData() - 1.2s (52%) Line 45: Nested loop O(n²) Suggestion: Use Map for O(1) lookup 2. fetchUsers() - 0.8s (35%) N+1 query pattern detected Suggestion: Use batch query 3. renderList() - 0.2s (9%) Re-renders on every update Suggestion: Add memoization OPTIMIZATION POTENTIAL: Estimated improvement: 60-70% faster ```
AI Agent Skills are reusable workflow packages that extend your AI coding assistant with multi-step capabilities. Install performance-profiler by following these steps.
.cursor/skills/ or .codex/skills/ directory