← ClaudeAtlas

nextjs-seolisted

Implement SEO correctly in a Next.js App Router or Pages Router codebase — metadata, canonicals, sitemaps, robots, Open Graph images, structured data, and rendering strategy. Use whenever the user is working in a Next.js project and mentions SEO, metadata, generateMetadata, sitemap.ts, robots.ts, canonical URLs, Open Graph, og:image, JSON-LD, indexing, or asks why Next.js pages aren't ranking or showing correct previews. Also use when reviewing a Next.js marketing site, blog or docs site before launch.
keupera/seo-skills · ★ 0 · Web & Frontend · score 72
Install: claude install-skill keupera/seo-skills
# Next.js SEO Next.js gives you everything needed for good SEO and defaults to almost none of it. The gaps are consistent across projects, so this is mostly a checklist of things to add rather than problems to debug. Assume App Router unless the code says otherwise. Pages Router equivalents are noted at the end. ## The root layout Set the metadata base and the defaults once. `metadataBase` is the one people miss, and without it every Open Graph and canonical URL is emitted relative, which breaks previews everywhere. ```tsx // app/layout.tsx import type { Metadata } from 'next' export const metadata: Metadata = { metadataBase: new URL('https://example.com'), title: { default: 'Example — short promise', template: '%s | Example', }, description: 'One sentence a human would read. 140-160 characters.', alternates: { canonical: '/' }, openGraph: { type: 'website', siteName: 'Example', locale: 'en_US', url: '/', }, twitter: { card: 'summary_large_image' }, robots: { index: true, follow: true, googleBot: { index: true, follow: true, 'max-image-preview': 'large', 'max-snippet': -1 }, }, } ``` `max-image-preview: large` and `max-snippet: -1` are worth setting explicitly. Without them some surfaces show a truncated snippet and a thumbnail instead of a full-size image. ## Per-page metadata Static pages export a `metadata` object. Dynamic pages use `generateMetadata`, which runs on the server and is deduped against the page'