web-performance-optimization · davila7 — Claude Code skill: speed and Core Web
A Claude skill that walks through why a site loads slowly and fixes the bottlenecks step by step.
npx claude-code-templates@latest --skill web-development/web-performance-optimizationWhat web-performance-optimization does
The skill runs the agent through five stages: capture a baseline (Lighthouse, LCP, FID, CLS, bundle sizes, network waterfall), find the problems, rank them, apply fixes, then re-measure. The examples cover the usual suspects — a 2.5MB hero image, an 850KB JavaScript bundle blocking the main thread, render-blocking scripts, images without dimensions that shift the layout.
Fixes are concrete. Serve images as AVIF and WebP with width and height set, split code with lazy and dynamic, swap moment for date-fns, import single lodash functions instead of the whole library, add defer to analytics. For CLS there is a skeleton loader that reserves space before content arrives.
Verification loops back: re-run Lighthouse, compare before and after, check real user metrics, test on different devices and networks. The skill will not hand you a bundler config — it works out what is slow and proposes the steps. Without access to production metrics, some conclusions stay at the level of local measurements.
What it helps with
- find out why a page loads slowly
- bring LCP, FID and CLS into the green
- shrink a JavaScript bundle
- stop layout shifts from images without dimensions
- get ready for a performance audit
Example prompts for the agent
- run a performance audit on my site and show me what's slow
- why is my LCP 4.2s — break it down and suggest fixes
- cut my bundle size: check the dependencies and tell me what to replace
How to install web-performance-optimization
1claude-code-templates
npx claude-code-templates@latest --skill web-development/web-performance-optimization2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill web-performance-optimization -a claude-code3Manually: put the files in place
~/.claude/skills/web-performance-optimization/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/web-performance-optimization/
Manually: put the files in place
.agents/skills/web-performance-optimization/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/web-performance-optimization/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates web-performance-optimization2Manually: put the files in place
.github/skills/web-performance-optimization/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/web-development/web-performance-optimizationManually: put the files in place
.devin/skills/web-performance-optimization/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about web-performance-optimization
How do I install web-performance-optimization in Claude?
With the templates CLI: npx claude-code-templates@latest --skill web-development/web-performance-optimization. The other route is npx skills add davila7/claude-code-templates --skill web-performance-optimization -a claude-code. The file then sits at ~/.claude/skills/web-performance-optimization/SKILL.md.
What does web-performance-optimization do?
It measures current site speed, locates the bottlenecks and applies optimizations: image compression, code splitting, caching, lazy loading of non-critical resources. Then it re-measures to show the effect.
Which metrics does the skill cover?
Core Web Vitals: LCP, FID and CLS. Alongside those, the Lighthouse score, bundle sizes, Time to Interactive and the network waterfall.
Similar skills
Everything for Frontend and UI →web-performance-optimization by other authors comes first.