Agent skill

workflow-performance

Systematic performance analysis and optimization. Use when things are slow, need optimization, or preparing for scale.

Stars 13
Forks 6

Install this agent skill to your Project

npx add-skill https://github.com/NickCrew/Claude-Cortex/tree/main/skills/workflow-performance

SKILL.md

Performance Optimization Workflow

Systematic approach to finding and fixing performance issues.

Phase 1: Baseline

Agents: performance-engineer

Measure current state:

  • Response times (p50, p95, p99)
  • Memory usage
  • CPU utilization
  • Database query times
  • Bundle sizes (frontend)
  • Render performance

Output: Baseline metrics report

Phase 2: Bottleneck Identification

Agents: performance-engineer

Analysis:

  • Profiling (CPU, memory)
  • Query analysis (slow query log, EXPLAIN)
  • Bundle analysis (webpack-bundle-analyzer)
  • Network analysis (waterfall, latency)

Output: Bottleneck list with priority ranking

Phase 3: Optimization Planning

Agents: requirements-analyst

  • Prioritize by impact vs effort
  • Define expected improvements
  • Determine implementation order
  • Set target metrics

Phase 4: Database Optimization

Agents: database-optimizer

Tasks:

  • Query optimization (rewrite slow queries)
  • Index creation/optimization
  • Caching strategy (Redis, memcached)
  • Connection pooling

Phase 5: Code Optimization

Agents: performance-engineer

Focus:

  • Algorithm efficiency (O(n) → O(log n))
  • Memory management (leaks, allocation)
  • Async operations (parallelize I/O)
  • Application-level caching

Phase 6: Frontend Optimization

Agents: performance-engineer

Tasks:

  • Bundle size reduction
  • Code splitting
  • Lazy loading
  • Asset optimization (images, fonts)
  • Render optimization (virtualization, memoization)

Phase 7: Infrastructure Optimization

Agents: devops-architect

Areas:

  • Scaling strategy (horizontal/vertical)
  • Caching layers (CDN, reverse proxy)
  • Load balancing
  • Resource allocation

Phase 8: Validation

Agents: performance-engineer

Blocking: Must meet targets

Targets:

  • Response time: <200ms (p95)
  • Memory usage: <200MB
  • Bundle size: <500KB

Phase 9: Load Testing

Agents: performance-engineer

Scenarios:

  • Normal load (expected traffic)
  • Peak load (2-3x normal)
  • Stress test (find breaking point)

Duration: 30min per scenario

Phase 10: Monitoring Setup

Agents: devops-architect

  • Performance dashboards
  • Alerting rules (degradation detection)
  • Automated profiling (continuous)

Success Criteria

  • Performance targets met
  • Load tests pass
  • Monitoring in place
  • Documentation complete

Targets

Metric Target
Response time improvement 50%
Memory reduction 30%
Cost reduction 20%

Quick Reference

Resource Reference File
Optimization Techniques skills/workflow-performance/references/optimization-techniques.md

Anti-patterns

  • Optimizing without measuring first
  • Micro-optimizations before algorithmic fixes
  • Optimizing code that isn't the bottleneck
  • No load testing before production

Expand your agent's capabilities with these related and highly-rated skills.

NickCrew/Claude-Cortex

claude-consult

Consult Claude specialist agents during implementation for codebase understanding, pattern checking, security review, debugging help, and more. Use this skill whenever you're unsure about conventions, stuck on a failure, or need expert input before writing code. Does not replace the formal review gates in agent-loops — this is for mid-implementation consultation.

13 6
Explore
NickCrew/Claude-Cortex

doc-quality-review

Assess documentation quality across readability, consistency, audience fit, and prose clarity. Produces a scored review with actionable findings. This skill should be used before releases, during doc reviews, or when documentation feels unclear or inconsistent.

13 6
Explore
NickCrew/Claude-Cortex

event-driven-architecture

Event-driven architecture patterns with event sourcing, CQRS, and message-driven communication. Use when designing distributed systems, microservices communication, or systems requiring eventual consistency and scalability.

13 6
Explore
NickCrew/Claude-Cortex

prompt-engineering

Optimize prompts for LLMs and AI systems with structured techniques, evaluation patterns, and synthetic test data generation. Use when building AI features, improving agent performance, or crafting system prompts.

13 6
Explore
NickCrew/Claude-Cortex

compliance-audit

Regulatory compliance auditing across GDPR, HIPAA, PCI DSS, SOC 2, and ISO frameworks with automated evidence collection and gap analysis. Use when conducting compliance assessments, preparing for certifications, or implementing regulatory controls.

13 6
Explore
NickCrew/Claude-Cortex

react-performance-optimization

React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.

13 6
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results