Back to Skills

performance-optimization

verified

Performance analysis, optimization techniques, and performance testing for web applications. Covers profiling, bottleneck identification, frontend optimization (bundle size, rendering, Core Web Vitals), backend optimization (query optimization, caching, async patterns), load testing (k6, Artillery), and monitoring (performance budgets, SLIs). Use this skill when analyzing performance issues, optimizing slow pages or APIs, setting up load testing, implementing caching, reducing bundle sizes, or establishing performance budgets. Triggers on "performance", "slow", "optimize", "bundle size", "load testing", "cache", "bottleneck", "latency", "Core Web Vitals", "LCP", "FCP", "lighthouse", "profiling".

View on GitHub

Marketplace

pokayokay

srstomp/pokayokay

Plugin

pokayokay

productivity

Repository

srstomp/pokayokay
2stars

plugins/pokayokay/skills/performance-optimization/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/srstomp/pokayokay/blob/main/plugins/pokayokay/skills/performance-optimization/SKILL.md -a claude-code --skill performance-optimization

Installation paths:

Claude
.claude/skills/performance-optimization/
Powered by add-skill CLI

Instructions

# Performance Optimization

Systematic approach to identifying and fixing performance bottlenecks.

## Performance Analysis Workflow

```
1. Measure First
   └─→ Never optimize without data
   └─→ Establish baseline metrics

2. Identify Bottleneck Type
   ├─→ Network? (TTFB, downloads)
   ├─→ CPU? (parsing, execution)
   ├─→ Memory? (leaks, GC pressure)
   ├─→ I/O? (disk, database)
   └─→ Rendering? (layout, paint)

3. Apply Targeted Fix
   └─→ One change at a time
   └─→ Re-measure after each change

4. Validate Improvement
   └─→ Compare against baseline
```

## Quick Wins Checklist

### Frontend Quick Wins

| Action | Impact | Effort |
|--------|--------|--------|
| Enable gzip/brotli compression | 60-80% smaller | Low |
| Add caching headers | Eliminate repeat downloads | Low |
| Lazy load below-fold images | Faster initial paint | Low |
| Preconnect to critical origins | 100-300ms savings | Low |
| Remove unused CSS/JS | 20-50% smaller | Medium |
| Code split by route | 50%+ smaller initial | Medium |

### Backend Quick Wins

| Action | Impact | Effort |
|--------|--------|--------|
| Add database indexes | 10-100x faster queries | Low |
| Enable query result caching | Eliminate repeat queries | Low |
| Use connection pooling | Better throughput | Low |
| Fix N+1 queries | 90%+ fewer queries | Medium |
| Add response caching | Sub-ms responses | Medium |

## Core Web Vitals

| Metric | Good | Needs Work | Poor |
|--------|------|------------|------|
| **LCP** (Largest Contentful Paint) | < 2.5s | < 4.0s | > 4.0s |
| **INP** (Interaction to Next Paint) | < 200ms | < 500ms | > 500ms |
| **CLS** (Cumulative Layout Shift) | < 0.1 | < 0.25 | > 0.25 |
| **TTFB** (Time to First Byte) | < 800ms | < 1.8s | > 1.8s |

**LCP optimization:**
- Preload LCP image with `fetchpriority="high"`
- Avoid lazy loading LCP element
- Inline critical CSS
- Use SSR/SSG for critical content

**CLS prevention:**
- Always set width/height on images
- Reserve space for ads/embeds
- Use `fon

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6846 chars