seo
SKILL.md
SEO — Search & AI Engine Optimization
Production-ready SEO patterns for Next.js applications. Covers traditional SEO (Google), GEO (AI search engines), and implementation with actual code — not just recommendations.
This skill generates code, not audits. Every pattern includes production-ready Next.js App Router examples you can use directly.
Architecture Overview
[Metadata]
├── Static metadata (layout.tsx / page.tsx exports)
├── Dynamic metadata (generateMetadata with data fetching)
├── File-based (favicon.ico, opengraph-image.tsx, robots.ts, sitemap.ts)
└── Title templates (%s | Site Name)
↓
[Structured Data]
├── JSON-LD via <script type="application/ld+json">
├── Schema.org types (Article, Product, Organization, BreadcrumbList)
└── Rich results eligibility (FAQ, HowTo, Review, Video)
↓
[Crawlability]
├── robots.ts (Google + AI crawler control)
├── sitemap.ts (dynamic, with images and i18n)
├── Canonical URLs (alternates.canonical)
└── Internal linking
↓
[Performance (Ranking Factor)]
├── LCP — next/image priority, Server Components
├── INP — useTransition, code splitting
└── CLS — next/font, image dimensions
↓
[AI Visibility (GEO)]
├── llms.txt generation
├── Content structure for citation
├── AI crawler user-agent management
└── Entity optimization
Quick Reference
| Need to... | See |
|---|---|
| Add metadata to pages and layouts | Metadata |
| Create sitemap.xml and robots.txt | Crawlability |
| Add JSON-LD structured data | Structured Data |
| Generate dynamic OG images | OG Images |
| Optimize for AI search (ChatGPT, Perplexity) | GEO |
| Fix Core Web Vitals for SEO ranking | Performance |
| Avoid common SEO mistakes | Anti-Myths |
Decision Matrix
"What metadata does this page need?"
| Page Type | Title | Description | OG Image | Canonical | Structured Data |
|---|---|---|---|---|---|
| Home page | Static | Yes | Yes (branded) | Yes | Organization, WebSite, SearchAction |
| Listing/product page | Dynamic (from data) | Dynamic | Dynamic (from image) | Yes | Product, BreadcrumbList |
| Blog post | Dynamic | Dynamic | Dynamic (generated) | Yes | Article, BreadcrumbList |
| Category/search | Dynamic (with filters) | Dynamic | Optional | Yes (without query params) | BreadcrumbList, ItemList |
| Auth pages (login) | Static | Optional | No | noindex | None |
| Legal (privacy, terms) | Static | Yes | No | Yes | None |
| Dashboard/app pages | Static | Optional | No | noindex | None |
"Should this page be indexed?"
Is the page valuable to search users?
├── YES (content, product, article)
│ ├── Is there a canonical version? → Set alternates.canonical
│ ├── Is it paginated? → Set rel prev/next or canonical to page 1
│ └── Index it (default — no robots directive needed)
└── NO (auth, dashboard, admin, API, staging)
└── Set robots: { index: false, follow: false }
└── Also consider: noindex via robots.ts rules
SEO Anti-Myths (Google's Actual Guidance)
These are widely believed but wrong according to Google's official documentation:
| Myth | Reality | Source |
|---|---|---|
| "Add meta keywords" | Google has ignored <meta name="keywords"> since 2009 |
Google Webmaster Blog |
| "E-E-A-T is a ranking factor" | E-E-A-T is a quality rater guideline, not an algorithm signal | Google Quality Rater Guidelines |
| "Content must be X words long" | No minimum or maximum. Write what's useful. | Google SEO Starter Guide |
| "Heading order affects rankings" | Heading hierarchy helps accessibility, not rankings | Google Search Central (multiple confirmations) |
| "Duplicate content is a penalty" | No spam penalty. Google picks a canonical. Bad UX, not a ranking hit. | Google Search Central |
| "Domain keywords boost ranking" | Minimal if any impact | Google (multiple confirmations) |
| "Subdomain vs subdirectory matters" | Google can handle either. Choose for architecture, not SEO. | John Mueller, Google |
| "More backlinks = higher ranking" | Quality and relevance matter, not quantity | Google Link Spam Update |
| "FID is a Core Web Vital" | INP replaced FID in March 2024 | web.dev |
What Google Actually Cares About
- Unique, descriptive title tags per page
- Concise meta descriptions that summarize page content
- Canonical URLs to consolidate duplicate content
- Structured data (JSON-LD) for rich results eligibility
- Mobile-friendly design (responsive, touch-friendly)
- Core Web Vitals — LCP <= 2.5s, INP <= 200ms, CLS <= 0.1
- Descriptive alt text for images
- Internal linking with descriptive anchor text
- XML sitemaps for crawl efficiency
- robots.txt for crawl control
- HTTPS (ranking signal since 2014)
When Reviewing Code
- Every page has a unique
<title>(via metadata export or generateMetadata) - Every page has a meta description
- Root layout sets
metadataBasefor URL resolution - Root layout uses title template:
{ template: '%s | Site Name', default: '...' } -
app/sitemap.tsexists and covers all public routes -
app/robots.tsexists with rules for Googlebot and AI crawlers - Product/article pages have JSON-LD structured data
- Dynamic pages use
generateMetadatawith data memoization (cache()) - Images use
next/imagewith properalttext - Fonts use
next/font(prevents CLS) - Auth/dashboard pages have
robots: { index: false } - Canonical URLs set for pages accessible at multiple URLs
- No
<meta name="keywords">tag (Google ignores it) - OG images exist for shareable pages (social + messaging previews)
Weekly Installs
1
Repository
leahycc/claude-skillsFirst Seen
13 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
warp1