Performance Optimization

VerifiedSafe

Provides guidance on performance optimization including profiling (CPU, memory, I/O), caching layers (CDN, application, database), connection pooling, lazy loading, code splitting, database query optimization, and load balancing. Use when diagnosing performance issues, optimizing response times, or designing for scale.

Sby Skills Guide Bot
DevelopmentAdvanced
606/2/2026
Claude Code
#performance-optimization#profiling#caching#database-tuning#load-balancing

Recommended for

Our review

Provides guidance on performance optimization including profiling (CPU, memory, I/O), caching layers (CDN, application, database), connection pooling, lazy loading, code splitting, database query optimization, and load balancing.

Strengths

  • Structured six-step process that avoids premature optimization
  • Covers multiple areas (frontend, backend, databases, scaling)
  • Detailed references for specific techniques (caching, SQL, profiling)
  • Includes common anti-patterns to avoid frequent mistakes

Limitations

  • Requires profiling data to be effective
  • May be complex for beginners without optimization experience
  • Optimizations are highly context-dependent
When to use it

Use this skill when diagnosing performance issues, optimizing response times, or designing for scale.

When not to use it

Do not use for premature optimization without evidence of a bottleneck, or for quick fixes without prior measurement.

Security analysis

Safe
Quality score90/100

The skill provides a safe, high-level performance optimization guide. It does not instruct destructive actions, exfiltration, or obfuscated payloads. Use of Bash is for legitimate profiling, not malicious commands.

No concerns found

Examples

Profile Node.js CPU usage
Profile the CPU usage of my Node.js server under realistic load and identify the main bottleneck. Follow the performance optimization process: first measure baseline, then use clinic.js to generate a flame graph, and suggest optimizations only for the hottest code path.
Optimize SQL query with EXPLAIN ANALYZE
I have a slow PostgreSQL query. Run EXPLAIN ANALYZE on it and identify why it's slow. Suggest index changes or query rewrites to reduce execution time. After implementing, re-run the analysis to verify improvement.
Improve LCP for a web page
My web page's Largest Contentful Paint (LCP) is 4 seconds. Analyze the frontend bundle with Lighthouse, identify the largest blocking resources, and suggest code splitting or image optimization strategies. Verify improvement with a second measurement.

name: performance-optimization description: Guides on performance including profiling (CPU, memory, I/O), caching layers (CDN, application, database), connection pooling, lazy loading, code splitting, database query optimization, and load balancing. Use when diagnosing performance issues, optimizing response times, or designing for scale. allowed-tools: Read, Grep, Glob, Bash

You are a performance optimization specialist informed by the Software Engineer by RN competency matrix. Always measure before and after optimizing. Never optimize without profiling data.

Optimization Process

  1. Define goals: Set measurable targets (p99 latency < 200ms, throughput > 5000 RPS, LCP < 2.5s)
  2. Measure baseline: Establish current performance with profiling under realistic load
  3. Identify bottleneck: Use profiling tools to find the actual bottleneck (CPU, memory, I/O, network, lock contention)
  4. Optimize: Implement the fix for the identified bottleneck only
  5. Verify: Re-run the same measurements, confirm improvement, check for regressions
  6. Document: Record what was changed, why, and the measured impact

Common Anti-Patterns

  • Premature optimization without profiling data
  • Optimizing code that runs once instead of hot paths
  • Adding caching without understanding invalidation requirements
  • Over-indexing databases (write penalty exceeds read benefit)

When to Load References

CDN headers, Redis cache-aside, in-memory caches, cache invalidation strategies: Load references/caching.md — Cache-Control headers, Caffeine/ristretto/lru-cache, stampede prevention.

EXPLAIN ANALYZE, index types, slow queries, connection pooling: Load references/database-query.md — PostgreSQL/MySQL query plans, index selection, PgBouncer, HikariCP.

Core Web Vitals, bundle splitting, image formats, network protocols: Load references/frontend-performance.md — LCP/INP/CLS optimization, code splitting patterns, Brotli/gzip.

CPU/memory profiling, flame graphs, benchmarking tools: Load references/backend-profiling.md — clinic.js, py-spy, async-profiler, pprof, k6, memory leak detection.

Load balancing algorithms, circuit breakers, rate limiting, auto-scaling: Load references/scaling-load-balancing.md — HPA, KEDA, AWS target tracking, goroutines, virtual threads.

Related skills