Frontend performance optimization expertise with data-driven approach. Use when addressing performance issues (パフォーマンス), slow pages (遅い), optimization (最適化), rendering problems (レンダリング), bundle size (バンドルサイズ), Web Vitals (LCP, FID, CLS), Core Web Vitals, re-rendering (再レンダリング), memoization (メモ化), useMemo, useCallback, React.memo, heavy pages (重い), speed improvements (高速化), lazy loading, code splitting, or tree shaking. Provides measurement-based techniques for React optimization, Web Vitals improvement, and bundle optimization. Essential for performance-reviewer agent.
This skill is limited to using the following tools:
EVALUATIONS.mdreferences/bundle-optimization.mdreferences/react-optimization.mdreferences/web-vitals.mdscripts/validate.sh"Premature optimization is the root of all evil" - Donald Knuth
Optimize after measuring. Make decisions based on data, not feelings.
This skill is organized into 3 specialized sections for efficient context usage:
File: references/web-vitals.md
Tokens: ~500
Focus: Google's Core Web Vitals (LCP, FID, CLS)
Covers:
When to load: User mentions LCP, FID, CLS, Web Vitals, loading speed, layout shifts
File: references/react-optimization.md
Tokens: ~800
Focus: React-specific performance patterns
Covers:
When to load: User mentions re-renders, React performance, useMemo, useCallback, React.memo
File: references/bundle-optimization.md
Tokens: ~600
Focus: Bundle size reduction and code splitting
Covers:
When to load: User mentions bundle size, code splitting, lazy loading, tree shaking
// Before (Monolithic): Always load all 3000 tokens
User: "LCPが遅い"
→ Load entire skill.md (3000 tokens)
// After (Section-based): Load only relevant section
User: "LCPが遅い"
→ Load skill.md metadata (200 tokens)
→ Detect "LCP" keyword → Match to web-vitals section
→ Load references/web-vitals.md (500 tokens)
→ Total: 700 tokens (77% reduction)
User: "ページの読み込みが遅い。LCPを改善したい"
Claude loads:
✓ skill.md metadata (200 tokens)
✓ references/web-vitals.md (500 tokens)
Total: 700 tokens
Provides:
- LCP measurement techniques
- Priority loading strategies
- Preloading techniques
- Image optimization for LCP
User: "コンポーネントが不要に再レンダリングされる"
Claude loads:
✓ skill.md metadata (200 tokens)
✓ references/react-optimization.md (800 tokens)
Total: 1000 tokens
Provides:
- React.memo usage
- useMemo patterns
- React DevTools profiling
- State separation strategies
User: "バンドルサイズが大きすぎる"
Claude loads:
✓ skill.md metadata (200 tokens)
✓ references/bundle-optimization.md (600 tokens)
Total: 800 tokens
Provides:
- Code splitting techniques
- Tree shaking patterns
- Bundle analyzer usage
- Dynamic import strategies
Copy this checklist and track your progress:
Performance Optimization Progress:
- [ ] Step 1: 現状測定(Lighthouse/DevTools)
- [ ] Step 2: ボトルネック特定(Network/Performance tab)
- [ ] Step 3: 優先順位付け(Impact vs Effort)
- [ ] Step 4: 改善実施
- [ ] Step 5: 再測定・比較
Run Lighthouse or Chrome DevTools:
# Using Lighthouse CLI
lighthouse https://your-site.com --output html --output-path ./report.html
Record baseline metrics:
Check these areas in order:
Use Impact vs Effort matrix:
| Improvement | Impact | Effort | Priority |
|---|---|---|---|
| [item 1] | High | Low | Do first |
| [item 2] | Low | High | Skip |
One change at a time. Test after each change.
Compare with baseline. Document improvements.
Remember: "Make it work, make it right, make it fast - in that order"
For detailed information, see the specific section files listed above.