nextjs-seo — Claude Code skill: SEO checks and setup
Audits and implements SEO for Next.js App Router, from metadata to indexing diagnosis. Use it when changing search-facing pages or investigating production behavior.
npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a claude-codeWhat nextjs-seo does
The skill covers SEO work in Next.js App Router projects: metadata and social images, sitemaps and robots rules, canonical URLs, localization, and structured data. It can also help investigate indexing, AI crawler policy, Core Web Vitals, and issues involving served HTML or hydration.
Before proposing changes, it checks the installed Next.js version and the relevant documentation, then examines production responses such as status codes, headers, and rendered HTML. Evidence matters: a sitemap does not make a page indexable, and Lighthouse cannot establish field INP. Reports should keep traffic findings separate from crawl and index status.
This is for SEO implementation and audits, not unrelated Next.js feature work. The skill also says to preserve the site owner’s crawler policy; robots rules are not access control. Reference materials cover metadata, sitemap and robots, structured data, AI search, and troubleshooting.
What it helps with
- configure App Router metadata and social images
- audit sitemap, robots rules, and canonical URLs
- diagnose why a page is missing from search indexes
- separate traffic evidence from crawl and index findings
- assess Core Web Vitals using field measurements
Example prompts for the agent
- Audit this Next.js App Router page and suggest SEO changes based on its production response.
- Find out why this URL is not indexed; check its canonical URL, crawl rules, and served HTML.
- Review the site’s SEO and separate traffic, indexing, and Core Web Vitals evidence.
How to install nextjs-seo
1Skills CLI (Vercel)
npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a claude-code2Manually: put the files in place
~/.claude/skills/nextjs-seo/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/nextjs-seo/
1Skills CLI (Vercel)
npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a codex2Manually: put the files in place
.agents/skills/nextjs-seo/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a cursor2Manually: put the files in place
.cursor/skills/nextjs-seo/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install laguagu/claude-code-nextjs-skills nextjs-seo2Manually: put the files in place
.github/skills/nextjs-seo/SKILL.md1Skills CLI (Vercel)
npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a gemini-cli2Platform CLI
gemini skills install https://github.com/laguagu/claude-code-nextjs-skills --path skills/nextjs-seoManually: put the files in place
.devin/skills/nextjs-seo/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about nextjs-seo
How do I install nextjs-seo in Claude Code?
Run npx skills add laguagu/claude-code-nextjs-skills --skill nextjs-seo -a claude-code. The skill file is available at ~/.claude/skills/nextjs-seo/SKILL.md.
What does nextjs-seo do?
It supports SEO implementation and audits for Next.js App Router, including metadata, sitemaps, structured data, and indexing diagnosis.
Can Lighthouse establish field INP?
No. The skill treats Lighthouse as a lab diagnostic; field measurements are needed to assess field Core Web Vitals.
Source text
SKILL.md · MIT
--- name: nextjs-seo description: Next.js App Router SEO implementation and audits. Use for metadata and social images, sitemap/robots, canonicals and localization, structured data, Core Web Vitals evidence, AI crawler policy or search-indexing diagnosis. Not for general Next.js feature work unrelated to SEO. --- # Next.js SEO Start from the page's task, production response and observed search behavior. Read the installed Next.js version and relevant `node_modules/next/dist/docs/` pages (bundled from 16.2); otherwise use matching official documentation. `Metadata`, `Viewport` and `MetadataRoute` types are also in `node_modules/next/dist/lib/metadata/types/metadata-interface.d.ts`. Keep framework APIs, caching mode and deployment policy consistent with the project. Useful, distinct content matters more than a longer page. Give titles, headings and descriptions separate jobs; add a FAQ, summary, badges or extra pages only when they help the reader. Publication dates must reflect meaningful changes. Verify authorship, credentials and factual claims. ## Implementation and audit scope - Verify public URLs, redirects, status codes, crawl rules, index directives and canonicals before adding markup. A sitemap supports discovery; it does not make a page indexable or guarantee indexing. - Keep important public content available in the served HTML when practical. A Client Component can be server-prerendered; `use client` alone does not remove content from HTML. - Use the App Router Metadata API and file conventions. Resolve relative metadata URLs with the correct production `metadataBase` and verify emitted absolute URLs. Do not rely on missing-base behavior across versions/hosts. - Configure refresh/invalidation for data-backed pages, metadata and sitemaps. A database query alone does not guarantee publication updates reach them. With Cache Components enabled, follow the installed Next.js caching docs (`node_modules/next/dist/docs/`); caching is a freshness decision rather than a required SEO directive. - Structured data must describe real visible content and a supported consumer. Check current rich-result eligibility instead of adding every schema type. - Preserve the owner's crawler policy. Training, search and user-triggered retrieval have different controls; robots rules are not access control. ## Read for the affected area - [Metadata](references/metadata-api.md): inheritance, social images, icons and streaming. - [Sitemaps/robots](references/sitemap-robots.md): discovery, localization and preview policy. - [Structured data](references/json-ld.md): current eligibility and safe serialization. - [AI search](references/ai-search.md): crawler purposes, policy and evidence. - [Audit checklist](references/checklist.md): scoped production and Search Console checks. - [Troubleshooting](references/troubleshooting.md): indexing, HTML and hydration diagnosis. Separate evidence in the report: a performance export shows queries/traffic; URL Inspection and indexing reports address crawl/index/canonical status; field measurements address Core Web Vitals. Lighthouse is a lab diagnostic and cannot establish field INP. Good field thresholds at the 75th percentile are LCP ≤ 2.5 s, INP ≤ 200 ms and CLS ≤ 0.1. Verify status, headers and complete production HTML, including relevant bot responses, then open the route directly and test its interaction. A spoofed User-Agent tests response handling, not actual verified bot access. Report unavailable checks explicitly and avoid ranking, indexing or citation promises.
© laguagu · MIT · laguagu/claude-code-nextjs-skills