---
name: seo-fundamentals
description: Auto-invoke when reviewing HTML head, meta tags, or Next.js page components. Enforces semantic HTML and search optimization.
---
# SEO Fundamentals Review
> "Good SEO is good UX. If search engines can't understand your page, users might not find it."
## When to Apply
Activate this skill when:
- Reviewing HTML `
` sections
- Seeing meta tags in code
- Next.js/Remix page components
- HTML structure with headings
- Any page that should be indexed
---
## The SEO Checklist
### Must Have (Every Page)
- [ ] **Title tag** — 50-60 characters, unique per page
- [ ] **Meta description** — 150-160 characters, compelling
- [ ] **Single H1** — One per page, describes main content
- [ ] **Logical heading hierarchy** — H1 → H2 → H3 (no skipping)
- [ ] **Semantic HTML** — ``, ``, ``, ``, ``
- [ ] **Image alt text** — Descriptive, not "image1.jpg"
### Should Have (Marketing Pages)
- [ ] **Open Graph tags** — og:title, og:description, og:image
- [ ] **Twitter Card** — twitter:card, twitter:title
- [ ] **Canonical URL** — Prevent duplicate content issues
- [ ] **Structured data** — JSON-LD for rich snippets
### Performance (Affects SEO)
- [ ] **Core Web Vitals awareness**
- LCP (Largest Contentful Paint) < 2.5s
- FID (First Input Delay) < 100ms
- CLS (Cumulative Layout Shift) < 0.1
---
## Common Mistakes (Anti-Patterns)
### 1. Multiple H1 Tags
```html
Welcome
Our Products
Contact Us
Welcome to Our Store
Our Products
Contact Us
```
### 2. Missing Alt Text
```html
```
### 3. Div Soup (No Semantic HTML)
```html
...
...
```
### 4. Skipping Heading Levels
```html
Page Title
Some Section
Page Title
Main Section
Subsection
```
### 5. Generic Title Tags
```html
Home
Page
Daniel Lamb - Full Stack Developer Portfolio
Contact Us | Acme Software Solutions
```
---
## Socratic Questions
Ask these instead of giving answers:
1. **Title**: "If someone sees this title in Google results, would they click it?"
2. **H1**: "How many H1 tags does this page have? What happens if there are multiple?"
3. **Alt Text**: "If the image doesn't load, what information is lost?"
4. **Semantic HTML**: "Can a screen reader understand the structure of this page?"
5. **Meta Description**: "Does this description make you want to click?"
---
## Stack-Specific Guidance
### Next.js (App Router)
```tsx
// Pattern: Metadata export
export const metadata = {
title: 'Page Title',
description: 'Page description',
// Your implementation will differ
};
```
### Next.js (Pages Router)
```tsx
// Pattern: Next Head
import Head from 'next/head';
Your title here
```
### Plain HTML/React
```html
Title here
```
---
## Red Flags to Call Out
| Flag | Question |
|------|----------|
| Missing title tag | "What will this page show in search results?" |
| Multiple H1s | "Which heading is the main topic? Search engines are confused." |
| No meta description | "How will Google summarize this page?" |
| Empty alt text | "What if the image doesn't load? What info is lost?" |
| All divs, no semantics | "Can a screen reader navigate this page?" |
| Title over 60 chars | "This will be cut off in search results. Can you shorten it?" |
---
## Open Graph Template
```html
```
---
## Interview Connection
> "I implemented SEO best practices including semantic HTML, proper heading hierarchy, and meta tags, improving our page's discoverability."
When reviewing their code:
- "What's your SEO strategy for this page?"
- "How would Google understand what this page is about?"
- "Show me your heading structure"
---
## MCP Usage
### Context7 - Framework Docs
```
Fetch: Next.js metadata documentation
Fetch: Semantic HTML best practices
```
### Octocode - Real Examples
```
Search: "metadata" + "title" + "description" in Next.js repos
Search: Open Graph implementation patterns
```