- Home
- Skills
- Frontend & Web Apps
- Web Vitals Performance Optimizer
Works with the AI Agents you already use
Web Vitals Performance Optimizer
Diagnose and fix LCP, CLS, and INP issues with automated frontend code refactoring and performance auditing.
$15
Web Vitals Performance Optimizer
Example session with this skill installed
My Next.js landing page has a poor LCP and the hero image is shifting the layout. Optimize it for Core Web Vitals.
- Read your context and instructions
- Compiled the web vitals performance
- Generated the image
I have audited the landing page components and identified three critical issues affecting LCP and CLS. I have implemented high-priority fetching for the hero asset and enforced explicit aspect-ratio containers to stabilize the layout.
Core Web Vitals Optimization Audit
| Metric | Issue Identified | Resolution Applied |
|---|---|---|
| LCP | Hero image banner.webp discovered without priority hints. | Added fetchpriority="high" and loading="eager". |
| CLS | Ad slot and Hero container lack explicit height/width. | Wrapped in CSS Aspect Ratio containers with fixed dimensions. |
| INP | Synchronous heavy JS block in Navbar.tsx blocking input. | Refactored using scheduler.yield() to break long tasks. |
Code Refactoring: HeroComponent.tsx
// Optimized for LCP and CLS
export const Hero = () => {
return (
<section className="hero-container" style={{ minHeight: '600px', aspectAppearance: 'auto' }}>
<img
src="/assets/banner.webp"
alt="Product Banner"
width={1200}
height={600}
fetchpriority="high"
style={{ objectFit: 'cover', width: '100%', height: 'auto' }}
/>
<div className="content-overlay">
<h1>Building the future of web apps</h1>
</div>
</section>
);
};
Next steps
- Verify the LCP improvement using Chrome DevTools Performance tab with 4G throttling.
- Ensure the new aspect-ratio containers do not conflict with global responsive CSS rules.
- Run the automated evaluation suite in
evals/eval-suite.jsonto confirm the fix.
Navbar.tsx
PNG · 1536×1024
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Slow page loads and poor Core Web Vitals kill conversion rates and search rankings. Most developers struggle to pinpoint exactly why a site feels sluggish or jumps around during loading. This skill acts as a specialized performance engineer to diagnose and fix LCP, CLS, and INP issues.
What it does
- LCP Acceleration: Identifies hero elements and implements
fetchpriority="high"and preloading to speed up the largest contentful paint. - Layout Shift Elimination: Audits images, videos, and ad slots to enforce explicit dimensions and prevent cumulative layout shifts.
- Interaction Optimization: Analyzes main-thread tasks and implements
scheduler.yield()or Web Workers to improve Interaction to Next Paint. - Font & Asset Loading: Refactors loading strategies for fonts and static assets to reduce render-blocking delays.
How it works
- Audit phase: The skill scans the frontend codebase to identify performance bottlenecks in the rendering path.
- Diagnostic report: It categorizes issues by specific Core Web Vitals metrics.
- Refactoring: It generates specific HTML and JavaScript modifications to resolve identified regressions.
Frameworks & tools
Works with modern frontend stacks including React, Next.js, and vanilla HTML/JS. Utilizes native browser APIs like the Performance API and Scheduler API.
Why this beats prompting it yourself
Generic prompts often suggest broad advice like "optimize images." This skill follows a deterministic workflow to provide specific, production-ready code changes for specific CWV metrics, ensuring you don't miss technical details like fetch priority or main-thread yielding.
Use cases
- Stabilizing a jumping UI by fixing Cumulative Layout Shift.
- Reducing time-to-first-paint for hero images on landing pages.
- Resolving input lag in complex React applications.
- Preparing a site for a Google Search Console performance audit.
Known limitations
Restricted to frontend optimizations within the active workspace. It does not perform server-side infrastructure tuning or global system package installations.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
Restricted to frontend workspace file analysis. Cannot perform server-side infra tuning or global package installs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
- Software
- Zero global installationorelevated privileges required.
File System Read/Write (strictly scoped to current project workspace `./`).
Permissions
Target Use Cases: - Optimize my website to pass Core Web Vitals LCP and CLS. - Fix high Cumulative Layout Shift caused by dynamic content. - Improve Interaction to Next Paint (INP) performance in JavaScript.