Seo validate

From softspark/ai-toolkit · View interactive version

Seo validate is an AI agent skill from the GitHub repository softspark/ai-toolkit. SEO validator: meta/OG, Schema.org, hreflang, Core Web Vitals, crawlability. Triggers: SEO, meta tags, Schema.org, hreflang, LCP, INP, CLS, Core Web Vitals, sitemap, crawlability.

How to use this skill

Skill file

/seo-validate — SEO Validation Scanner

$ARGUMENTS

Scan a codebase for SEO issues using pattern-matching heuristics. Detects W3C/HTML violations, meta tag gaps, structured data problems, hreflang errors, Core Web Vitals risks (LCP/INP/CLS), resource-hint misuse, above-the-fold anti-patterns, GEO gaps (chunk architecture, hedging language, decision frameworks, semantic triples, freshness), topical authority gaps (pillar/cluster structure, orphan pages, cannibalization), SPA/CSR/SSG crawlability problems, technical SEO misconfigurations, and accessibility-for-SEO issues. Read-only — never modifies files.

Standards basis: W3C HTML5 Recommendation, W3C WCAG 2.2, Schema.org vocabulary, IETF RFC 5646 (BCP 47 language tags) for hreflang, web.dev Core Web Vitals thresholds (LCP <2.5s, INP <200ms, CLS <0.1), Google Search Central crawlability guidelines, and emerging GEO (Generative Engine Optimization) practices.

Usage

/seo-validate                                # Scan full project, auto-detect framework
/seo-validate src/                           # Scan specific path
/seo-validate --scope rendering              # Only SPA/CSR/SSG crawlability checks
/seo-validate --scope performance            # Only Core Web Vitals static signals
/seo-validate --scope geo                    # Only GEO (Generative Engine Optimization)
/seo-validate --scope topical               # Only topical authority and cluster architecture
/seo-validate --severity high                # Filter to HIGH findings only
/seo-validate --framework next               # Force framework (skip auto-detection)
/seo-validate --rendering csr                # Force rendering-mode interpretation
/seo-validate --output json                  # Structured JSON output for CI integration

Scopes:

Severity filtering: --severity high shows only HIGH, --severity warn shows HIGH+WARN, --severity info shows all. Default: all.

What This Command Does

  1. Detect framework and rendering mode from package.json, config files, and entry HTML.
  2. Run the scanner script for a deterministic baseline over 8 of the 10 categories.
  3. Extend the scan by hand using Grep/Glob/Read against framework-aware patterns for everything the script does not cover.
  4. Interpret findings with specific fix suggestions tied to the detected framework.
  5. Report findings with file paths, line numbers, severity, confidence, and standards citations.

Steps

Step 1: Detect Framework & Rendering Mode

Run detection before scanning so category patterns can adapt. Detection order:

  1. Read package.json (if present) and inspect dependencies + devDependencies:

| Deps contain | Framework | Default rendering |

|--------------|-----------|-------------------|

| next | next | hybrid (per-route) |

| nuxt | nuxt | ssr |

| astro | astro | ssg |

| gatsby | gatsby | ssg |

| @sveltejs/kit | sveltekit | hybrid |

