← Back to list

performance-analyzer
by lexicalninja
A collection of Cursor subagents and Claude skills to help build things together
⭐ 0🍴 0📅 Jan 16, 2026
SKILL.md
name: performance-analyzer description: Analyzes code for performance issues including inefficient algorithms, unnecessary computations, memory leaks, large file sizes, slow queries, and missing caching. Returns structured performance issue reports with optimization suggestions.
Performance Analyzer Skill
Instructions
- Analyze code for performance issues
- Check for inefficient algorithms (O(n²) when O(n) possible)
- Identify unnecessary computations or redundant operations
- Look for memory leaks or inefficient memory usage
- Check file sizes and resource usage
- Review database queries for optimization opportunities
- Check for missing caching where beneficial
- Return structured performance reports with:
- File path and line numbers
- Performance issue type
- Current code
- Suggested optimization
- Expected performance improvement
- Priority (Must-Fix for blocking issues, Should-Fix for optimizations)
Examples
Input: Inefficient nested loop Output:
### PERF-001
- **File**: `utils.js`
- **Lines**: 30-35
- **Priority**: Should-Fix
- **Issue**: O(n²) nested loop when O(n) solution is possible
- **Current Code**:
```javascript
function findDuplicates(arr1, arr2) {
const duplicates = [];
for (let i = 0; i < arr1.length; i++) {
for (let j = 0; j < arr2.length; j++) {
if (arr1[i] === arr2[j]) {
duplicates.push(arr1[i]);
}
}
}
return duplicates;
}
- Suggested Fix:
function findDuplicates(arr1, arr2) { const set2 = new Set(arr2); return arr1.filter(item => set2.has(item)); } - Reason: Using Set reduces time complexity from O(n²) to O(n)
- Expected Improvement: Significant performance gain for large arrays
## Performance Issues to Detect
- **Inefficient Algorithms**: O(n²) or worse when better solutions exist
- **Unnecessary Computations**: Redundant calculations, repeated operations
- **Memory Leaks**: Unclosed resources, circular references, event listeners
- **Large File Sizes**: Unoptimized images, large bundles, unnecessary dependencies
- **Slow Queries**: N+1 queries, missing indexes, inefficient joins
- **Missing Caching**: Repeated expensive operations without caching
- **Blocking Operations**: Synchronous operations that should be async
- **Inefficient Data Structures**: Wrong data structure for use case
- **Unoptimized Loops**: Inefficient loop patterns
- **Resource Loading**: Missing lazy loading, blocking resources
## Priority Guidelines
- **Must-Fix**: Performance issues that block functionality or cause timeouts
- **Should-Fix**: Performance optimizations that improve user experience
- **Nice-to-Have**: Minor optimizations with small impact
Score
Total Score
55/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon