seo-core-web-vitals
Skill10 starsChanged 6 months agoMITView on GitHub
Use when optimizing LCP, INP, or CLS specifically for SEO in a Lovable SPA: PageSpeed/CrUX issues, hero image too heavy, layout shift from web fonts, slow interactions on mobile. Not for backend-only perf (use performance-budget).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Hainrixz/claude-seo-aitheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Hainrixz/claude-seo-ai★ 81same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- accessibility-passSkill
- analytics-eventsSkill
- api-error-handlingSkill
- audit-logging-backendSkill
- background-jobs-and-cronSkill
- dark-mode-and-themingSkill
- dashboard-charts-rechartsSkill
- edge-functions-and-webhooksSkill
- email-and-notificationsSkill
- error-states-and-empty-uiSkill
- feature-flags-and-togglesSkill
- file-upload-storageSkill
- i18n-multi-languageSkill
- lovable-prompting-playbookSkill
- lovable-ship-checklistSkill
- migration-playbookSkill
- multi-tenant-backendSkill
- onboarding-copySkill
- optimistic-updatesSkill
- payment-failed-and-recoverySkill
- payment-webhook-idempotencySkill
- payment-webhook-testingSkill
- performance-budgetSkill
- pg-cron-recipesSkill
- pg-cron-scheduled-jobsSkill
- pg-cron-with-pg-net-edgeSkill
- postgres-full-text-searchSkill
- postgres-triggers-and-functionsSkill
- pricing-and-billingSkill
- programmatic-seo-content-qualitySkill
- programmatic-seo-pagesSkill
- rate-limiting-edgeSkill
- realtime-and-subscriptionsSkill
- refactor-safe-diffSkill
- release-notesSkill
- seo-landing-pageSkill
- seo-meta-tags-spaSkill
- seo-sitemap-generationSkill
- seo-ssr-and-prerenderingSkill
- seo-structured-dataSkill
- server-input-validationSkill
- shadcn-patternsSkill
- soft-delete-and-archivingSkill
- stripe-one-time-payment-webhooksSkill
- stripe-payment-webhooksSkill
- supabase-auth-flowsSkill
- supabase-database-designSkill
- supabase-rls-and-authSkill
- support-replySkill
- tanstack-infinite-queriesSkill
- tanstack-mutations-and-invalidationSkill
- tanstack-prefetch-and-hydrationSkill
- tanstack-query-alternativeSkill
- tanstack-router-data-loadersSkill
- tanstack-start-server-routesSkill
- typed-api-hooks-formsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
Use <img fetchpriority="high" loading="eager" decoding="async">, never loading="lazy".
- Very specific: line 60
Use system fonts or font-display: swap + preconnect to Google Fonts.
- Distinctive: line 61
Avoid client-side fetch for above-the-fold copy.
- Very specific: line 77
Use startTransition for non-urgent updates (search filtering, tab switches).
- Very specific: line 86
Always set width/height (or aspect-ratio) on images, video, iframes, ads.
- Distinctive: line 89
Avoid injecting banners (cookie, "subscribe!") above existing content after load.
- Distinctive: line 107
Use Partytown to move analytics to a worker if you can't remove.
- Distinctive: line 114
Test in DevTools with Mobile + Slow 4G + 4× CPU throttling.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SEO Core Web Vitals (LCP, INP, CLS)
Core Web Vitals are a Google ranking signal. Each public page must pass on mobile (the harder threshold).
| Metric | Good | Poor |
| LCP — Largest Contentful Paint | ≤ 2.5 s | > 4.0 s |
| INP — Interaction to Next Paint | ≤ 200 ms | > 500 ms |
| CLS — Cumulative Layout Shift | ≤ 0.10 | > 0.25 |
Companion skills: performance-budget, seo-ssr-and-prerendering, dashboard-charts-recharts, accessibility-pass.
Measure first
- PageSpeed Insights — field (CrUX) + lab (Lighthouse).
- Chrome DevTools → Performance → record on mobile throttling.
web-vitalspackage + your analytics for real-user monitoring.
import { onLCP, onINP, onCLS } from "web-vitals";
onLCP((m) => track("web_vital", { name: "LCP", value: m.value }));
onINP((m) => track("web_vital", { name: "INP", value: m.value }));
onCLS((m) => track("web_vital", { name: "CLS", value: m.value }));LCP — biggest fix is the hero image
Almost always: the hero image is the LCP element on marketing pages.
- Preload it:
<link rel="preload" as="image" href="/hero.webp" fetchpriority="high">. - Use
<img fetchpriority="high" loading="eager" decoding="async">, neverloading="lazy". - Serve WebP/AVIF; use
srcsetfor responsive sizes. - Explicit
width/heightattributes — avoids CLS too. - Inline critical CSS for the hero region; defer the rest.
<img
src="/hero-960.webp"
srcSet="/hero-480.webp 480w, /hero-960.webp 960w, /hero-1440.webp 1440w"
sizes="(max-width: 768px) 100vw, 960px"
width={960}
height={540}
alt="Acme dashboard preview"
fetchPriority="high"
decoding="async"
/>Other LCP wins:
- Prerender the public route (
seo-ssr-and-prerendering) — kills "white screen until JS". - Use system fonts or
font-display: swap+ preconnect to Google Fonts. - Avoid client-side fetch for above-the-fold copy; ship as HTML.
INP — keep the main thread free
Common culprits:
- Heavy JSON parsing on render.
- Mega-renders triggered by uncontrolled state updates.
- Third-party tags (chat widgets, analytics) blocking input.
Fixes:
- Defer third-party scripts:
asyncordefer, load chat widgets after user intent. - Code-split routes (
React.lazy+Suspense). - Break large lists with virtualization (
tanstack-infinite-queries). - Memoize expensive renders (
useMemo,React.memo) only after profiling. - Use
startTransitionfor non-urgent updates (search filtering, tab switches).
const [pending, startTransition] = useTransition();
const onFilter = (v: string) => startTransition(() => setQuery(v));CLS — reserve space for every dynamic element
- Always set
width/height(or aspect-ratio) on images, video, iframes, ads. - Web fonts:
font-display: swap+size-adjustor matching fallback metrics. - Skeleton loaders sized to match real content.
- Avoid injecting banners (cookie, "subscribe!") above existing content after load.
@font-face {
font-family: "Inter";
src: url(/Inter.woff2) format("woff2");
font-display: swap;
size-adjust: 107%; /* match fallback metrics */
}For shadcn projects, the default next/font or local font setup typically handles this — verify with Lighthouse.
Third-party tags audit
Most SPAs ship with: PostHog, GA4, Stripe.js, Sentry, Intercom, Hotjar, Crisp. Each blocks the main thread.
- Load only on routes that need them (Stripe.js only on
/checkout). - Use Partytown to move analytics to a worker if you can't remove.
- Audit your
<head>: every<script>should justify its bytes.
Mobile reality check
PageSpeed runs on a throttled 4G mobile. Your dev MacBook is not the customer.
- Test in DevTools with Mobile + Slow 4G + 4× CPU throttling.
- Open the site on a real mid-range Android once per release.
Avoid
loading="lazy"on the hero image (it's the LCP element, must load immediately).- Hundreds of
useMemo/useCallback"for safety" — they cost too. - Hydrating a giant initial state on every route.
- Cookie banners that move all the content down 100 px after 2 seconds.
- Ignoring INP — it replaced FID in 2024 and trips up many SPAs.
Checklist
- LCP image preloaded + sized + WebP/AVIF.
- No
loading="lazy"on LCP element. - Fonts use
font-display: swap. - All images, embeds have explicit dimensions.
- Third-party scripts deferred or route-scoped.
- PageSpeed Mobile shows green for LCP, INP, CLS.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

