Performance Optimization Advisor

Version: 1.0 Added: Jan 21, 2026

Description

Analyzes code for performance bottlenecks and suggests optimizations. Covers algorithmic complexity, memory usage, database queries, and caching strategies.

Code

Skill Code
Look "keyword">for:
1. O(n²) or worse algorithms
2. N+1 query problems
3. Missing database indexes
4. Unnecessary re-renders (React)
5. Memory leaks
6. Blocking operations
7. Missing caching
8. Large bundle sizes

Usage Examples

Examples
User: why is my app slow?

Claude: *analyzes code*

Found 3 performance issues:

1. src/api/users.js:34 - N+1 query problem
   Fetching posts in a loop. Use JOIN or batch fetch.

2. src/components/List.jsx - Missing React.memo
   Component re-renders on every parent update.

3. src/utils/process.js:12 - O(n²) nested loops
   Consider using a Set "keyword">for O(n) lookup.

Installation

Add the following to your CLAUDE.md file (project root or ~/.claude/CLAUDE.md for global):

CLAUDE.md
# Performance Optimization Advisor

Look for:
1. O(n²) or worse algorithms
2. N+1 query problems
3. Missing database indexes
4. Unnecessary re-renders (React)
5. Memory leaks
6. Blocking operations
7. Missing caching
8. Large bundle sizes

Comments (0)

No comments yet. Be the first to share your thoughts!