--- id: softspark/ai-toolkit/seo-validate version: "0f350ff0" license: Apache-2.0 install: manual updated: 2026-07-27 --- # seo-validate — seo-validate scans your project for common SEO pitfalls, from malformed HTML and missing metadata to broken schema markup and performance bottlenecks. It integrates with your AI coding agent to flag issues in real time, helping you maintain search-friendly code standards throughout development. Publisher: softspark · Stars: 161 · Updated: 2026-07-27 Install (manual): `git clone https://github.com/softspark/ai-toolkit` ## SKILL.md # /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:** - `full` (default) — all 10 categories - `technical` — HTML semantics, hreflang, CWV, rendering, technical SEO (categories 1, 4, 5, 7, 8) - `content` — meta/OG, structured data, GEO, a11y-for-SEO (categories 2, 3, 6, 9) - `performance` — only CWV static signals (category 5) - `geo` — only GEO / citability checks (category 6) - `rendering` — only category 7 (SPA/CSR/SSG crawlability) — useful for migration audits - `topical` — only topical authority and cluster architecture (category 10) **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. **Scan the codebase** using `Grep`/`Glob`/`Read` against framework-aware patterns for each category in scope. 3. **Interpret findings** with specific fix suggestions tied to the detected framework. 4. **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 | 2. **Read config files** to refine: - `next.config.*` — check `output: 'export'` (forces SSG), `images`, i18n settings. - `nuxt.config.*` — check `ssr: false`, `generate` blocks (SSG export). - `astro.config.*` — check `output: 'server'|'static'|'hybrid'` and `prerender` directives. - `gatsby-config.*` — plugin list (`gatsby-plugin-react-helmet`, `gatsby-plugin-sitemap`). - `svelte.config.*` — adapter choice (`static`, `node`, `vercel`). - `vite.config.*` + `package.json` scripts — look for `vite-plugin-ssr`, `vite-plugin-prerender`. - `angular.json` — look for SSR builder config. 3. **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 (`
`). 4. **Override precedence**: `--framework` and `--rendering` flags override detection. Report the detected framework and rendering mode in the Summary table. ### Step 2: Run Category Scans For each category in `--scope`, apply the pattern set below using `Grep` (for regex across files) and `Read` (for config parsing / ordered checks). Patterns are framework-aware — use the framework detected in Step 1 to select the right rule set. ### Step 3: 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 `` to ``"). 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 4: Report Present findings sorted by severity (HIGH → WARN → INFO), then by file path. --- ## Scanner Reference ### Category 1: HTML Semantics & W3C Scan HTML/JSX/Vue/Svelte/Astro templates for W3C HTML5 compliance. | Pattern | Severity | Confidence | Description | |---------|----------|------------|-------------| | `` without `lang` attribute | HIGH | definitive | HTML5 §3.2.6 — `lang` required for SEO + a11y | | Missing `` in `` | HIGH | definitive | HTML5 §4.2.5.5 — required first | | Missing `` | HIGH | definitive | Mobile-first indexing requires viewport | | Multiple `