Agent skill
grey-haven-performance-optimization
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'.
Install this agent skill to your Project
npx add-skill https://github.com/greyhaven-ai/claude-code-config/tree/main/grey-haven-plugins/core/skills/performance-optimization
SKILL.md
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
Related Agents
performance-optimizer- Automated performance analysis and optimizationmemory-profiler- Memory leak detection and profilingobservability-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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
grey-haven-prompt-engineering
Master 26 documented prompt engineering principles for crafting effective LLM prompts with 400%+ quality improvement. Includes templates, anti-patterns, and quality checklists for technical, learning, creative, and research tasks. Use when writing prompts for LLMs, improving AI response quality, training on prompting, designing agent instructions, or when user mentions 'prompt engineering', 'better prompts', 'LLM quality', 'prompt templates', 'AI prompts', 'prompt principles', or 'prompt optimization'.
grey-haven-tool-design
Design effective MCP tools and Claude Code integrations using the consolidation principle. Fewer, better-designed tools dramatically improve agent success rates. Use when creating MCP servers, designing tool interfaces, optimizing tool sets, or when user mentions 'tool design', 'MCP', 'fewer tools', 'tool consolidation', 'tool architecture', or 'tool optimization'.
grey-haven-documentation-alignment
6-phase verification system ensuring code matches documentation with automated alignment scoring (signature, type, behavior, error, example checks). Reduces onboarding friction 40%. Use when verifying code-docs alignment, onboarding developers, after code changes, pre-release documentation checks, or when user mentions 'docs out of sync', 'documentation verification', 'code-docs alignment', 'docs accuracy', 'documentation drift', or 'verify documentation'.
grey-haven-tdd-orchestration
Master TDD orchestration with multi-agent coordination, strict red-green-refactor enforcement, automated test generation, coverage tracking, and >90% coverage quality gates. Supports Claude Teams for parallel TDD workflows with plan approval gates, or falls back to sequential subagent coordination. Coordinates tdd-python, tdd-typescript, and test-generator agents. Use when implementing features with TDD workflow, coordinating multiple TDD agents, enforcing test-first development, orchestrating TDD teams, or when user mentions 'TDD workflow', 'test-first', 'TDD orchestration', 'multi-agent TDD', 'test coverage', or 'red-green-refactor'.
grey-haven-llm-project-development
Build LLM-powered applications and pipelines using proven methodology - task-model fit analysis, pipeline architecture, structured outputs, file-based state, and cost estimation. Use when building AI features, data processing pipelines, agents, or any LLM-integrated system. Inspired by Karpathy's methodology and production case studies.
grey-haven-tdd-typescript
TypeScript/JavaScript Test-Driven Development with Vitest, strict red-green-refactor methodology, React component testing, and comprehensive coverage patterns. Use when implementing TypeScript features with TDD, writing Vitest tests, testing React components, developing with test-first approach, or when user mentions 'TypeScript TDD', 'Vitest', 'React testing', 'JavaScript TDD', 'red-green-refactor', 'TypeScript unit tests', or 'test-driven TypeScript'.
Didn't find tool you were looking for?