tech-leads-club/agent-skills/perf-web-optimization
Claude Code and agent skill by tech-leads-club/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Optimize web performance: bundle size, images, caching, lazy loading, and overall page speed. Use when site is slow, reducing bundle size, fixing layout shifts, improving Time to Interactive, or optimizing for Lighthouse scores. Triggers on: web performance, bundle size, page speed, slow site, lazy loading. Do NOT use for Core Web Vitals-specific fixes (use core-web-vitals), running Lighthouse audits (use perf-lighthouse), or Astro-specific optimization (use perf-astro).
Install
npx vskill@latest install tech-leads-club/agent-skills/perf-web-optimizationSKILL.md
The same SKILL.md was published earlier as tech-leads-club/agent-skills/perf-web-optimization.
Web Performance Optimization
Systematic approach: Measure → Identify → Prioritize → Implement → Verify.
Target Metrics
| Metric | Good | Needs Work | Poor | |
|---|---|---|---|---|
| LCP | < 2.5s | 2.5-4s | > 4s | |
| INP | < 200ms | 200-500ms | > 500ms | |
| CLS | < 0.1 | 0.1-0.25 | > 0.25 | |
| TTFB | < 800ms | 800ms-1.8s | > 1.8s |
Quick Wins
1. Images (usually biggest impact on LCP)
Always set width and height to prevent CLS.
2. Fonts (common LCP/CLS culprit)
3. Third-party Scripts (common INP killer)
4. Critical CSS
Inline critical CSS in <head>, defer the rest:
Bundle Analysis
Common heavy packages to replace:
moment(67KB) →date-fns(12KB) ordayjs(2KB)lodash(72KB) → cherry-pick imports or native methods
Code Splitting Patterns
Caching Headers
Measurement
For running audits, reading reports, and setting budgets, use the perf-lighthouse skill.
Checklist
Images
- [ ] Modern formats (WebP/AVIF)
- [ ] Responsive
srcset - [ ]
width/heightattributes - [ ]
loading="lazy"below fold - [ ]
fetchpriority="high"on LCP image
JavaScript
- [ ] Bundle < 200KB gzipped
- [ ] Code splitting by route
- [ ] Third-party scripts deferred
- [ ] No unused dependencies
CSS
- [ ] Critical CSS inlined
- [ ] Non-critical CSS deferred
- [ ] No unused CSS
Fonts
- [ ]
font-display: swap - [ ] Preconnect to font origin
- [ ] Subset if possible
Detailed Examples
For in-depth optimization patterns, see:
- references/core-web-vitals.md - Fixing LCP, CLS, INP issues
- references/bundle-optimization.md - Reducing JS bundle size
- references/image-optimization.md - Image formats, responsive images, sharp scripts
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/skills-catalog/skills/(performance)/perf-web-optimization/SKILL.md
Popularity
- Repository stars
- 4,626
- Repository forks
- 415
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tech-leads-club/agent-skills/perf-web-optimization)