performance-seo-optimization
Skill2 starsChanged 4 months agoMITView on GitHub
Optimize Core Web Vitals (LCP, CLS, INP) and technical SEO (metadata, structured data, sitemaps) for Next.js/React sites. Use whenever the user asks about site speed, Lighthouse scores, Core Web Vitals, SEO, or building anything public-facing that needs to rank/load fast.
In this repository22 other files it gives its agents.
- accessibility-a11ySkill
- design-system-tailwindSkill
- motion-design-toolkitSkill
- nextjs-architectureSkill
- react-component-engineeringSkill
- react-three-fiber-3dSkill
- responsive-mobile-firstSkill
- auth-authorizationSkill
- database-schema-designSkill
- form-validation-error-handlingSkill
- mern-stack-architectureSkill
- rest-api-integrationSkill
- state-managementSkill
- landing-page-conversionSkill
- payment-gateway-integrationSkill
- saas-dashboard-adminSkill
- startup-mvp-developmentSkill
- ux-research-flow-designSkill
- visual-design-languageSkill
- ai-assisted-frontend-workflowSkill
- deployment-vercel-productionSkill
- project-architecture-clean-codeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
CLS (Cumulative Layout Shift): always set explicit width/height (or next/image's automatic sizing) on images/embeds.
- Very specific: line 11
INP (Interaction to Next Paint): keep the main thread free — avoid large synchronous JS execution on interaction, code-split heavy client …
- Very specific: line 29
Every page needs a unique, descriptive title/description — never leave a site-wide default on every page.
- Distinctive: line 43
No explicit dimensions on images/embeds, causing layout shift
≈ “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
Performance & SEO Optimization Skill
Core Web Vitals checklist
- LCP (Largest Contentful Paint): identify the LCP element (usually hero image/heading) — use
next/imagewithpriorityon it, preload critical fonts, avoid render-blocking client-side data fetching for above-the-fold content (prefer Server Components). - CLS (Cumulative Layout Shift): always set explicit width/height (or
next/image's automatic sizing) on images/embeds; reserve space for ads/dynamic content with a fixed-size skeleton; avoid injecting content above existing content after load. - INP (Interaction to Next Paint): keep the main thread free — avoid large synchronous JS execution on interaction, code-split heavy client components (charts, 3D, rich editors) with
next/dynamic, debounce expensive handlers (search-as-you-type).
Practical optimization order (highest impact first)
- Image optimization (
next/image, correctsizes, modern formats) — usually the single biggest win. - Font loading (
next/fontfor automatic self-hosting +font-display: swapbehavior, subset if using a large font). - Code splitting heavy client-only libraries (3D, charting, rich text editors) via
next/dynamicso they don't block initial load on pages that don't need them. - Server-render/stream content instead of client-fetching on mount.
- Third-party scripts (analytics, chat widgets) loaded with
next/script'sstrategy="lazyOnload"/afterInteractive— neverbeforeInteractiveunless truly required.
Technical SEO essentials (Next.js Metadata API)
export const metadata: Metadata = {
title: 'Product Name — Clear Value Prop',
description: 'Concise, unique description under ~160 characters.',
openGraph: { title, description, images: ['/og-image.png'], type: 'website' },
alternates: { canonical: 'https://example.com/page' },
};- Every page needs a unique, descriptive
title/description— never leave a site-wide default on every page. generateMetadatafor dynamic routes (product/blog pages) pulling from the actual content, not a generic fallback.- Structured data (JSON-LD) for content types that benefit from rich results (products, articles, FAQs, org info).
sitemap.xml/robots.txtgenerated (Next.js supportssitemap.ts/robots.tsroute conventions) and verified to actually list the intended pages, not accidentally block them.- Semantic HTML (
<h1>once per page, logical heading order,<nav>/<main>/<article>) — this is both an SEO and accessibility signal.
Measuring
- Lighthouse (lab data) for pre-launch checks; real-user Core Web Vitals (Vercel Analytics, Google Search Console's Core Web Vitals report) for production truth — lab and field data can diverge, trust field data for real users' experience.
- Re-measure after each optimization — don't apply a checklist blindly without confirming actual improvement, especially for INP which depends heavily on real device/network conditions.
Anti-patterns to flag
- Hero images not using
next/image/nopriorityhint, tanking LCP - Missing/duplicate page titles and descriptions across dynamic routes
- Heavy third-party scripts loaded
beforeInteractivewithout justification - No explicit dimensions on images/embeds, causing layout shift
Example prompt this skill should trigger on
"Our Lighthouse score is bad and we want this page to rank better in search — help optimize it."
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.

