Seo performance
Skill mvstepanek/nextjs-ecommerce-seo-skills/global-skills/seo-performance
SEO skills for AI coding assistants (Claude Code + GitHub Copilot) targeting Next.js e-commerce sites
npx -y skills add mvstepanek/nextjs-ecommerce-seo-skills --skill seo-performanceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Core Web Vitals and performance SEO rules for Next.js. Use when optimizing page load, working with third-party scripts, fonts, bundle size, or addressing LCP/CLS/INP issues.
SKILL.md
3.1 KB, as published. Nobody here has run it
Performance & Core Web Vitals SEO Guidelines
Core Web Vitals are a Google ranking factor. Follow these rules for optimal performance.
Targets
| Metric | Target | Measures |
|---|---|---|
| LCP | < 2.5s | Main content load speed |
| CLS | < 0.1 | Visual stability during load |
| INP | < 200ms | Interaction responsiveness |
Server-Side Rendering by Default
- Render critical content server-side — App Router: use Server Components; Pages Router: use
getServerSideProps/getStaticProps - Only use client-side rendering (
"use client"/useEffect) when truly needed for interactivity - Server-rendered content: faster LCP, zero JS bundle cost for display-only content
- Data-display components (product info, specs, lists) should be Server Components
// GOOD — Server Component (default)
export default async function Page({ params }: Props) {
const data = await getData(params.id);
return <h1>{data.title}</h1>;
}
// Client component ONLY for interactive parts
"use client";
export function InteractiveWidget() { /* state, effects, handlers */ }
LCP Optimization
- Preload hero images with
priorityprop on next/image - Fetch above-fold data server-side (never behind useEffect)
- Use ISR for frequently accessed pages:
export const revalidate = 300;
CLS Prevention
- Always size images (width/height or fill with container)
- Use
next/fontwithdisplay: 'swap'— prevents font-related layout shift - Reserve space for dynamic content loading
import { Inter } from 'next/font/google';
const inter = Inter({ subsets: ['latin'], display: 'swap', weight: ['400', '700'] });
Third-Party Scripts
import Script from 'next/script';
// Analytics, tag managers — after page is interactive
<Script id="analytics" strategy="afterInteractive" src="..." />
// Non-critical (chat, surveys) — lazy load
<Script id="chat" strategy="lazyOnload" src="..." />
// NEVER use beforeInteractive for analytics — blocks rendering
Bundle Size
- Dynamic imports for below-fold components
- Import specific functions, not entire libraries
- Use
@next/bundle-analyzerto monitor
import dynamic from 'next/dynamic';
const HeavyComponent = dynamic(() => import('./HeavyComponent'));
Streaming with Suspense
import { Suspense } from 'react';
export default function Page() {
return (
<>
<FastContent />
<Suspense fallback={<Skeleton />}>
<SlowContent />
</Suspense>
</>
);
}
Common Mistakes
- Client-side rendering of data-display components — keep them server-rendered
beforeInteractivefor analytics — blocks page render- Loading fonts via
<link>— use next/font - Fetching data in useEffect for above-fold content — fetch on server
- Not using Suspense — entire page waits for slowest query