Skip to content
tech-leads-club avatar

Perf Web Optimization

Practical web performance playbook covering bundles, images, fonts, scripts, and caching, with Lighthouse-aligned metric targets.

CCM score
63 of 100
skills.sh installs
298
GitHub stars
7.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the workflow measure, identify, prioritize, implement, and verify, with targets for LCP, INP, CLS, and TTFB
  • Includes quick-win patterns for image loading, font loading, deferred third-party scripts, and critical CSS inlining
  • Provides bundle analysis commands (webpack-bundle-analyzer, vite-bundle-visualizer, bundlephobia) and code splitting and caching header examples
  • Designed for diagnosing slow sites, reducing bundle size, and fixing layout shifts, with out-of-scope topics routed to sibling skills

Install

$ npx -y skills add tech-leads-club/agent-skills --skill perf-web-optimization -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Web Performance Optimization

Systematic approach: Measure → Identify → Prioritize → Implement → Verify.

Target Metrics

MetricGoodNeeds WorkPoor
LCP< 2.5s2.5-4s> 4s
INP< 200ms200-500ms> 500ms
CLS< 0.10.1-0.25> 0.25
TTFB< 800ms800ms-1.8s> 1.8s

Quick Wins

1. Images (usually biggest impact on LCP)

<!-- Hero/LCP image: eager + high priority -->
<img src="/hero.webp" alt="Hero" width="1200" height="600" loading="eager" fetchpriority="high" decoding="async" />

<!-- Below fold: lazy load -->
<img src="/product.webp" alt="Product" width="400" height="300" loading="lazy" decoding="async" />

Always set width and height to prevent CLS.

2. Fonts (common LCP/CLS culprit)

<!-- Preconnect to font origin -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

<!-- Non-blocking font load -->
<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/css2?family=Inter&display=swap"
  media="print"
  onload="this.media='all'"
/>

3. Third-party Scripts (common INP killer)

Details

Repository
github.com/tech-leads-club/agent-skills
Categories
Frontend & UI Code, Debugging
First seen
Jun 3, 2026

Questions

What does the perf-web-optimization skill do?

The perf-web-optimization skill guides an agent through web performance work on bundle size, images, caching, lazy loading and overall page speed. It follows a measure, identify, prioritize, implement and verify approach, with target metrics for LCP, INP, CLS and TTFB.

How do I install perf-web-optimization?

Run npx -y skills add tech-leads-club/agent-skills --skill perf-web-optimization -y in a project. Once installed, the agent can apply the image, font, third-party script and code splitting patterns covered in the skill.

When should I use perf-web-optimization instead of another performance skill?

Use it when a site is slow, a bundle is too large, layout shifts need fixing, or Time to Interactive needs work. For Core Web Vitals-specific fixes, running Lighthouse audits or Astro-specific optimization, the listing points to the core-web-vitals, perf-lighthouse and perf-astro skills instead.

More from tech-leads-club/agent-skills

All 22

Similar to Perf Web Optimization

More Frontend & UI Code