Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Performance optimization specialist for improving application speed and efficiency. Use when investigating performance issues or optimizing code.
.claude/skills/performance-engineer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 341% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-04 | ✓→✗ | ▼ Worse | 99% | 0% |
Specialist in analyzing and optimizing application performance, identifying bottlenecks, and implementing efficiency improvements.
Activates when you:
bash # Response time curl -w "@curl-format.txt" -o /dev/null -s https://example.com/users
# Database query time # Add timing logs to queries
# Memory usage # Use profiler
bash # Node.js node --prof app.js
# Python python -m cProfile app.py
# Go go test -cpuprofile=cpu.prof
Common bottleneck locations:
| Layer | Common Issues | |-------|---------------| | Database | N+1 queries, missing indexes, large result sets | | API | Over-fetching, no caching, serial requests | | Application | Inefficient algorithms, excessive logging | | Frontend | Large bundles, re-renders, no lazy loading | | Network | Too many requests, large payloads, no compression |
N+1 Queries:
typescript// Bad: N+1 queries const users = await User.findAll(); for (const user of users) { user.posts = await Post.findAll({ where: { userId: user.id } }); } // Good: Eager loading const users = await User.findAll({ include: [{ model: Post, as: 'posts' }] });
Missing Indexes:
sql-- Add index on frequently queried columns CREATE INDEX idx_user_email ON users(email); CREATE INDEX idx_post_user_id ON posts(user_id);
Pagination:
typescript// Always paginate large result sets const users = await User.findAll({ limit: 100, offset: page * 100 });
Field Selection:
typescript// Select only needed fields const users = await User.findAll({ attributes: ['id', 'name', 'email'] });
Compression:
typescript// Enable gzip compression app.use(compression());
Code Splitting:
typescript// Lazy load routes const Dashboard = lazy(() => import('./Dashboard'));
Memoization:
typescript// Use useMemo for expensive calculations const filtered = useMemo(() => items.filter(item => item.active), [items] );
Image Optimization:
Derive targets from the service SLO, current baseline, workload shape, cost budget, and critical user journey. The table below is an example starting point only; never present it as the system's acceptance criteria without evidence or owner agreement.
| Metric | Target | Critical Threshold | |--------|--------|-------------------| | API Response (p50) | < 100ms | < 500ms | | API Response (p95) | < 500ms | < 1s | | API Response (p99) | < 1s | < 2s | | Database Query | < 50ms | < 200ms | | Page Load (FMP) | < 2s | < 3s | | Time to Interactive | < 3s | < 5s | | Memory Usage | < 512MB | < 1GB |
typescript// Cache expensive computations const cache = new Map(); async function getUserStats(userId: string) { if (cache.has(userId)) { return cache.get(userId); } const stats = await calculateUserStats(userId); cache.set(userId, stats); // Invalidate after 5 minutes setTimeout(() => cache.delete(userId), 5 * 60 * 1000); return stats; }
typescript// Bad: Individual requests for (const id of userIds) { await fetchUser(id); } // Good: Batch request await fetchUsers(userIds);
typescript// Debounce search input const debouncedSearch = debounce(search, 300); // Throttle scroll events const throttledScroll = throttle(handleScroll, 100);
| Tool | Purpose | |------|---------| | Lighthouse | Frontend performance | | New Relic | APM monitoring | | Datadog | Infrastructure monitoring | | Prometheus | Metrics collection |
Profile application:
bashpython3 scripts/profile.py --name <service-name> --output perf-profile.txt
Generate performance report:
bashpython3 scripts/perf_report.py --name <service-name> --output perf-report.md
references/optimization.md - Optimization techniquesreferences/monitoring.md - Monitoring setupreferences/checklist.md - Performance checklist| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | pass→pass | 22,690 | 19,580 | -14% | 1 | 1 | 0% | 2,503 | 4,237 | +69% | 0 | 0 | — |
case-17 | pass→pass | 19,251 | 17,033 | -12% | 1 | 1 | 0% | 2,335 | 3,348 | +43% | 0 | 0 | — |
case-16 | pass→pass | 13,187 | 15,976 | +21% | 1 | 1 | 0% | 2,122 | 2,812 | +33% | 0 | 0 | — |
case-01 | fail→pass | 31,533 | 15,911 | -50% | 1 | 1 | 0% | 3,721 | 3,367 | -10% | 0 | 0 | — |
case-02 | fail→fail | 35,812 | 32,802 | -8% | 1 | 1 | 0% | 5,068 | 5,396 | +6% | 0 | 0 | — |
case-03 | fail→pass | 23,349 | 20,620 | -12% | 1 | 1 | 0% | 3,276 | 4,450 | +36% | 0 | 0 | — |
case-04 | pass→fail | 13,990 | 12,492 | -11% | 1 | 1 | 0% | 1,350 | 2,690 | +99% | 0 | 0 | — |
case-05 | pass→pass | 9,373 | 9,475 | +1% | 1 | 1 | 0% | 621 | 2,164 | +248% | 0 | 0 | — |
case-06 | fail→pass | 7,563 | 8,466 | +12% | 1 | 1 | 0% | 457 | 2,015 | +341% | 0 | 0 | — |
case-07 | pass→pass | 15,583 | 14,777 | -5% | 1 | 1 | 0% | 1,950 | 3,156 | +62% | 0 | 0 | — |
case-08 | pass→pass | 13,902 | 12,991 | -7% | 1 | 1 | 0% | 1,293 | 2,697 | +109% | 0 | 0 | — |
case-09 | pass→pass | 21,843 | 19,913 | -9% | 1 | 1 | 0% | 2,847 | 4,029 | +42% | 0 | 0 | — |
case-10 | pass→pass | 6,571 | 14,626 | +123% | 1 | 1 | 0% | 1,075 | 2,768 | +157% | 0 | 0 | — |
case-11 | fail→fail | 8,431 | 12,428 | +47% | 1 | 1 | 0% | 1,251 | 2,811 | +125% | 0 | 0 | — |
case-12 | fail→pass | 18,988 | 13,717 | -28% | 1 | 1 | 0% | 2,449 | 3,760 | +54% | 0 | 0 | — |
case-13 | fail→fail | 21,028 | 15,840 | -25% | 1 | 1 | 0% | 2,931 | 4,332 | +48% | 0 | 0 | — |
case-14 | pass→pass | 21,178 | 20,016 | -5% | 1 | 1 | 0% | 2,622 | 4,221 | +61% | 0 | 0 | — |
case-18 | pass→pass | 15,620 | 10,241 | -34% | 1 | 1 | 0% | 1,821 | 2,871 | +58% | 0 | 0 | — |
case-19 | pass→pass | 14,945 | 8,773 | -41% | 1 | 1 | 0% | 1,807 | 3,039 | +68% | 0 | 0 | — |
case-20 | pass→pass | 9,954 | 5,628 | -43% | 1 | 1 | 0% | 929 | 2,416 | +160% | 0 | 0 | — |
case-21 | pass→pass | 9,881 | 10,439 | +6% | 1 | 1 | 0% | 966 | 2,386 | +147% | 0 | 0 | — |
case-22 | pass→pass | 11,609 | 6,884 | -41% | 1 | 1 | 0% | 1,315 | 2,800 | +113% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/24/2026 | +9% |
Other measured skills in the registry, with their headline benchmark lift.