Audit and optimize web pages for SEO. Use when user asks to "optimize SEO", "check SEO", "add meta tags", "add structured data", "add schema markup", "improve search ranking", "SEO audit", or wants to generate Open Graph tags, JSON-LD, or fix SEO issues on HTML pages.
Audit a web page against current SEO best practices (2025-2026) and generate missing or improved elements.
Determine what to audit:
If the user provides a URL or file, read it. If unclear, ask what page to optimize.
Consult for the full checklist and reference material.
references/seo-checklist.mdRun through each category and report issues:
Title & Meta — Check title tag (50-60 chars, keyword near start, unique), meta description (150-160 chars, keyword + CTA), canonical tag, Open Graph tags, Twitter Card tags.
Headings — Single H1 with primary keyword, logical H2/H3 hierarchy, no skipped levels, no heading tags used for styling.
Images — Alt text on all images, explicit width/height, descriptive filenames, WebP format, lazy loading on below-fold images.
Structured Data — Check for existing JSON-LD. Determine appropriate schema type(s) for the page content (Article, FAQ, Product, LocalBusiness, BreadcrumbList, Organization, etc.).
Internal Linking — Descriptive anchor text, no orphan pages, links to related content.
Content — Primary keyword in first 100 words, comprehensive coverage, author attribution, publication/update dates, external authority links.
Technical — HTTPS, canonical URL, no accidental noindex, mobile-friendly markup, no render-blocking resources.
Present findings grouped by severity:
For each issue: state what's wrong, why it matters, and the fix.
Generate the actual markup for all issues found:
references/seo-checklist.mdApply fixes directly to the file(s) when the user has given edit access. Otherwise, present the generated markup for the user to apply.
After applying fixes:
User says: "optimize SEO on src/pages/about.html"
User says: "add schema markup to our product page"
<script type="application/ld+json"> block to <head>User says: "check SEO on https://example.com/blog/post"
<head> sectionCause: Single-page app or component that doesn't control the HTML document.
Solution: Identify where the <head> is managed (layout file, _app.tsx, index.html) and apply meta tags there. For structured data, JSON-LD can go anywhere in <body>.
Cause: Page already has partial or outdated schema. Solution: Merge with existing schema rather than duplicating. Remove deprecated schema types. Validate the combined result.
Cause: Meta tags need to be set per-route, not just in a static HTML file.
Solution: Use the framework's head management (Next.js <Head>, React Helmet, Vue Meta) to set tags per page. Ensure SSR/SSG renders meta tags in the initial HTML response.