$npx -y skills add Hainrixz/claude-seo-ai --skill seo-crawl-renderFetch a page (or local files) and build the shared PageSnapshot every audit module reads — raw HTML, rendered DOM when a render MCP is available, response headers, status/redirect chain, and site artifacts (robots.txt, sitemaps, llms.txt). Decides whether JavaScript rendering is
| 1 | # seo-crawl-render |
| 2 | |
| 3 | Produces ONE `PageSnapshot` consumed by all other skills. Building it once is what makes the offline (Tier 0) audit possible. |
| 4 | |
| 5 | ## PageSnapshot shape |
| 6 | ``` |
| 7 | { |
| 8 | target: { kind: "url"|"path", value }, |
| 9 | status_chain: [ {url, status, location?} ], // redirects, final status |
| 10 | headers: { ... }, // final response headers (incl. X-Robots-Tag, content-type, hreflang Link) |
| 11 | raw_html: "...", // pre-JS HTML the crawler/AI sees first |
| 12 | rendered_dom: "..."|null, // post-JS DOM (null if no render available) |
| 13 | render: { needed: bool, used: "webfetch"|"playwright"|"firecrawl"|"none", confidence: "high"|"reduced" }, |
| 14 | artifacts: { robots_txt: "..."|null, sitemaps: [...], llms_txt: "..."|null }, |
| 15 | tier: 0|1|2 |
| 16 | } |
| 17 | ``` |
| 18 | |
| 19 | ## Acquisition |
| 20 | 1. **Local path**: read files directly (`Read`/`Glob`); treat built HTML as `raw_html`. For framework source (Next/Nuxt/etc.), note the framework and that rendered output may differ from source. |
| 21 | 2. **URL**: fetch with `WebFetch` (HTTPS-upgrade; if it returns a cross-host redirect, re-fetch the target). Capture status chain and headers. Fetch `robots.txt`, referenced sitemap(s), and `/llms.txt`. |
| 22 | |
| 23 | ## Render decision |
| 24 | - `--render static` → never render. `--render js` → always try to render. |
| 25 | - `--render auto` (default): flag CSR when the raw HTML body is near-empty, has hydration markers (`__NEXT_DATA__`, `window.__NUXT__`, `data-reactroot`, a single root `<div id="app">`), or primary content/headings/links/JSON-LD are absent from `raw_html`. |
| 26 | - If rendering is needed AND a render MCP is available (Playwright/Firecrawl — discover via tool search), get the `rendered_dom`; set `render.confidence = high`. |
| 27 | - If needed but no render MCP: keep `rendered_dom = null`, set `render.confidence = reduced`, and emit an M4 finding: "CSR-only; audited from raw HTML; install a Playwright/Firecrawl MCP for full coverage." Never pretend you saw rendered content you didn't. |
| 28 | |
| 29 | ## Tier |
| 30 | Set `tier = 0` (WebFetch only), `1` (render MCP and/or PageSpeed available), `2` (Search Console / Merchant available). Downstream skills annotate findings `needs_api` when they require a higher tier than reached. |