You audit a website's technical SEO and GEO (Generative Engine Optimization — being found, cited, and recommended by AI assistants), report concrete problems ranked by impact, and apply fixes. This is an actionable harness, not just advice: two zero-dependency Node scripts do the measuring, the reference files tell you exactly what to fix and why.
The rules here are distilled from a production site whose build fails if any gate is violated — that discipline is why it scores high. Treat the gates as hard constraints, not suggestions.
scripts/audit-seo.mjs — on-disk auditor. Runs the 12 hard-gate checks over a directory of built HTML + its local CSS/JS/images. Framework-agnostic. Node ≥18, no install.scripts/audit-live.mjs — live-URL auditor. Checks the things only visible on a deployed origin: robots.txt policy (incl. per-AI-bot allow/deny), sitemap.xml, llms.txt, homepage JSON-LD (@graph-aware), canonical, HSTS / Vary / Cache-Control.references/hard-gates.md — the 12 gates: exact thresholds, the general rule, and the Astro+Cloudflare reference implementation.references/structured-data.md — copy-paste JSON-LD recipes (Organization, WebSite, Breadcrumb, Article, Product, FAQ) using the nested @graph pattern.references/geo-ai-visibility.md — the GEO layer: robots AI-crawler allowlist (exact user-agents), llms.txt format, AI-oriented schema, IndexNow.references/lcp-playbook.md — Core Web Vitals deep-dive: the measured levers that took the reference site from 7.5 s → ~1.5 s mobile LCP (render-blocking CSS, critical-CSS split, font discipline, deferring non-LCP DOM, third-party JS, CLS guardrails, CI lock-in). Use when the problem is speed, not markup.SEO lives in the rendered HTML. Find the build dir: Astro dist/, Next out/ (or .next after next export), Hugo public/, Jekyll _site/, Vite dist/, or a plain folder. If it doesn't exist yet, run the project's build first. Confirm with the user if ambiguous.
node scripts/audit-seo.mjs --dir <build-dir>
# options: --strict (warns→errors, CI mode) · --json · --max-page-kb 500 · --max-img-kb 500
Read the output: ✗ = ERROR (genuinely hurts ranking / breaks crawlers / Core Web Vitals — fix these first), ⚠ = WARN (best-practice miss). The heuristic score is a rough dial, not a Lighthouse number.
node scripts/audit-live.mjs https://www.example.com
This is where GEO shows up: which AI crawlers are allowed/blocked, whether llms.txt exists, what JSON-LD @types the homepage actually ships.
references/ for the exact target value and the reference implementation, then edit the source (templates/layout/config) — not the built HTML (it's regenerated).audit-seo.mjs --strict into the build so regressions fail the pipeline. per page.width=device-width, initial-scale=1. + + present. present (≈10–60 chars) + meta description present (≈50–160 chars). Length is a soft warn — longer is a valid deliberate GEO choice., host matches the deploy origin (build-time, never runtime).og:title + og:image.![]()
has width+height+alt; non-hero loading="lazy"; hero fetchpriority="high"; each file ≤500 KB (WebP/AVIF). (allow only application/ld+json/json/importmap) and no on*= handlers → strict CSP script-src 'self'.GEO layer (references/geo-ai-visibility.md): robots.txt explicitly allows the major AI crawlers, ship llms.txt, enrich Organization schema with knowsAbout, ping IndexNow on deploy.
If the complaint is LCP / PageSpeed performance (gates pass but the site is slow): open references/lcp-playbook.md. Diagnose first — find the actual LCP element (often text, not an image) and measure with DevTools applied throttling, not Lantern/simulated. Then work the levers in impact order: render-blocking CSS → critical-CSS split → font preload discipline → defer non-LCP viewport DOM → eager hero image → third-party JS on idle/interaction → IntersectionObserver-deferred init. Keep CLS at 0 by reserving space for everything you defer, and lock wins in with a Lighthouse CI gate + per-page JS byte budget.
seo-audit is an actionable SEO + GEO auditing harness. Two zero-dependency Node scripts do the measuring; three reference files tell you exactly what to fix and why. It turns the build-time SEO discipline of a production site into a portable, framework-agnostic gate you can run on any site.
| Capability | Description |
|---|---|
| ------------ | ------------- |
| On-disk hard-gate audit | audit-seo.mjs runs 12 hard gates (h1, viewport, landmarks, title/desc, canonical, OG, images, CSP-safe scripts, no external refs, page weight, JSON-LD, URL hygiene) over any built static dir |
| Live-URL GEO audit | audit-live.mjs checks robots.txt AI-crawler policy, sitemap.xml, llms.txt, homepage JSON-LD (@graph-aware), canonical, HSTS/Vary/Cache-Control |
| Fix references | references/ gives exact thresholds, copy-paste JSON-LD recipes, and the AI-crawler allowlist + llms.txt format |
| LCP playbook | references/lcp-playbook.md — measured Core Web Vitals levers (7.5 s → 1.5 s mobile LCP on the reference site) with diagnosis method, impact ranking, CLS guardrails, and CI lock-in |
| CI integration | audit-seo.mjs --strict turns warnings into errors so regressions fail the build |
Does NOT:
audit-live.mjsIn scope (will handle):
references/Out of scope (won't handle):
Behavior on missing input:
audit-seo.mjs with no --dir defaults to dist; if the directory has no HTML it reports zero pages (no crash)audit-live.mjs with no URL prints usage and exits with code 2No credentials required. This skill uses no API keys, tokens, or accounts.
| Action | Credential | Network |
|---|---|---|
| -------- | ----------- | --------- |
audit-seo.mjs --dir | None | None — local filesystem read only |
audit-live.mjs | None | Outbound HTTPS to the URL you pass (and its robots.txt/sitemap/llms.txt) |
No hardcoded secrets exist anywhere in the scripts.
Writes: nothing by default. Both scripts print reports to stdout; --json still prints to stdout. Output is persisted only where you redirect it (e.g. > report.json).
Does NOT write:
Privilege: runs as the current user, no sudo or elevated permission. Requires only Node ≥18 (global fetch).
Uninstall: delete the skill directory — there is no other state to clean up.
clawhub install seo-audit
cp -r /path/to/seo-audit ~/.claude/skills/seo-audit/
node scripts/audit-seo.mjs --help 2>/dev/null || node scripts/audit-seo.mjs --dir . --json | head
node scripts/audit-live.mjs # should print usage and exit 2
Both scripts are zero-dependency (Node ≥18). No npm install step is needed.
Version: 1.1.0 · Created: 2026-06-09 · Updated: 2026-06-10 · Changes: see CHANGELOG.md
共 2 个版本