grey-haven-performance-optimization

greyhaven-ai's avatarfrom greyhaven-ai

Comprehensive performance analysis and optimization for algorithms (O(n²)→O(n)), databases (N+1 queries, indexes), React (memoization, virtual lists), bundles (code splitting), API caching, and memory leaks. 85%+ improvement rate. Use when application is slow, response times exceed SLA, high CPU/memory usage, performance budgets needed, or when user mentions 'performance', 'slow', 'optimization', 'bottleneck', 'speed up', 'latency', 'memory leak', or 'performance tuning'.

⭐15stars🔀2forks📁View on GitHub🕐Updated Dec 27, 2025

When & Why to Use This Skill

This Claude skill provides a comprehensive framework for full-stack performance optimization, targeting critical bottlenecks in algorithms, databases, and frontend frameworks like React. It offers production-ready patterns and profiling templates to reduce latency, fix memory leaks, and optimize resource usage, helping developers achieve an 85%+ improvement rate in application speed and efficiency.

Use Cases

  • Algorithm Refinement: Refactoring inefficient O(n²) logic into O(n) solutions to improve computational speed and scalability.
  • Database Tuning: Identifying and eliminating N+1 query patterns and implementing strategic indexing to reduce API response times.
  • Frontend Optimization: Enhancing React application responsiveness using memoization, virtualized lists, and asset code-splitting.
  • Resource Management: Diagnosing and resolving complex memory leaks and high CPU/memory usage in production environments.
  • Latency Reduction: Implementing effective API caching strategies and asynchronous processing to meet strict SLA performance targets.
namegrey-haven-performance-optimization
description"Comprehensive performance analysis and optimization for algorithms (O(n²)→O(n)), databases (N+1 queries, indexes), React (memoization, virtual lists), bundles (code splitting), API caching, and memory leaks. 85%+ improvement rate. Use when application is slow, response times exceed SLA, high CPU/memory usage, performance budgets needed, or when user mentions 'performance', 'slow', 'optimization', 'bottleneck', 'speed up', 'latency', 'memory leak', or 'performance tuning'."
# v2.0.43Skills to auto-load for performance work
# v2.0.74Tools for performance optimization

Performance Optimization Skill

Comprehensive performance analysis and optimization techniques for identifying bottlenecks and improving application speed.

Description

This skill provides production-ready patterns, examples, and checklists for optimizing application performance across algorithms, databases, infrastructure, and code structure.

What's Included

Examples (examples/)

  • Algorithm optimization - Improve time complexity (O(n²) → O(n))
  • Database optimization - Eliminate N+1 queries, add indexes
  • Bundle size reduction - Code splitting, tree shaking
  • React performance - Memoization, virtual lists
  • API response time - Caching strategies, async processing
  • Memory optimization - Reduce allocations, fix leaks

Reference Guides (reference/)

  • Performance profiling tools and techniques
  • Benchmarking best practices
  • Optimization decision frameworks
  • Performance budget guidelines
  • Monitoring and alerting strategies

Templates (templates/)

  • Performance test templates (Lighthouse, Web Vitals)
  • Benchmark comparison templates
  • Optimization report structures
  • Performance budget definitions

Use This Skill When

  • Application is slow or unresponsive
  • Response times exceed SLA targets
  • High CPU/memory usage detected
  • Need to meet performance budgets
  • Optimizing for production deployment
  • performance-optimizer - Automated performance analysis and optimization
  • memory-profiler - Memory leak detection and profiling
  • observability-engineer - Production monitoring setup

Quick Start

# View optimization examples
ls examples/

# Check reference guides
ls reference/

# Use templates for benchmarking
ls templates/

Metrics

  • Optimization Success Rate: 85%+ performance improvement
  • Coverage: Algorithm, database, infrastructure, code structure
  • Production-Ready: All examples tested in real applications

Skill Version: 1.0 Last Updated: 2025-01-15