| @remix-run/* | remix | ssr |

| @angular/core + @angular/ssr or @nguniversal/* | angular | ssr |

| @angular/core alone | angular | csr (flag as SPA) |

| vue + nuxt | see nuxt row | — |

| vue without nuxt | vue | csr (flag as SPA) |

| react + vite without Next/Remix | vite-spa | csr (flag as SPA) |

| react-scripts | cra | csr (flag as SPA) |

| no package.json OR no framework deps | static | static |

  1. Read config files to refine:
  1. Read entry HTML (public/index.html, index.html, app/layout.tsx, src/app.html, etc.) to confirm whether meaningful content is prerendered or only a mount point (<div id="root"></div>).
  1. Override precedence: --framework and --rendering flags override detection.

Report the detected framework and rendering mode in the Summary table.

Step 2: Run the Scanner Script

python3 ${CLAUDE_SKILL_DIR}/scripts/seo-scanner.py [path] [--output json|text]

Deterministic checks over meta tags, heading order, image alt, JSON-LD, hreflang,

robots.txt, sitemap, Core Web Vitals signals and llms.txt. No framework

awareness — it reads files, not build config. Categories 7 and 10 are not touched.

Step 3: Extend the Scan by Hand

Read reference/scanner-categories.md in full,

then work every category in --scope with Grep (regex across files) and Read

(config parsing / ordered checks), skipping only what Step 2 already reported.

Patterns are framework-aware — use the framework detected in Step 1 to select the

right rule set.

Categories 7 (Rendering Mode & Crawlability) and 10 (Topical Authority) get no help

from the script. Run them in full or say in the report that you did not.

Step 4: Interpret and Enrich

For each finding:

  1. Read the flagged file/lines to confirm the match is real (not a comment, not a type-only reference).
  2. Add a specific fix tied to the framework (e.g., "use next/image with priority prop" vs. "add <link rel="preload" as="image"> to <head>").
  3. Mark confidence: definitive for regex matches against known-bad patterns, heuristic for co-occurrence / absence checks.
  4. Skip false positives when context shows the concern is addressed elsewhere (e.g., meta tags set in a layout file the route inherits from).

Step 5: Report

Present findings sorted by severity (HIGH → WARN → INFO), then by file path.

State which findings came from the script and which from the manual pass, and name

any category you did not complete.


Scanner Reference

scripts/seo-scanner.py gives a deterministic baseline over 8 of the 10 categories.

The full pattern tables, per-framework rules and standards citations live in

reference/scanner-categories.md.

| # | Category | Covered by the script | Manual pass |

|---|----------|----------------------|-------------|

| 1 | HTML Semantics & W3C | heading order | rest of the category |

| 2 | Meta & Open Graph | title, description, OG/Twitter tags | rest of the category |

| 3 | Structured Data / Schema.org | JSON-LD presence and shape | rest of the category |

| 4 | Hreflang & i18n | hreflang pairs, x-default | rest of the category |

| 5 | Core Web Vitals (static signals) | LCP/CLS/INP signal patterns | rest of the category |

| 6 | GEO (Generative Engine Optimization) | llms.txt presence | rest of the category |

| 7 | Rendering Mode & SPA/CSR/SSG Crawlability | nothing | the whole category |

| 8 | Technical SEO | robots.txt, sitemap | rest of the category |

| 9 | Accessibility for SEO | image alt | rest of the category |

| 10 | Topical Authority & Cluster Architecture | nothing | the whole category |

Categories 7 and 10 have no script coverage at all — they are entirely manual, and

skipping them is the most likely way this skill under-reports.

Output Format

## SEO Validation Report

### Summary
| Metric | Value |
|--------|-------|
| Scope | full / technical / content / performance / geo / rendering / topical |
| Framework detected | next / nuxt / astro / gatsby / sveltekit / remix / angular / vue / react-spa / vite-spa / cra / static |
| Rendering mode | csr / ssr / ssg / isr / hybrid |
| Files scanned | N |
| Public routes found | N |
| Routes with prerendering | N of N |
| Findings: HIGH | N |
| Findings: WARN | N |
| Findings: INFO | N |

### Findings

#### [HIGH] app/layout.tsx:12
Category: HTML Semantics & W3C
Confidence: definitive
Pattern: `<html>` element missing `lang` attribute
W3C Rule: HTML5 §3.2.6
Fix: Add `lang="en"` (or appropriate BCP 47 code) to the `<html>` element.
See: reference/w3c-guidelines.md#lang-attribute

#### [HIGH] components/HomeHero.tsx:24
Category: Core Web Vitals (LCP)
Confidence: definitive
Pattern: Above-the-fold `<img>` with `loading="lazy"`
Rule: LCP anti-pattern — lazy loading the LCP element delays it
Fix: Remove `loading="lazy"`, add `fetchpriority="high"`. For Next.js use `<Image priority />`.
See: reference/core-web-vitals.md#above-the-fold

#### [HIGH] src/App.tsx:1
Category: Rendering Mode & SPA Crawlability
Confidence: definitive
Pattern: CSR-only React app (Vite) with no prerender plugin
Rule: Content-site SPAs without SSR/SSG are invisible to most crawlers
Fix: Add `vite-plugin-ssr` or migrate to Next.js/Remix; OR add `react-snap` for build-time prerender.
See: reference/spa-ssg-patterns.md#react-spa-migration

Confidence values:

Exit codes (when --output json):

Rules

Gotchas

When NOT to Use

Reference Documents

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.