npx skills add ...
npx skills add zhaono1/agent-playbook --skill performance-engineer
Performance optimization specialist for improving application speed and efficiency. Use when investigating performance issues or optimizing code.
npx skills add zhaono1/agent-playbook --skill performance-engineer
Specialist in analyzing and optimizing application performance, identifying bottlenecks, and implementing efficiency improvements.
Activates when you:
Define metrics
Measure current performance
Profile the application
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:
Missing Indexes:
Pagination:
Field Selection:
Compression:
Code Splitting:
Memoization:
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 |
| Tool | Purpose |
|---|---|
| Lighthouse | Frontend performance |
| New Relic | APM monitoring |
| Datadog | Infrastructure monitoring |
| Prometheus | Metrics collection |
Profile application:
Generate performance report:
references/optimization.md - Optimization techniquesreferences/monitoring.md - Monitoring setupreferences/checklist.md - Performance checklist