Skip to content

Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Google APIs, and PDF/Excel reporting. 9 optional extensions for live SEO data.

release: v2.2.5 - reliability and Google currency

Agrici Daniel2384fdd94296
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 1391f28..00efd77 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -5,13 +5,13 @@
"name": "AgriciDaniel"
},
"metadata": {
- "description": "Comprehensive SEO analysis plugin for Claude Code. 25 sub-skills and 18 sub-agents, plus 8 optional MCP extensions (DataForSEO, Firecrawl, Banana, Ahrefs, SE Ranking, Profound, Bing Webmaster, Unlighthouse). v2.2.4 adds a managed cross-platform runtime and safe sitemap discovery, and repairs GSC pagination, Bing endpoints, extension paths, Windows portability, SPA rendering, and JSON-LD extraction."
+ "description": "Comprehensive SEO analysis plugin for Claude Code. 25 sub-skills and 18 sub-agents, plus 8 optional MCP extensions (DataForSEO, Firecrawl, Banana, Ahrefs, SE Ranking, Profound, Bing Webmaster, Unlighthouse). v2.2.5 hardens installation, schema validation, rendered-page and accessibility analysis, runtime portability, and current Google Search guidance."
},
"plugins": [
{
"name": "claude-seo",
"source": "./",
- "description": "Comprehensive SEO analysis plugin for Claude Code. 25 sub-skills and 18 sub-agents, plus 8 optional MCP extensions. v2.2.4 adds a managed cross-platform runtime and safe sitemap discovery, and repairs GSC pagination, Bing endpoints, extension paths, Windows portability, SPA rendering, JSON-LD extraction, and DataForSEO permissions.",
+ "description": "Comprehensive SEO analysis plugin for Claude Code. 25 sub-skills and 18 sub-agents, plus 8 optional MCP extensions. v2.2.5 hardens installation, schema validation, rendered-page and accessibility analysis, runtime portability, and current Google Search guidance.",
"author": {
"name": "AgriciDaniel",
"url": "https://github.com/AgriciDaniel"
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 34f4e59..2fb7f92 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "claude-seo",
- "version": "2.2.4",
+ "version": "2.2.5",
"description": "Comprehensive SEO analysis plugin for Claude Code. 25 sub-skills (21 core + 1 orchestrator + 1 framework + 2 extension mirrors) and 18 sub-agents cover technical SEO, content quality, schema, sitemaps, Core Web Vitals, local SEO, backlinks, AI/GEO, ecommerce, hreflang, SXO, clustering, drift monitoring, and Google APIs. Includes optional MCP extensions, SPA-aware rendering, portability, and hardened SSRF/DNS-rebinding safe fetchers.",
"author": {
"name": "AgriciDaniel",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe1f226..0ac668f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2.2.5] - 2026-08-25
+
+### Added
+
+- Focused regression coverage for manual-install data packaging, runtime imports,
+ JSON-LD graph validation, empty rendered pages, accessibility-tree capture,
+ JSON output bounds, and managed-runtime command references.
+- Strict Google update-ledger validation for chronological order, known event
+ kinds, exact approved hostnames, unique names, and verification dates.
+
+### Changed
+
+- Refreshed Google Search guidance through 2026-08-25 using Google-owned sources,
+ including the August spam update, Preferred Sources, Search Console platform
+ properties, review transparency, merchant schema, canonical timing, and AMP.
+- Updated Lighthouse guidance to 13.4.1, including PSI API support for Agentic
+ Browsing and the Node.js 22.19 minimum for the CLI.
+- JSON render output now preserves full content by default and supports explicit,
+ measured text bounds through `--max-text`.
+
+### Fixed
+
+- Manual installs now include the update ledger, and runtime setup validates the
+ split `lxml_html_clean` dependency required by current lxml releases.
+- JSON-LD hooks now traverse top-level graphs, reject malformed graph members,
+ handle non-UTF-8 input safely, and avoid ordinary-language placeholder false
+ positives.
+- Agent-UX reports now fail closed on empty rendered documents, capture Chromium's
+ accessibility tree through CDP, and expose partial or failed capture states.
+- User-facing guidance now routes bundled Python modules through `claude-seo run`.
+
## [2.2.4] - 2026-07-20
Community maintenance release following a full review of every open issue and pull request.
diff --git a/CITATION.cff b/CITATION.cff
index f3e3643..92c2d5b 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -11,8 +11,8 @@ authors:
repository-code: 'https://github.com/AgriciDaniel/claude-seo'
url: 'https://github.com/AgriciDaniel/claude-seo'
license: MIT
-version: 2.2.4
-date-released: '2026-07-20'
+version: 2.2.5
+date-released: '2026-08-25'
keywords:
- seo
- claude-code
diff --git a/CLAUDE.md b/CLAUDE.md
index 7109749..5423fa5 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -21,7 +21,7 @@ claude-seo/
CONTRIBUTORS.md # Community credits (Pro Hub Challenge)
AGENTS.md # Multi-platform agent instructions (Cursor, Antigravity)
.claude-plugin/
- plugin.json # Plugin manifest (v2.2.4)
+ plugin.json # Plugin manifest (v2.2.5)
marketplace.json # Marketplace catalog for distribution
skills/ # 25 sub-skills (auto-discovered)
seo/ # Main orchestrator skill
@@ -272,8 +272,9 @@ Promoting to public on release:
- **`aimh` accepts day-to-day pushes.** No release-gate ceremony required
for the private remote.
- **Tags push to private first.** Historical pre-release illustration: v2.0.0
- once lived on `aimh` before `origin`. Current released tags through v2.2.4
- are on both remotes.
+ once lived on `aimh` before `origin`. Before the authorized v2.2.5 release,
+ released tags through v2.2.4 are on both remotes. Verify v2.2.5 on both
+ remotes after publication.
- **History stays shared.** Never rewrite history on either remote with
force-push unless explicitly authorized for that specific operation.
diff --git a/README.md b/README.md
index 724cf4f..d3f0a0c 100644
--- a/README.md
+++ b/README.md
@@ -337,6 +337,7 @@ Test coverage grew from 39 (v1.9.9) to 410 across the v2 line; the url_safety su
- **v2.2.2 (July 2026): full-review maintenance.** Corrected GBP Q&A handling, AI Mode model naming, image-model IDs, hook input behavior, and added a strict reference-graph consistency gate.
- **v2.2.3 (July 2026): prompt-hygiene alignment.** Normalized emphasis and punctuation across the prompt surface without changing behavior, routing, or output contracts.
- **v2.2.4 (July 2026): community maintenance.** Added the managed cross-platform runtime and safe sitemap discovery, repaired GSC pagination and totals, replaced removed Bing endpoints, fixed extension and Windows portability gaps, and reconciled every open issue and pull request.
+- **v2.2.5 (August 2026): reliability and Google-currency hardening.** Fixed manual-install data packaging and lxml runtime imports, hardened JSON-LD graphs and rendered-page accessibility analysis, enforced managed-runtime command references, and refreshed Google Search and Lighthouse guidance through August 25.
## Limitations
diff --git a/agents/seo-backlinks.md b/agents/seo-backlinks.md
index 6980113..cb44c4d 100644
--- a/agents/seo-backlinks.md
+++ b/agents/seo-backlinks.md
@@ -112,7 +112,7 @@ If any check fails, fix the report before returning it.
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes full `raw_content`, `content`, `extracted_text`, `is_spa`, and `publication_date`; use `--max-text` only when explicit bounded output is needed. SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
Backlink verification (`/seo backlinks verify`) primarily reads outbound `<a>` tags, which are reliably present in raw HTML. `--mode never` is the right choice for speed on bulk verification jobs.
diff --git a/agents/seo-content.md b/agents/seo-content.md
index af02755..38cf18e 100644
--- a/agents/seo-content.md
+++ b/agents/seo-content.md
@@ -67,7 +67,7 @@ Provide:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes summary fields including `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate); use `--output` or import `render_page.render_page()` when full raw/rendered HTML is required. SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `is_spa`, complete `extracted_text`, and `publication_date`; use `--output rendered.html` for the full HTML. SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
## Persistence Contract
diff --git a/agents/seo-drift.md b/agents/seo-drift.md
index 1a762e0..431d6d5 100644
--- a/agents/seo-drift.md
+++ b/agents/seo-drift.md
@@ -23,7 +23,7 @@ All page fetching goes through the project's existing scripts with SSRF protecti
- `claude-seo run drift_report.py <file> --output report.html` -- generate HTML report
Never use curl, wget, or raw HTTP requests. All fetching is handled by
-`scripts/fetch_page.py` internally, which validates URLs against private/loopback
+the bundled `fetch_page.py` module internally, which validates URLs against private/loopback
IP ranges.
## Workflow
diff --git a/agents/seo-ecommerce.md b/agents/seo-ecommerce.md
index 8ab6123..4b59afb 100644
--- a/agents/seo-ecommerce.md
+++ b/agents/seo-ecommerce.md
@@ -18,10 +18,10 @@ When delegated tasks during an SEO audit or analysis:
1. Detect e-commerce signals: product schema, price elements, add-to-cart buttons,
shopping cart, product grids, Shopify/WooCommerce/Magento markers
-2. Analyze product pages using `scripts/render_page.py --mode auto` and `scripts/parse_html.py`
+2. Analyze product pages with `claude-seo run render_page.py <URL> --mode auto` and `claude-seo run parse_html.py <URL>`
3. Validate Product schema against Google's required and recommended fields
4. If DataForSEO credentials available, fetch marketplace data via
- `scripts/dataforseo_merchant.py`
+ `claude-seo run dataforseo_merchant.py`
## Cost Guardrails
@@ -65,7 +65,7 @@ Match existing claude-seo patterns:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
E-commerce sites overwhelmingly inject product schema client-side (Shopify, Magento PWA, headless commerce on Next.js). Prefer `--mode always` for product page audits and compare `raw_content` vs `content` to confirm whether the JSON-LD is server-rendered.
diff --git a/agents/seo-geo.md b/agents/seo-geo.md
index 39bdeb7..4b87a99 100644
--- a/agents/seo-geo.md
+++ b/agents/seo-geo.md
@@ -65,7 +65,7 @@ Provide a structured report with:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes full `raw_content`, `content`, `extracted_text`, `is_spa`, and `publication_date`; use `--max-text` only when explicit bounded output is needed. SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
AI citation analysis benefits from the `extracted_text` field, passage-level scoring should run against trafilatura's boilerplate-stripped output, not the full HTML, so navigation chrome and footers don't dilute the signal.
diff --git a/agents/seo-google.md b/agents/seo-google.md
index e27afa3..38d9891 100644
--- a/agents/seo-google.md
+++ b/agents/seo-google.md
@@ -68,7 +68,7 @@ Before presenting: verify `"review": {"status": "PASS"}` in the JSON output.
If `output_dir` is provided by the audit orchestrator, write:
- `output_dir/findings/google.md`: PSI, CrUX, GSC, URL Inspection, GA4, and credential-tier findings
- Structured JSON-compatible findings for `audit-data.json` under the Google SEO Data category
-- Generated PDF/HTML/XLSX reports under `output_dir/` by passing `--output-dir "$output_dir"` to `scripts/google_report.py`
+- Generated PDF/HTML/XLSX reports under `output_dir/` with `claude-seo run google_report.py --output-dir "$output_dir"`
## Error Handling
diff --git a/agents/seo-local.md b/agents/seo-local.md
index 3b8a9bf..5514a4d 100644
--- a/agents/seo-local.md
+++ b/agents/seo-local.md
@@ -79,7 +79,7 @@ Provide a structured report with:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes full `raw_content`, `content`, `extracted_text`, `is_spa`, and `publication_date`; use `--max-text` only when explicit bounded output is needed. SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
Map embeds, GBP widgets, and review carousels are commonly injected client-side. When auditing local pages on JS-heavy sites prefer `--mode always` so the audit reflects what users (and Google's crawler) actually see post-render.
diff --git a/agents/seo-performance.md b/agents/seo-performance.md
index c30f996..82d729e 100644
--- a/agents/seo-performance.md
+++ b/agents/seo-performance.md
@@ -55,9 +55,9 @@ Google evaluates the **75th percentile** of page visits, 75% of visits must meet
## Performance Tooling (2025-2026)
-**Lighthouse 13.4.0** (June 2026, latest stable): Lighthouse 13.0 (Oct 2025) migrated performance audits to **insight-based audits** aligned with the DevTools Performance panel and removed legacy audits (first-meaningful-paint, font-size, third-party-facades), note the performance *score* is metric-based and was NOT re-weighted. 13.2.0-13.3.0 added and default-enabled a new **Agentic Browsing** category (Chrome 150+; fractional pass-ratio, not 0-100, see `skills/seo-technical/references/agent-friendly-pages.md`); 13.4.0 disabled that category in the PSI REST API. Use Lighthouse as a lab diagnostic: always validate against CrUX field data.
+**Lighthouse 13.4.1** (July 2026, latest stable): Lighthouse 13.0 (Oct 2025) migrated performance audits to **insight-based audits** aligned with the DevTools Performance panel and removed legacy audits (first-meaningful-paint, font-size, third-party-facades), note the performance *score* is metric-based and was NOT re-weighted. 13.2.0-13.3.0 added and default-enabled a new **Agentic Browsing** category (Chrome 150+; fractional pass-ratio, not 0-100, see `skills/seo-technical/references/agent-friendly-pages.md`). Version 13.4.1 enabled that category through the PSI API and requires Node.js 22.19 or newer for the CLI. Use Lighthouse as a lab diagnostic: always validate against CrUX field data.
-**PageSpeed Insights / PSI API v5** run Lighthouse 13.x (updated 2025-10-20). The **PWA category was removed in Lighthouse 12**, do not expect or parse a `pwa` category. The agentic-browsing category is **not** returned by the PSI REST API (only the PSI web UI / CLI expose it).
+**PageSpeed Insights / PSI API v5** run Lighthouse 13.x. The **PWA category was removed in Lighthouse 12**, do not expect or parse a `pwa` category. Lighthouse 13.4.1 enabled the agentic-browsing category through the PSI API.
**CrUX Vis** replaced the CrUX Dashboard (Looker Studio), which was shut down at end of November 2025 (October 2025 was its final dataset). Use [CrUX Vis](https://cruxvis.withgoogle.com) or the CrUX API directly.
diff --git a/agents/seo-schema.md b/agents/seo-schema.md
index c5909aa..3bf5551 100644
--- a/agents/seo-schema.md
+++ b/agents/seo-schema.md
@@ -68,7 +68,7 @@ Provide:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes summary fields including `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate); use `--output` or import `render_page.render_page()` when full raw/rendered HTML is required. SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `is_spa`, complete `extracted_text`, and `publication_date`; use `--output rendered.html` for the full HTML. SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
Use the JSON response's `structured_data` summary for routine JSON-LD detection. It is extracted from the full HTML before the HTML fields are truncated, but emits only bounded validity, size, and type metadata. When full blocks are necessary for validation, pass `--json-ld-output <path>` and read the bounded UTF-8 JSON artifact. Never copy unbounded page markup into an agent prompt.
diff --git a/agents/seo-sxo.md b/agents/seo-sxo.md
index e40e1db..2fb30cc 100644
--- a/agents/seo-sxo.md
+++ b/agents/seo-sxo.md
@@ -85,7 +85,7 @@ Score the target page across 7 dimensions (100 points total):
## Pre-Delivery Checklist
Before presenting results, verify:
-- [ ] URL was fetched via scripts/render_page.py --mode auto (not raw curl)
+- [ ] URL was fetched via `claude-seo run render_page.py --mode auto` (not raw curl)
- [ ] At least 5 SERP results were analyzed
- [ ] Page type classification uses the taxonomy reference
- [ ] User stories cite specific SERP signals
@@ -95,7 +95,7 @@ Before presenting results, verify:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `raw_content` (pre-JS), `content` (post-JS), `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate). SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
Search experience scoring needs the *rendered* DOM because users see what JS produces. Prefer `--mode always` so above-the-fold analysis matches what the persona actually encounters.
diff --git a/agents/seo-technical.md b/agents/seo-technical.md
index d88fd8b..29cfe13 100644
--- a/agents/seo-technical.md
+++ b/agents/seo-technical.md
@@ -55,7 +55,7 @@ Provide a structured report with:
## Fetching pages (v2.0.0)
-Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes summary fields including `is_spa`, `extracted_text` (boilerplate-stripped via trafilatura), and `publication_date` (htmldate); use `--output` or import `render_page.render_page()` when full raw/rendered HTML is required. SSRF and DNS-rebinding protection live in `scripts/url_safety.py`, never call `requests.get` directly on user-supplied URLs.
+Use `claude-seo run render_page.py <URL> --mode auto --json` for page HTML. `auto` does a raw fetch and only spins up Playwright when an SPA shell is detected; use `--mode always` to force a render or `--mode never` to skip Playwright entirely. The JSON exposes `is_spa`, complete `extracted_text`, and `publication_date`; use `--output rendered.html` for the full HTML. SSRF and DNS-rebinding protection live in the bundled `url_safety.py` module, never call `requests.get` directly on user-supplied URLs.
## Persistence Contract
diff --git a/agents/seo-visual.md b/agents/seo-visual.md
index f17ca31..4996f2e 100644
--- a/agents/seo-visual.md
+++ b/agents/seo-visual.md
@@ -26,7 +26,7 @@ pip install playwright && playwright install chromium
## Screenshot Script
-Use the screenshot script (`scripts/capture_screenshot.py` in the plugin root) for browser automation:
+Use the managed screenshot and renderer commands for browser automation:
```bash
claude-seo run capture_screenshot.py URL --all --output screenshots/
diff --git a/data/google-updates.json b/data/google-updates.json
index 99a8aeb..e2caede 100644
--- a/data/google-updates.json
+++ b/data/google-updates.json
@@ -6,14 +6,14 @@
"https://developers.google.com/search/updates",
"https://blog.google/products/search/"
],
- "last_verified": "2026-07-02",
+ "last_verified": "2026-08-25",
"policy": "Every entry must cite a Google-owned URL. Third-party-only claims belong in unverified[]. Bump last_verified each time an entry is added or revised.",
"_schema_doc": {
"updates[]": {
"date": "ISO date YYYY-MM-DD (Google's announcement date).",
"name": "Short human-readable title.",
- "kind": "One of: core | spam | core+spam | policy | qrg | product | schema | cwv.",
- "source": "Required. Must resolve to a Google-owned domain (developers.google.com, web.dev, chrome.com, blog.google, support.google.com).",
+ "kind": "One of: core | spam | core+spam | policy | qrg | product | schema | cwv | discover | documentation.",
+ "source": "Required. Must use HTTPS and an approved Google-owned hostname listed by the tests.",
"notes": "Optional. One-line summary of practitioner impact."
},
"unverified[]": {
@@ -44,7 +44,7 @@
"name": "Site reputation abuse enforcement begins",
"kind": "policy",
"source": "https://developers.google.com/search/blog/2024/03/core-update-spam-policies",
- "notes": "Manual actions phase begins. First wave hits Forbes Advisor, CNN Underscored, WSJ Buy Side."
+ "notes": "Google began enforcement of the site reputation abuse policy on May 5, 2024."
},
{
"date": "2024-06-20",
@@ -58,7 +58,7 @@
"name": "August 2024 Core Update",
"kind": "core",
"source": "https://developers.google.com/search/blog/2024/08/august-2024-core-update",
- "notes": "Google: 'designed to surface more useful content'. Partial Helpful Content recoveries reported."
+ "notes": "Google described the update as designed to surface more useful content from small and independent publishers."
},
{
"date": "2024-11-11",
@@ -72,7 +72,7 @@
"name": "Site Reputation Abuse policy clarified",
"kind": "policy",
"source": "https://developers.google.com/search/blog/2024/11/site-reputation-abuse",
- "notes": "No amount of first-party involvement changes the third-party nature. Section-level removals (CNN Underscored /reviews, Forbes /health) within hours."
+ "notes": "Google clarified that first-party involvement alone does not change the third-party nature of content when evaluating site reputation abuse."
},
{
"date": "2024-12-12",
@@ -128,7 +128,7 @@
"name": "June 2025 Core Update",
"kind": "core",
"source": "https://status.search.google.com/products/rGHU1u87FJnkP6W2GwMi/history",
- "notes": "16-day rollout. Some Sep 2023 HCU partial recoveries."
+ "notes": "The rollout completed after 16 days."
},
{
"date": "2025-08-21",
@@ -149,7 +149,7 @@
"name": "December 2025 Core Update",
"kind": "core",
"source": "https://status.search.google.com/products/rGHU1u87FJnkP6W2GwMi/history",
- "notes": "18-day rollout. Third core update of 2025. Reported eCommerce skew per Amsive analysis."
+ "notes": "The rollout completed after 18 days and was the third core update of 2025."
},
{
"date": "2026-02-05",
@@ -163,7 +163,7 @@
"name": "March 2026 Spam Update",
"kind": "spam",
"source": "https://status.search.google.com/products/rGHU1u87FJnkP6W2GwMi/history",
- "notes": "Fastest spam update on record — 19h30m rollout (completed under a day), days before the March 2026 core update."
+ "notes": "The rollout completed in under one day, before the March 2026 core update."
},
{
"date": "2026-03-27",
@@ -183,43 +183,43 @@
"date": "2026-05-07",
"name": "FAQ rich results retired",
"kind": "schema",
- "source": "https://developers.google.com/search/docs/appearance/structured-data/faqpage",
- "notes": "FAQ rich results no longer shown for any site (supersedes the Aug 2023 gov/health restriction). Rich Results Test + report support drops Jun 2026; Search Console API support removed Aug 2026. Use QAPage for genuine single-question pages; FAQPage has no Google SERP benefit."
+ "source": "https://developers.google.com/search/updates",
+ "notes": "FAQ rich results stopped appearing in Google Search on May 7, 2026."
},
{
"date": "2026-05-15",
- "name": "Spam policies update (gen-AI scaled content)",
- "kind": "policy",
- "source": "https://developers.google.com/search/docs/essentials/spam-policies",
- "notes": "Scaled content abuse now explicitly names 'using generative AI tools to generate many pages without adding value' (and automated transformations like translating). Expired-domain and site-reputation abuse remain."
- },
- {
- "date": "2026-06-29",
"name": "Generative AI optimization guide",
- "kind": "product",
+ "kind": "documentation",
"source": "https://developers.google.com/search/docs/fundamentals/ai-optimization-guide",
- "notes": "Official optimizing-for-generative-AI-features guidance: gen-AI optimization IS SEO; you do NOT need new AI files/markup/Markdown/chunking/AI-rewrites. Google Search ignores llms.txt."
+ "notes": "Google published guidance that existing SEO fundamentals remain relevant for generative AI features and that no special AI markup or files are required."
+ },
+ {
+ "date": "2026-05-15",
+ "name": "Spam policies apply to generative AI responses",
+ "kind": "policy",
+ "source": "https://developers.google.com/search/updates",
+ "notes": "Google clarified that its spam policies apply to all Google Search surfaces, including generative AI responses."
},
{
"date": "2026-05-19",
"name": "Google I/O 2026: AI Mode updates",
"kind": "product",
"source": "https://blog.google/products-and-platforms/products/search/search-io-2026/",
- "notes": "Google's last official model naming for AI Mode/AI Overviews is a custom version of Gemini 2.5. AI Mode 1B+ monthly users was reported from Google I/O 2026 keynote coverage; not confirmed on a Google-owned source. New intelligent Search box; Information Agents, generative UI, and agentic checkout rolling out summer 2026."
+ "notes": "Google announced an intelligent Search box, Information Agents, generative UI, and agentic checkout capabilities for AI Mode."
},
{
- "date": "2026-05-22",
+ "date": "2026-05-20",
"name": "hasAdultConsideration property added",
"kind": "schema",
- "source": "https://developers.google.com/search/docs/appearance/structured-data/merchant-listing",
- "notes": "Product variant / Merchant listing; required for adult-oriented products; only supported value https://schema.org/SexualContentConsideration."
+ "source": "https://developers.google.com/search/updates",
+ "notes": "Google added hasAdultConsideration to Merchant listing and Product variant documentation for parity with the Merchant Center adult attribute."
},
{
"date": "2026-05-21",
"name": "May 2026 Core Update",
"kind": "core",
"source": "https://status.search.google.com/incidents/wdAXJk6LRRihEjpzEeWE",
- "notes": "Completed June 2, 2026 (~11d21h rollout). Second core update of 2026. Global, all languages. Google: 'a regular update designed to better surface relevant, satisfying content from all types of sites.' Superseded as most-recent by the June 2026 spam update (2026-06-24); still the most recent core update as of 2026-07-02."
+ "notes": "The global, all-language rollout completed on June 2, 2026."
},
{
"date": "2026-06-03",
@@ -240,14 +240,63 @@
"name": "June 2026 Spam Update",
"kind": "spam",
"source": "https://status.search.google.com/products/rGHU1u87FJnkP6W2GwMi/history",
- "notes": "Started June 24, completed June 26 (~2d1h rollout). Normal spam update, all languages and locations. Most recent confirmed ranking update as of 2026-07-02 (dashboard-verified)."
+ "notes": "The global, all-language rollout started June 24 and completed June 26, 2026."
},
{
"date": "2026-06-30",
"name": "Merchant Center video_link serving-eligible",
"kind": "product",
"source": "https://support.google.com/merchants/answer/16989427",
- "notes": "Product video_link attribute becomes serving-eligible; product videos can surface in shopping experiences."
+ "notes": "The Merchant Center video_link attribute became serving-eligible for product videos in shopping experiences."
+ },
+ {
+ "date": "2026-07-01",
+ "name": "AMP links move to publisher hosts",
+ "kind": "documentation",
+ "source": "https://developers.google.com/search/updates",
+ "notes": "Google Search began sending users directly to publisher-hosted AMP URLs and removed obsolete AMP Viewer, AMP Cache, and signed exchange guidance. AMP continues to rank like other web pages."
+ },
+ {
+ "date": "2026-07-07",
+ "name": "Merchant listing category and sale duration guidance",
+ "kind": "schema",
+ "source": "https://developers.google.com/search/docs/appearance/structured-data/merchant-listing",
+ "notes": "Product.category accepts Text or CategoryCode values, including arrays, and sale periods use validFrom plus validThrough or priceValidUntil in ISO 8601 format."
+ },
+ {
+ "date": "2026-07-10",
+ "name": "Canonicalization re-evaluation timing clarified",
+ "kind": "documentation",
+ "source": "https://developers.google.com/search/docs/crawling-indexing/canonicalization-troubleshooting",
+ "notes": "Google may keep fixed pages in a duplicate cluster for up to two weeks while canonicalization is re-evaluated."
+ },
+ {
+ "date": "2026-07-24",
+ "name": "Review snippet transparency guideline",
+ "kind": "schema",
+ "source": "https://developers.google.com/search/docs/appearance/structured-data/review-snippet",
+ "notes": "Pages and structured data must not include fake reviews or incentivized reviews whose incentive is not clearly and prominently disclosed."
+ },
+ {
+ "date": "2026-07-29",
+ "name": "Search Console platform properties guide",
+ "kind": "product",
+ "source": "https://developers.google.com/search/docs/monitor-debug/analyze-social-video-content",
+ "notes": "Verified TikTok, Instagram, X, and YouTube accounts can be tracked as individual Search Console platform properties."
+ },
+ {
+ "date": "2026-08-18",
+ "name": "August 2026 Spam Update",
+ "kind": "spam",
+ "source": "https://status.search.google.com/incidents/LEubPCm2octf2uMqCFKE",
+ "notes": "The global, all-language rollout started August 18 and completed August 21, 2026."
+ },
+ {
+ "date": "2026-08-20",
+ "name": "Preferred Sources interactive button",
+ "kind": "product",
+ "source": "https://developers.google.com/search/docs/appearance/preferred-sources",
+ "notes": "Eligible publishers can add Google's interactive button or a deeplink so readers can select a domain or subdomain as a preferred source. This is a per-user preference, not a documented site-wide ranking signal."
}
],
"unverified": []
diff --git a/docs/MIGRATION-v1-to-v2.md b/docs/MIGRATION-v1-to-v2.md
index 017a02f..85209ea 100644
--- a/docs/MIGRATION-v1-to-v2.md
+++ b/docs/MIGRATION-v1-to-v2.md
@@ -19,7 +19,7 @@ Everything else is additive — new commands, new scripts, new reference
files, new extensions. Existing audit reports will look slightly fuller
but use exactly the same overall structure.
-This guide covers the v1.x → v2.0.0 jump only; the v2.1.0 through v2.2.4
+This guide covers the v1.x → v2.0.0 jump only; the v2.1.0 through v2.2.5
releases are documented in [../CHANGELOG.md](../CHANGELOG.md), and the
suite is now at 410 tests.
diff --git a/docs/WORKFLOW-public-private.md b/docs/WORKFLOW-public-private.md
index 0b8b163..d0fe159 100644
--- a/docs/WORKFLOW-public-private.md
+++ b/docs/WORKFLOW-public-private.md
@@ -150,13 +150,13 @@ upgrade.
| Letting `aimh/main` lag behind `origin/main` | Always push to `aimh` first, then `origin` on release |
| Confusing `aimh/v2` with `origin/v2` | `origin` should never have an unreleased `v2` branch |
-## State for the v2.2.4 public release (2026-07-20)
+## State for the v2.2.5 public release (2026-08-25)
-- v2.2.4 is the **current public release**. Latest public tag: `v2.2.4`.
+- v2.2.5 is the release represented by this branch. Its public tag is created only after the reviewed commit is published.
- `aimh/main` = shared canonical (public-first README, private marketplace name).
- `origin/main` = `aimh/main` + the public-branding commit (public marketplace name).
-- The public `v2.2.4` tag points at the reviewed maintenance release on `origin/main`.
-- Private synchronization for v2.2.4 requires a separate review because this release preserves
+- The intended public `v2.2.5` tag must point at the reviewed release commit on `origin/main`.
+- Private synchronization for v2.2.5 requires a separate review because this release preserves
public branding and intentionally excludes private-only content.
- `aimh/v2` tracks the shared canonical for ongoing v2.x work.
diff --git a/extensions/ahrefs/docs/AHREFS-SETUP.md b/extensions/ahrefs/docs/AHREFS-SETUP.md
index 654078b..a620a5b 100644
--- a/extensions/ahrefs/docs/AHREFS-SETUP.md
+++ b/extensions/ahrefs/docs/AHREFS-SETUP.md
@@ -53,7 +53,7 @@ The Python merge script is idempotent — re-running only replaces the
Ahrefs charges per "unit". A unit covers most read endpoints (domain
metrics, backlink data) at 1 unit each; bulk endpoints cost more. The
-`scripts/dataforseo_costs.py` cost tracker shipped with claude-seo
+`claude-seo run dataforseo_costs.py` cost tracker shipped with claude-seo
generalises across vendors — see the DataForSEO extension's
`references/cost-tiers.md` for the budget-preset pattern to mirror when
wiring Ahrefs accounting.
diff --git a/extensions/ahrefs/skills/seo-ahrefs/SKILL.md b/extensions/ahrefs/skills/seo-ahrefs/SKILL.md
index 82de4ac..443e0c1 100644
--- a/extensions/ahrefs/skills/seo-ahrefs/SKILL.md
+++ b/extensions/ahrefs/skills/seo-ahrefs/SKILL.md
@@ -2,7 +2,7 @@
name: seo-ahrefs
description: Ahrefs API analyst (extension). Reads referring domains, backlinks, organic keywords, and content explorer data via the tested @ahrefs/[email protected] server. Pairs with seo-backlinks for multi-source confidence weighting.
metadata:
- version: "2.2.4"
+ version: "2.2.5"
compatibility: "Tested with @ahrefs/[email protected] (installed by extensions/ahrefs/install.sh)."
---
diff --git a/extensions/banana/references/gemini-models.md b/extensions/banana/references/gemini-models.md
index e37fd6d..78fccf5 100644
--- a/extensions/banana/references/gemini-models.md
+++ b/extensions/banana/references/gemini-models.md
@@ -121,7 +121,7 @@ Verify current rate limits in Google-owned docs before planning batch work.
Do not use hard-coded pricing assumptions. Verify current pricing at
https://ai.google.dev/gemini-api/docs/pricing and store dated values in
-`~/.banana/pricing.json` for `scripts/cost_tracker.py`.
+`~/.banana/pricing.json` via `claude-seo run --extension banana cost_tracker.py`.
## Image Output Specs
diff --git a/extensions/banana/skills/seo-image-gen/SKILL.md b/extensions/banana/skills/seo-image-gen/SKILL.md
index 3880df3..93ed287 100644
--- a/extensions/banana/skills/seo-image-gen/SKILL.md
+++ b/extensions/banana/skills/seo-image-gen/SKILL.md
@@ -7,7 +7,7 @@ license: MIT
compatibility: "Requires nanobanana MCP server"
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/extensions/bing-webmaster/docs/BING-WEBMASTER-SETUP.md b/extensions/bing-webmaster/docs/BING-WEBMASTER-SETUP.md
index 0f35211..0c4c67a 100644
--- a/extensions/bing-webmaster/docs/BING-WEBMASTER-SETUP.md
+++ b/extensions/bing-webmaster/docs/BING-WEBMASTER-SETUP.md
@@ -4,9 +4,9 @@
1. **Bing Webmaster Tools API**: inbound links, crawl stats, search
keywords, and competitor link comparison via
- `scripts/bing_webmaster.py` (already shipped with claude-seo).
+ `claude-seo run bing_webmaster.py` (already shipped with claude-seo).
2. **IndexNow URL submission** for Amazon, Bing, Naver, Seznam.cz,
- Yandex, and Yep via `scripts/indexnow_submit.py`.
+ Yandex, and Yep via `claude-seo run indexnow_submit.py`.
3. A unified `seo-bing` skill that routes the right command at the
right script.
diff --git a/extensions/bing-webmaster/skills/seo-bing/SKILL.md b/extensions/bing-webmaster/skills/seo-bing/SKILL.md
index abbb7d8..1d3742f 100644
--- a/extensions/bing-webmaster/skills/seo-bing/SKILL.md
+++ b/extensions/bing-webmaster/skills/seo-bing/SKILL.md
@@ -2,7 +2,7 @@
name: seo-bing
description: Bing Webmaster Tools + IndexNow extension. Microsoft Copilot citations are fed by the Bing index; this skill makes Bing visibility, link data, and IndexNow URL submission first-class.
metadata:
- version: "2.2.4"
+ version: "2.2.5"
compatibility: "Requires BING_WEBMASTER_API_KEY and (optionally) INDEXNOW_KEY in ~/.claude/settings.json env. Run extensions/bing-webmaster/install.sh to configure."
---
diff --git a/extensions/dataforseo/skills/seo-dataforseo/SKILL.md b/extensions/dataforseo/skills/seo-dataforseo/SKILL.md
index 2504edb..f385adf 100644
--- a/extensions/dataforseo/skills/seo-dataforseo/SKILL.md
+++ b/extensions/dataforseo/skills/seo-dataforseo/SKILL.md
@@ -13,7 +13,7 @@ license: MIT
compatibility: "Requires DataForSEO MCP server"
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/extensions/firecrawl/skills/seo-firecrawl/SKILL.md b/extensions/firecrawl/skills/seo-firecrawl/SKILL.md
index 28edcbd..14b4576 100644
--- a/extensions/firecrawl/skills/seo-firecrawl/SKILL.md
+++ b/extensions/firecrawl/skills/seo-firecrawl/SKILL.md
@@ -11,7 +11,7 @@ license: MIT
compatibility: "Requires Firecrawl MCP server"
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/extensions/profound/skills/seo-profound/SKILL.md b/extensions/profound/skills/seo-profound/SKILL.md
index e96f5c1..dcd8144 100644
--- a/extensions/profound/skills/seo-profound/SKILL.md
+++ b/extensions/profound/skills/seo-profound/SKILL.md
@@ -2,7 +2,7 @@
name: seo-profound
description: Profound LLM citation tracker (extension). Time-series brand citation rates across ChatGPT, Perplexity, and other LLMs. Pairs with seo-seranking for triangulated AI visibility coverage.
metadata:
- version: "2.2.4"
+ version: "2.2.5"
compatibility: "Requires a Profound API key (set PROFOUND_API_KEY by running extensions/profound/install.sh)."
---
diff --git a/extensions/seranking/skills/seo-seranking/SKILL.md b/extensions/seranking/skills/seo-seranking/SKILL.md
index a0536be..0365df4 100644
--- a/extensions/seranking/skills/seo-seranking/SKILL.md
+++ b/extensions/seranking/skills/seo-seranking/SKILL.md
@@ -2,7 +2,7 @@
name: seo-seranking
description: SE Ranking AI visibility analyst (extension). Tracks AI Share-of-Voice across ChatGPT, Gemini, Perplexity, AI Overviews, and AI Mode in a single query.
metadata:
- version: "2.2.4"
+ version: "2.2.5"
compatibility: "Requires an SE Ranking API key (set SERANKING_API_KEY by running extensions/seranking/install.sh)."
---
@@ -42,7 +42,7 @@ Report each as a percentage with a confidence note based on sample size.
## Cost guardrails
SE Ranking API uses unit accounting. Single AI visibility query is
-~5 units (1 per platform). Use `scripts/dataforseo_costs.py` to log
+~5 units (1 per platform). Use `claude-seo run dataforseo_costs.py` to log
spend across vendors.
## Cross-skill delegation
diff --git a/extensions/unlighthouse/skills/seo-unlighthouse/SKILL.md b/extensions/unlighthouse/skills/seo-unlighthouse/SKILL.md
index 320e2ec..69cbe29 100644
--- a/extensions/unlighthouse/skills/seo-unlighthouse/SKILL.md
+++ b/extensions/unlighthouse/skills/seo-unlighthouse/SKILL.md
@@ -2,7 +2,7 @@
name: seo-unlighthouse
description: Multi-page Lighthouse audit via the MIT-licensed Unlighthouse CLI. Free-tier alternative to running PageSpeed against every URL on a site, no API quota burn, runs locally.
metadata:
- version: "2.2.4"
+ version: "2.2.5"
compatibility: "Requires Node 18+ and the unlighthouse npm package. Run extensions/unlighthouse/install.sh to pre-warm."
---
@@ -28,7 +28,7 @@ and aggregate the results. Useful when:
| `/seo unlighthouse <url> --device desktop` | Desktop form factor |
| `/seo unlighthouse <url> --max-routes 50 --output-dir ./reports` | Cap + persist |
-All flags forward to `scripts/unlighthouse_run.py` which handles
+All flags forward through `claude-seo run unlighthouse_run.py`, which handles
url_safety pre-flight and subprocess timeout management.
## Output handling
@@ -44,4 +44,4 @@ returns it parsed. Aggregate fields:
- For single-URL field data (CrUX), use `seo-google psi` / `seo-google crux`.
- For LCP subpart decomposition on slow pages, use the
- `scripts/lcp_subparts.py` workflow (Phase C).
+ `claude-seo run lcp_subparts.py` workflow (Phase C).
diff --git a/hooks/validate-schema.py b/hooks/validate-schema.py
index aa769fb..75a6f1a 100755
--- a/hooks/validate-schema.py
+++ b/hooks/validate-schema.py
@@ -34,7 +34,28 @@ import json
import os
import re
import sys
-from typing import List
+from typing import Any, List
+
+BRACKET_PLACEHOLDERS = (
+ "[Business Name]",
+ "[City]",
+ "[State]",
+ "[Phone]",
+ "[Address]",
+ "[Your",
+ "[INSERT",
+ "[URL]",
+ "[Email]",
+)
+BARE_PLACEHOLDER_RE = re.compile(r"\bREPLACE(?:_[A-Z]+)*\b")
+
+
+def _configure_utf8() -> None:
+ """Keep hook diagnostics printable on legacy Windows console encodings."""
+ for stream in (sys.stdout, sys.stderr):
+ reconfigure = getattr(stream, "reconfigure", None)
+ if reconfigure:
+ reconfigure(encoding="utf-8", errors="replace")
def validate_jsonld(content: str) -> List[str]:
@@ -56,45 +77,49 @@ def validate_jsonld(content: str) -> List[str]:
if isinstance(data, list):
for item in data:
- errors.extend(_validate_schema_object(item, i))
+ if isinstance(item, dict):
+ errors.extend(_validate_schema_object(item, i))
+ else:
+ errors.append(f"Block {i}: JSON-LD list members must be objects")
elif isinstance(data, dict):
errors.extend(_validate_schema_object(data, i))
+ else:
+ errors.append(f"Block {i}: JSON-LD root must be an object or list")
return errors
-def _validate_schema_object(obj: dict, block_num: int) -> List[str]:
- """Validate a single schema object."""
+def _validate_schema_object(
+ obj: dict[str, Any], block_num: int, *, inherited_context: bool = False
+) -> List[str]:
+ """Validate one schema node, including members of a top-level ``@graph``."""
errors = []
prefix = f"Block {block_num}"
# Check @context
- if "@context" not in obj:
+ if "@context" not in obj and not inherited_context:
errors.append(f"{prefix}: Missing @context")
- elif obj["@context"] not in ("https://schema.org", "http://schema.org"):
+ elif "@context" in obj and obj["@context"] not in (
+ "https://schema.org",
+ "http://schema.org",
+ ):
errors.append(f"{prefix}: @context should be 'https://schema.org'")
- # Check @type
- if "@type" not in obj:
+ graph = obj.get("@graph")
+ has_graph = isinstance(graph, list)
+
+ # A graph container does not need its own @type. Its object members do.
+ if "@type" not in obj and not has_graph:
errors.append(f"{prefix}: Missing @type")
# Check for placeholder text
- placeholders = [
- "[Business Name]",
- "[City]",
- "[State]",
- "[Phone]",
- "[Address]",
- "[Your",
- "[INSERT",
- "REPLACE",
- "[URL]",
- "[Email]",
- ]
- text = json.dumps(obj)
- for p in placeholders:
+ placeholder_scope = {key: value for key, value in obj.items() if key != "@graph"}
+ text = json.dumps(placeholder_scope, ensure_ascii=False)
+ for p in BRACKET_PLACEHOLDERS:
if p.lower() in text.lower():
errors.append(f"{prefix}: Contains placeholder text: {p}")
+ for placeholder in BARE_PLACEHOLDER_RE.findall(text):
+ errors.append(f"{prefix}: Contains placeholder text: {placeholder}")
# Check for deprecated types
schema_type = obj.get("@type", "")
@@ -118,6 +143,25 @@ def _validate_schema_object(obj: dict, block_num: int) -> List[str]:
if schema_type in restricted:
errors.append(f"{prefix}: @type '{schema_type}' is {restricted[schema_type]}; verify site qualifies")
+ if "@graph" in obj:
+ if not isinstance(graph, list):
+ errors.append(f"{prefix}: @graph must be a list")
+ else:
+ context_is_inherited = inherited_context or "@context" in obj
+ for index, item in enumerate(graph, 1):
+ if not isinstance(item, dict):
+ errors.append(
+ f"{prefix}: @graph member {index} must be an object"
+ )
+ continue
+ errors.extend(
+ _validate_schema_object(
+ item,
+ block_num,
+ inherited_context=context_is_inherited,
+ )
+ )
+
return errors
@@ -144,6 +188,7 @@ def _resolve_filepath():
def main():
+ _configure_utf8()
filepath = _resolve_filepath()
if not filepath:
sys.exit(0)
@@ -164,7 +209,7 @@ def main():
sys.exit(0)
try:
- with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
+ with open(filepath, "r", encoding="utf-8", errors="replace") as f:
content = f.read()
except (OSError, IOError):
sys.exit(0)
diff --git a/install.ps1 b/install.ps1
index 4756950..21b4965 100644
--- a/install.ps1
+++ b/install.ps1
@@ -118,7 +118,7 @@ $RepoUrl = "https://github.com/AgriciDaniel/claude-seo"
# This default MUST be bumped on every release. CI guard
# (tests/test_manifest_consistency.py) enforces this matches plugin.json.
# Override: $env:CLAUDE_SEO_TAG = 'main'; .\install.ps1
-$RepoTag = if ($env:CLAUDE_SEO_TAG) { $env:CLAUDE_SEO_TAG } else { 'v2.2.4' }
+$RepoTag = if ($env:CLAUDE_SEO_TAG) { $env:CLAUDE_SEO_TAG } else { 'v2.2.5' }
# Create directories
New-Item -ItemType Directory -Force -Path $SkillDir | Out-Null
@@ -165,6 +165,15 @@ try {
Copy-Item -Recurse -Force "$SchemaPath\*" $SkillSchema
}
+ # Copy deterministic data files consumed by bundled scripts such as
+ # seo_updates.py. Keep the repository-relative data\ layout intact.
+ $DataPath = "$TempDir\data"
+ if (Test-Path $DataPath) {
+ $SkillData = "$SkillDir\data"
+ New-Item -ItemType Directory -Force -Path $SkillData | Out-Null
+ Copy-Item -Recurse -Force "$DataPath\*" $SkillData
+ }
+
# Copy reference docs
$PdfPath = "$TempDir\pdf"
if (Test-Path $PdfPath) {
diff --git a/install.sh b/install.sh
index 151fdfc..b94ccbc 100755
--- a/install.sh
+++ b/install.sh
@@ -12,7 +12,7 @@ main() {
# This default MUST be bumped on every release. CI guard
# (tests/test_manifest_consistency.py) enforces this matches plugin.json.
# Override: CLAUDE_SEO_TAG=main bash install.sh
- REPO_TAG="${CLAUDE_SEO_TAG:-v2.2.4}"
+ REPO_TAG="${CLAUDE_SEO_TAG:-v2.2.5}"
echo "════════════════════════════════════════"
echo "║ Claude SEO - Installer ║"
@@ -56,6 +56,13 @@ main() {
cp -r "${TEMP_DIR}/claude-seo/schema/"* "${SKILL_DIR}/schema/"
fi
+ # Copy deterministic data files consumed by bundled scripts such as
+ # seo_updates.py. Keep the repository-relative data/ layout intact.
+ if [ -d "${TEMP_DIR}/claude-seo/data" ]; then
+ mkdir -p "${SKILL_DIR}/data"
+ cp -r "${TEMP_DIR}/claude-seo/data/"* "${SKILL_DIR}/data/"
+ fi
+
# Copy reference docs
if [ -d "${TEMP_DIR}/claude-seo/pdf" ]; then
mkdir -p "${SKILL_DIR}/pdf"
diff --git a/pyproject.toml b/pyproject.toml
index 14c36c7..327d1a3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "claude-seo"
-version = "2.2.4"
+version = "2.2.5"
description = "Comprehensive SEO analysis skill for Claude Code"
requires-python = ">=3.10"
license = "MIT"
diff --git a/requirements.txt b/requirements.txt
index 9b6a3f2..aea69a2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,10 +1,11 @@
# Claude SEO - Python Dependencies
# Bounded version pinning with security-conscious minimums
-# Last updated: July 20, 2026 (v2.2.4)
+# Last updated: August 25, 2026 (v2.2.5)
beautifulsoup4>=4.12.0,<5.0.0 # No known CVEs
requests>=2.32.4,<3.0.0 # CVE-2024-47081, CVE-2024-35195 fixes
lxml>=6.1.1,<7.0.0 # CVE-2025-24928 + additional libxml2 security patches
+lxml_html_clean>=0.4.3,<1.0.0 # lxml 6 removed html.clean into this standalone package
playwright>=1.59.0,<2.0.0 # CVE-2025-59288 fix (macOS)
urllib3>=2.7.0,<3.0.0 # High-severity urllib3 advisories GHSA-mf9v-mfxr-j63j, GHSA-qccp-gfcp-xxvc
diff --git a/schema/templates.json b/schema/templates.json
index 132cb6b..5b831fe 100644
--- a/schema/templates.json
+++ b/schema/templates.json
@@ -221,6 +221,7 @@
"description": "[Product Description]",
"image": "[Product Image URL]",
"sku": "[SKU]",
+ "category": "[Merchant-defined Product Category]",
"brand": {
"@type": "Brand",
"name": "[Brand Name]"
@@ -231,6 +232,7 @@
"priceCurrency": "[Currency Code, e.g. USD]",
"availability": "https://schema.org/InStock",
"url": "[Product Page URL]",
+ "validFrom": "[YYYY-MM-DDTHH:MM:SS+TZ]",
"priceValidUntil": "[YYYY-MM-DD]",
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
diff --git a/scripts/agent_ux_check.py b/scripts/agent_ux_check.py
index 5fb5f63..b9794f2 100644
--- a/scripts/agent_ux_check.py
+++ b/scripts/agent_ux_check.py
@@ -44,12 +44,13 @@ import re
import sys
from typing import Optional
+from bs4 import BeautifulSoup
+
_SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
if _SCRIPTS_DIR not in sys.path:
sys.path.insert(0, _SCRIPTS_DIR)
from render_page import render_page # noqa: E402
-
_ONCLICK_DIV_RE = re.compile(
r"<div\b[^>]*\bonclick\s*=\s*[\"'][^\"']+[\"']", re.IGNORECASE
)
@@ -64,6 +65,19 @@ _ANCHOR_HREF_RE = re.compile(r"<a\b[^>]*\bhref\s*=", re.IGNORECASE)
_SEMANTIC_LANDMARK_RE = re.compile(
r"<(?:nav|main|article|section|aside|header|footer)\b", re.IGNORECASE
)
+_MEANINGFUL_EMPTY_TEXT_TAGS = {
+ "a",
+ "audio",
+ "button",
+ "canvas",
+ "iframe",
+ "img",
+ "input",
+ "select",
+ "svg",
+ "textarea",
+ "video",
+}
def _walk_tree(node: Optional[dict]):
@@ -98,6 +112,21 @@ def analyze_html(html: str) -> dict:
return findings
+def _has_meaningful_body(html: str) -> bool:
+ """Reject empty documents and unhydrated shell containers."""
+ if not html.strip():
+ return False
+ soup = BeautifulSoup(html, "html.parser")
+ body = soup.body
+ if body is None:
+ return False
+ for node in body.find_all(("script", "style", "template", "noscript")):
+ node.decompose()
+ if body.get_text(" ", strip=True):
+ return True
+ return body.find(list(_MEANINGFUL_EMPTY_TEXT_TAGS)) is not None
+
+
def analyze_accessibility_tree(tree: Optional[dict]) -> dict:
"""Walk a Playwright accessibility snapshot for the checklist items."""
findings: dict = {
@@ -190,17 +219,33 @@ def audit(url: str, *, timeout_ms: int = 15000) -> dict:
"html_findings": {},
"a11y_findings": {},
"score": None,
+ "score_status": "unavailable",
+ "partial": False,
+ "partial_reasons": [],
"issues": [],
}
if page.get("error"):
return report
html = page.get("content") or ""
+ if not _has_meaningful_body(html):
+ report["render_error"] = (
+ "rendered document contains no meaningful body content"
+ )
+ return report
a11y = page.get("accessibility_tree")
+ if page.get("accessibility_partial") or a11y is None:
+ report["partial"] = True
+ report["partial_reasons"].append(
+ page.get("accessibility_error")
+ or "accessibility tree was not available"
+ )
+
report["html_findings"] = analyze_html(html)
report["a11y_findings"] = analyze_accessibility_tree(a11y)
scored = score(report["html_findings"], report["a11y_findings"])
report["score"] = scored["score"]
+ report["score_status"] = "partial" if report["partial"] else "complete"
report["issues"] = scored["issues"]
return report
@@ -225,7 +270,10 @@ def _cli() -> None:
print(f"URL: {report['url']}")
print(f"Status: {report['status_code']}")
- print(f"Agent-UX score: {report['score']}/100")
+ score_suffix = " (partial)" if report["partial"] else ""
+ print(f"Agent-UX score: {report['score']}/100{score_suffix}")
+ for reason in report["partial_reasons"]:
+ print(f"Partial result: {reason}")
if report["issues"]:
print("Issues:")
for issue in report["issues"]:
diff --git a/scripts/consistency_check.py b/scripts/consistency_check.py
index 484ebae..8f7fbb3 100644
--- a/scripts/consistency_check.py
+++ b/scripts/consistency_check.py
@@ -49,7 +49,7 @@ RUNTIME_UTILITY_COMMANDS = {"setup", "doctor"}
def tracked_files():
out = subprocess.run(["git", "-C", REPO, "ls-files"],
capture_output=True, text=True, check=True).stdout
- return [l for l in out.splitlines() if l.strip()]
+ return [line for line in out.splitlines() if line.strip()]
def read(rel, _cache={}):
@@ -176,11 +176,17 @@ def check_runtime_invocations(texts):
bare = re.compile(
r"\b(?:python3|python|py\s+-3)\s+[^\n`]*?scripts/[A-Za-z0-9_./-]+\.py"
)
+ raw_path = re.compile(r"(?<![\w/])scripts/([A-Za-z0-9_]+\.py)\b")
runtime = re.compile(r"\bclaude-seo\s+run(?:\s+--extension\s+[a-z0-9-]+)?\s+([A-Za-z0-9_-]+\.py)")
for f in carriers:
content = read(f)
for match in bare.finditer(content):
errors.append(f"{f}: bare bundled-script invocation: {match.group(0)}")
+ for script in sorted(set(raw_path.findall(content))):
+ errors.append(
+ f"{f}: unsupported raw script path scripts/{script}; "
+ f"use claude-seo run {script}"
+ )
for script in sorted(set(runtime.findall(content))):
if not os.path.isfile(os.path.join(REPO, "scripts", script)) and not any(
os.path.isfile(path)
diff --git a/scripts/render_page.py b/scripts/render_page.py
index 2849576..8869d30 100644
--- a/scripts/render_page.py
+++ b/scripts/render_page.py
@@ -36,6 +36,9 @@ A dict with::
is_spa True iff raw_content looks like a hydration shell
extracted_text trafilatura main-content extraction (or None)
publication_date htmldate ISO 8601 string (or None)
+ accessibility_tree Chromium accessibility-tree snapshot (or None)
+ accessibility_error capture failure detail (or None)
+ accessibility_partial True when the accessibility result is incomplete
headers response headers from the main document
redirect_chain list of {url, status_code}
console_errors list of browser console error strings
@@ -69,7 +72,7 @@ import os
import re
import sys
import time
-from typing import Optional
+from typing import Any, Optional
from bs4 import BeautifulSoup
@@ -77,9 +80,11 @@ from bs4 import BeautifulSoup
# only need raw-mode (mode='never') don't pay the import cost.
try:
from playwright.sync_api import (
- sync_playwright,
TimeoutError as PlaywrightTimeout,
)
+ from playwright.sync_api import (
+ sync_playwright,
+ )
except ImportError: # pragma: no cover - exercised in environments without playwright
sync_playwright = None
PlaywrightTimeout = Exception # type: ignore[assignment,misc]
@@ -105,7 +110,6 @@ from url_safety import ( # noqa: E402 (sys.path massage above is intentional)
validate_url_strict,
)
-
VIEWPORTS: dict[str, dict[str, int]] = {
"desktop": {"width": 1920, "height": 1080, "device_scale": 1},
"laptop": {"width": 1366, "height": 768, "device_scale": 1},
@@ -118,9 +122,9 @@ USER_AGENT = (
"(KHTML, like Gecko) Chrome/150.0.7871.115 Safari/537.36 ClaudeSEO/2.0"
)
-# Hydration-shell signatures. Any single match flips is_spa to True. These
-# cover the dominant SPA frameworks: React (CRA, Vite, Remix), Next.js,
-# Vue, Nuxt, Svelte, Astro islands, and the "JS required" noscript pattern.
+# Hydration-shell signatures. A marker is actionable only while meaningful
+# body text is sparse, because SSR/SSG framework pages legitimately retain
+# the same root and hydration markers after serving complete HTML.
_SPA_SHELL_PATTERNS = (
'<div id="root"></div>',
'<div id="__next">',
@@ -154,6 +158,8 @@ JSON_LD_MAX_BLOCK_BYTES = 256 * 1024
JSON_LD_MAX_TOTAL_BYTES = 1024 * 1024
JSON_LD_MAX_NODES = 10_000
JSON_LD_MAX_DEPTH = 40
+ACCESSIBILITY_MAX_NODES = 10_000
+ACCESSIBILITY_MAX_DEPTH = 50
def _visible_body_text(lower_html: str) -> str:
@@ -253,13 +259,16 @@ def _extract_json_ld(html: Optional[str], *, include_full: bool = False) -> dict
def _is_spa(raw_html: Optional[str]) -> bool:
- """Heuristic SPA detector. Conservative: any positive signal flips True."""
+ """Detect sparse hydration shells without flagging complete SSR/SSG pages."""
if not raw_html:
return True
lc = raw_html.lower()
- if any(pattern in lc for pattern in _SPA_SHELL_PATTERNS):
- return True
visible_text = _visible_body_text(lc)
+ if (
+ len(visible_text) < _BUILDER_SPARSE_TEXT_MAX
+ and any(pattern in lc for pattern in _SPA_SHELL_PATTERNS)
+ ):
+ return True
if len(visible_text) < _BUILDER_SPARSE_TEXT_MAX:
for markers in _BUILDER_FINGERPRINT_GROUPS:
if sum(marker in lc for marker in markers) >= 2:
@@ -305,6 +314,92 @@ def _wait_for_dom_stability(page, timeout_ms: int) -> bool: # type: ignore[no-u
return False
+def _ax_value(node: dict[str, Any], key: str) -> str:
+ value = node.get(key)
+ if isinstance(value, dict):
+ raw = value.get("value")
+ return str(raw) if raw is not None else ""
+ return str(value) if value is not None else ""
+
+
+def _accessibility_tree_from_cdp(nodes: object) -> tuple[Optional[dict], bool]:
+ """Convert Chrome's flat AXNode array into the tree used by the auditor."""
+ if not isinstance(nodes, list) or not nodes:
+ return None, False
+
+ usable = [node for node in nodes if isinstance(node, dict)]
+ truncated = len(usable) > ACCESSIBILITY_MAX_NODES
+ usable = usable[:ACCESSIBILITY_MAX_NODES]
+ by_id = {
+ str(node["nodeId"]): node
+ for node in usable
+ if node.get("nodeId") is not None
+ }
+ if not by_id:
+ return None, truncated
+
+ known_children = {
+ str(child_id)
+ for node in by_id.values()
+ for child_id in (node.get("childIds") or [])
+ if str(child_id) in by_id
+ }
+ root_id = next((node_id for node_id in by_id if node_id not in known_children), None)
+ if root_id is None:
+ return None, True
+
+ def build(node_id: str, depth: int, ancestors: frozenset[str]) -> dict:
+ nonlocal truncated
+ node = by_id[node_id]
+ result = {
+ "role": _ax_value(node, "role"),
+ "name": _ax_value(node, "name"),
+ "ignored": bool(node.get("ignored", False)),
+ }
+ child_ids = [
+ str(child_id)
+ for child_id in (node.get("childIds") or [])
+ if str(child_id) in by_id
+ ]
+ if depth >= ACCESSIBILITY_MAX_DEPTH:
+ if child_ids:
+ truncated = True
+ return result
+ children = []
+ for child_id in child_ids:
+ if child_id in ancestors:
+ truncated = True
+ continue
+ children.append(build(child_id, depth + 1, ancestors | {child_id}))
+ if children:
+ result["children"] = children
+ return result
+
+ return build(root_id, 0, frozenset({root_id})), truncated
+
+
+def _capture_accessibility_tree(context: Any, page: Any) -> tuple[Optional[dict], bool]:
+ """Capture the Chromium AX tree through Playwright's supported CDP seam."""
+ session = context.new_cdp_session(page)
+ try:
+ session.send("Accessibility.enable")
+ payload = session.send(
+ "Accessibility.getFullAXTree", {"depth": ACCESSIBILITY_MAX_DEPTH}
+ )
+ return _accessibility_tree_from_cdp(payload.get("nodes"))
+ finally:
+ try:
+ session.send("Accessibility.disable")
+ except Exception:
+ pass
+ detach = getattr(session, "detach", None)
+ if detach:
+ try:
+ detach()
+ except Exception:
+ pass
+
+
def render_page(
url: str,
*,
@@ -319,8 +414,8 @@ def render_page(
"""Render or fetch ``url`` per the chosen mode. See module docstring.
``extract_accessibility``: when True and the page is rendered (mode
- 'always' or 'auto'+SPA), the Playwright accessibility-tree snapshot is
- captured and attached to ``result['accessibility_tree']``. Used by
+ 'always' or 'auto'+SPA), the Chromium accessibility tree is captured via
+ a Playwright CDP session and attached to ``result['accessibility_tree']``. Used by
``agent_ux_check.py`` for agent-friendliness scoring (Google AI
optimization guide / web.dev agent UX criteria).
"""
@@ -333,6 +428,8 @@ def render_page(
"extracted_text": None,
"publication_date": None,
"accessibility_tree": None,
+ "accessibility_error": None,
+ "accessibility_partial": False,
"headers": {},
"redirect_chain": [],
"console_errors": [],
@@ -440,12 +537,28 @@ def render_page(
if extract_accessibility:
try:
- result["accessibility_tree"] = page.accessibility.snapshot(
- interesting_only=False
- )
- except Exception:
- # Accessibility snapshot is best-effort; never block the audit.
+ (
+ result["accessibility_tree"],
+ result["accessibility_partial"],
+ ) = _capture_accessibility_tree(context, page)
+ if result["accessibility_tree"] is None:
+ result["accessibility_partial"] = True
+ result["accessibility_error"] = (
+ "Chromium returned no accessibility nodes"
+ )
+ elif result["accessibility_partial"]:
+ result["accessibility_error"] = (
+ "accessibility tree exceeded the capture bounds"
+ )
+ except Exception as exc:
result["accessibility_tree"] = None
+ result["accessibility_partial"] = True
+ result["accessibility_error"] = (
+ f"accessibility capture failed: {type(exc).__name__}: {exc}"
+ )
+ result["render_diagnostics"].append(
+ result["accessibility_error"]
+ )
browser.close()
except Exception as exc:
@@ -476,6 +589,40 @@ def render_page(
return result
+def _non_negative_int(value: str) -> int:
+ parsed = int(value)
+ if parsed < 0:
+ raise argparse.ArgumentTypeError("must be zero or greater")
+ return parsed
+
+
+def _json_summary(result: dict, *, max_text: int = 0) -> dict:
+ """Return an explicit, machine-readable JSON output contract.
+
+ ``max_text=0`` preserves every textual field. Positive values truncate
+ content fields and record the original and returned character counts.
+ """
+ summary = dict(result)
+ full_content = result.get("content") or result.get("raw_content") or ""
+ summary["structured_data"] = _extract_json_ld(full_content)
+ truncation = {"limit": max_text or None, "fields": {}}
+ for field in ("content", "raw_content", "extracted_text"):
+ value = summary.get(field)
+ if not isinstance(value, str):
+ continue
+ original_chars = len(value)
+ truncated = max_text > 0 and original_chars > max_text
+ if truncated:
+ summary[field] = value[:max_text]
+ truncation["fields"][field] = {
+ "original_chars": original_chars,
+ "returned_chars": len(summary[field]),
+ "truncated": truncated,
+ }
+ summary["truncation"] = truncation
+ return summary
+
+
def _cli() -> None:
parser = argparse.ArgumentParser(
description="claude-seo shared headless renderer (Playwright + trafilatura)"
@@ -517,7 +664,16 @@ def _cli() -> None:
parser.add_argument(
"--json",
action="store_true",
- help="emit a JSON summary (truncates content fields)",
+ help="emit JSON with full content fields unless --max-text is set",
+ )
+ parser.add_argument(
+ "--max-text",
+ type=_non_negative_int,
+ default=0,
+ help=(
+ "maximum characters returned for each JSON content field; "
+ "0 keeps full text (default: 0)"
+ ),
)
parser.add_argument(
"--json-ld-output",
@@ -546,21 +702,15 @@ def _cli() -> None:
with open(args.json_ld_output, "w", encoding="utf-8") as fh:
json.dump(extraction, fh, indent=2, ensure_ascii=False)
+ output_written = False
+ if args.output and not res["error"]:
+ with open(args.output, "w", encoding="utf-8") as fh:
+ fh.write(res["content"] or "")
+ output_written = True
+
if args.json:
- summary = dict(res)
- summary["structured_data"] = _extract_json_ld(full_content)
- # JSON-safe truncation so the CLI is usable from agents without
- # piping megabytes of HTML across stdio.
- for field, limit in (
- ("content", 500),
- ("raw_content", 200),
- ("extracted_text", 500),
- ):
- if summary.get(field):
- value = summary[field]
- summary[field] = (
- value[:limit] + "..." if len(value) > limit else value
- )
+ summary = _json_summary(res, max_text=args.max_text)
+ summary["output_written"] = output_written
print(json.dumps(summary, indent=2, default=str))
sys.exit(1 if res["error"] else 0)
@@ -568,9 +718,7 @@ def _cli() -> None:
print(f"Error: {res['error']}", file=sys.stderr)
sys.exit(1)
- if args.output:
- with open(args.output, "w", encoding="utf-8") as fh:
- fh.write(res["content"] or "")
+ if output_written:
print(f"saved to {args.output}", file=sys.stderr)
else:
print(res["content"])
diff --git a/scripts/runtime.py b/scripts/runtime.py
index be904f0..0809d06 100755
--- a/scripts/runtime.py
+++ b/scripts/runtime.py
@@ -277,7 +277,11 @@ def command_setup(args: argparse.Namespace) -> int:
except RuntimeError as exc:
print(f"Browser setup incomplete: {exc}", file=sys.stderr)
_run_checked(
- [str(staged_python), "-c", "import bs4, lxml, playwright, requests, trafilatura"],
+ [
+ str(staged_python),
+ "-c",
+ "import bs4, lxml, lxml_html_clean, playwright, requests, trafilatura",
+ ],
env=env,
stage="runtime import validation",
)
diff --git a/skills/seo-audit/SKILL.md b/skills/seo-audit/SKILL.md
index eb0d280..678c4b1 100644
--- a/skills/seo-audit/SKILL.md
+++ b/skills/seo-audit/SKILL.md
@@ -6,7 +6,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-backlinks/SKILL.md b/skills/seo-backlinks/SKILL.md
index fa3a7c4..d5e1dd9 100644
--- a/skills/seo-backlinks/SKILL.md
+++ b/skills/seo-backlinks/SKILL.md
@@ -7,7 +7,7 @@ license: MIT
compatibility: "Free: Common Crawl + verify always available. Optional: Moz API, Bing Webmaster (free signup). Premium: DataForSEO extension."
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-cluster/SKILL.md b/skills/seo-cluster/SKILL.md
index 26e08bf..5dbddbb 100644
--- a/skills/seo-cluster/SKILL.md
+++ b/skills/seo-cluster/SKILL.md
@@ -14,7 +14,7 @@ license: MIT
metadata:
author: AgriciDaniel
original_author: "Lutfiya Miller (Pro Hub Challenge Winner)"
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-cluster/references/hub-spoke-architecture.md b/skills/seo-cluster/references/hub-spoke-architecture.md
index 372c4bc..adb0766 100644
--- a/skills/seo-cluster/references/hub-spoke-architecture.md
+++ b/skills/seo-cluster/references/hub-spoke-architecture.md
@@ -135,7 +135,7 @@ coverage; spokes provide deep dives into subtopics.
```json
{
- "version": "2.2.4",
+ "version": "2.2.5",
"seed_keyword": "string",
"created_at": "ISO-8601",
"pillar": {
diff --git a/skills/seo-competitor-pages/SKILL.md b/skills/seo-competitor-pages/SKILL.md
index a155d72..98a6e73 100644
--- a/skills/seo-competitor-pages/SKILL.md
+++ b/skills/seo-competitor-pages/SKILL.md
@@ -11,7 +11,7 @@ argument-hint: "[url or generate] [competitor]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-content/SKILL.md b/skills/seo-content/SKILL.md
index 750c792..197bd27 100644
--- a/skills/seo-content/SKILL.md
+++ b/skills/seo-content/SKILL.md
@@ -9,7 +9,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-dataforseo/SKILL.md b/skills/seo-dataforseo/SKILL.md
index 326d452..3613ffd 100644
--- a/skills/seo-dataforseo/SKILL.md
+++ b/skills/seo-dataforseo/SKILL.md
@@ -13,7 +13,7 @@ license: MIT
compatibility: "Requires DataForSEO MCP server"
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-drift/SKILL.md b/skills/seo-drift/SKILL.md
index 56757a2..a18467d 100644
--- a/skills/seo-drift/SKILL.md
+++ b/skills/seo-drift/SKILL.md
@@ -12,7 +12,7 @@ license: MIT
metadata:
author: AgriciDaniel
original_author: "Dan Colta (Pro Hub Challenge)"
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -95,9 +95,9 @@ Captures the current state of a page and stores it.
**Steps:**
1. Validate URL (SSRF protection via `google_auth.validate_url()`)
-2. Fetch page via `scripts/fetch_page.py`
-3. Parse HTML via `scripts/parse_html.py`
-4. Optionally fetch CWV via `scripts/pagespeed_check.py` (use `--skip-cwv` to skip)
+2. Fetch page via `claude-seo run fetch_page.py <URL>`
+3. Parse HTML via `claude-seo run parse_html.py <URL>`
+4. Optionally fetch CWV via `claude-seo run pagespeed_check.py <URL>` (use `--skip-cwv` to skip)
5. Hash HTML body and schema content (SHA-256)
6. Store snapshot in SQLite
@@ -187,7 +187,7 @@ When drift is detected, recommend the appropriate specialized skill:
## Security
-- **All URL fetching** goes through `scripts/fetch_page.py` which enforces SSRF protection
+- **All URL fetching** goes through `claude-seo run fetch_page.py`, which enforces SSRF protection
(blocks private IPs, loopback, reserved ranges, GCP metadata endpoints)
- **No curl, no subprocess HTTP calls** -- only the project's validated fetch pipeline
- **All SQLite queries** use parameterized placeholders (`?`), never string interpolation
diff --git a/skills/seo-ecommerce/SKILL.md b/skills/seo-ecommerce/SKILL.md
index b26e858..7902df1 100644
--- a/skills/seo-ecommerce/SKILL.md
+++ b/skills/seo-ecommerce/SKILL.md
@@ -14,7 +14,7 @@ compatibility: "Enhanced with DataForSEO Merchant API (optional)"
metadata:
author: AgriciDaniel
original_author: "Matej Marjanovic (Pro Hub Challenge)"
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -262,6 +262,9 @@ Confirmed required fields are `name`, `image`, and `offers`; use `Offer`, not `A
- `shippingDetails` -- ShippingDetails with rate and delivery time (merchant-level shipping via `ShippingService` is also supported; shipping/returns can be set in Search Console without a Merchant Center account)
- `hasMerchantReturnPolicy` -- MerchantReturnPolicy with type and days
- `hasAdultConsideration` -- **required for adult-oriented products** (added 2026-05-20 to Product variant / Merchant listing); Google Search supports only the value `https://schema.org/SexualContentConsideration`
+- `category` -- `Text`, `CategoryCode`, or an array mixing both. Use custom
+ text for merchant-defined product types and `CategoryCode` with Google's
+ taxonomy URL plus `codeValue` for Google Product Categories.
### Validation Rules
@@ -270,8 +273,11 @@ Confirmed required fields are `name`, `image`, and `offers`; use `Offer`, not `A
3. `image` should be array with >= 1 high-res image URL
4. `priceCurrency` must be ISO 4217 (USD, EUR, GBP)
5. If `brand` is present, `brand.name` must not be empty or "N/A"
-6. Dates in `priceValidUntil` must be ISO 8601
+6. Sale periods use `validFrom` plus either `validThrough` or
+ `priceValidUntil`, in ISO 8601 format. Include time and timezone when known.
7. If `aggregateRating` present: `ratingValue` and `reviewCount` required
+8. Do not include fake reviews or undisclosed incentivized reviews in visible
+ content or structured data. Clearly and prominently disclose incentives.
### Schema Scoring
diff --git a/skills/seo-ecommerce/references/marketplace-endpoints.md b/skills/seo-ecommerce/references/marketplace-endpoints.md
index 7b32ea8..ef28c80 100644
--- a/skills/seo-ecommerce/references/marketplace-endpoints.md
+++ b/skills/seo-ecommerce/references/marketplace-endpoints.md
@@ -110,7 +110,7 @@ When consuming responses, normalize:
| Rating | Integer or float | Float rounded to 1 decimal |
| Reviews | String or int | Integer |
-Use `scripts/dataforseo_normalize.py --module merchant` for automatic normalization.
+Use `claude-seo run dataforseo_normalize.py --module merchant` for automatic normalization.
## Cost Reference
diff --git a/skills/seo-flow/SKILL.md b/skills/seo-flow/SKILL.md
index e0df635..aaf129f 100644
--- a/skills/seo-flow/SKILL.md
+++ b/skills/seo-flow/SKILL.md
@@ -11,7 +11,7 @@ argument-hint: "[stage] [url|topic]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-geo/SKILL.md b/skills/seo-geo/SKILL.md
index 8a3e64d..c6c6b38 100644
--- a/skills/seo-geo/SKILL.md
+++ b/skills/seo-geo/SKILL.md
@@ -13,7 +13,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -177,7 +177,12 @@ Check `robots.txt` for these AI crawlers:
Read `references/llmstxt-evidence.md` for the primary-source evidence (Mueller, Illyes, SE Ranking 300k-domain study, OtterlyAI server-log audit) on why `/llms.txt` is not currently a citation lever for major AI search systems. claude-seo reports presence but assigns no citation-ranking weight.
-> **Google now states this explicitly.** Google's AI optimization guide (updated 2026-06-29) says you do **not** need `llms.txt` / AI-text files for Google Search, including its generative AI features, and that doing so "won't harm (nor help) your visibility or rankings in Google Search, as Google Search ignores them." Mueller separately called the llms.txt discovery use case "a dead end." It's fine to keep for **non-Google** AI services; never recommend it as a Google ranking/citation lever. Source: developers.google.com/search/docs/fundamentals/ai-optimization-guide
+> **Google now states this explicitly.** Google's AI optimization guide, introduced
+> 2026-05-15 and clarified 2026-06-15, says `llms.txt` and other AI-text files are
+> not needed for Google Search and do not help or hurt visibility or rankings.
+> They may still serve non-Google systems. Never recommend `llms.txt` as a Google
+> ranking or citation lever. Source:
+> developers.google.com/search/docs/fundamentals/ai-optimization-guide
The emerging **llms.txt** standard provides AI crawlers with structured content guidance.
@@ -241,7 +246,13 @@ New standard (December 2025) for machine-readable AI licensing terms.
Google added many AI citation/source surfaces across AI Overviews **and** AI Mode (May 2026):
-- **Preferred Sources**, users pick sites that get a "preferred" badge in AI answers; all-languages since 2026-04-30 (>345K sources selected); Google is working toward using it as a ranking signal. *Quick win:* encourage your audience to add the brand as a Preferred Source.
+- **Preferred Sources**, an eligible domain or subdomain can be selected by a
+ user, making its content more likely to appear in that user's Top Stories and
+ eligible for a preferred badge in AI Mode or AI Overviews. This is a
+ **per-user preference**, not a documented general ranking signal. Publishers
+ may offer Google's interactive button or a deeplink, but should not promise a
+ site-wide ranking lift. Source:
+ developers.google.com/search/docs/appearance/preferred-sources
- **"Highly Cited" badges**, earned via original primary reporting that other articles cite.
- **Community Perspectives**, elevates Reddit/forum/firsthand content.
- Inline links, desktop hover **Link Previews**, and prominent link carousels.
diff --git a/skills/seo-google/SKILL.md b/skills/seo-google/SKILL.md
index 9fe3a90..4cca80d 100644
--- a/skills/seo-google/SKILL.md
+++ b/skills/seo-google/SKILL.md
@@ -12,7 +12,7 @@ argument-hint: "[command] [url|property]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -134,6 +134,13 @@ dimension rows, not the size of every pagination request.
> - **AI Mode already rolls into standard Performance totals** (Web search type), clicks (external-link clicks in AI Mode) and impressions are counted in the normal report, so you **cannot** cleanly split "classic" vs "AI" traffic from totals. Use the Generative AI report for impressions-only AI visibility.
> - **Data-reliability caveat:** a GSC logging error made **impressions, CTR, and average position unreliable from 2025-05-13 to 2026-04-27** (clicks unaffected; fixed forward-only, **no backfill**). Treat impression/CTR/position trends spanning that window with caution; expect an apparent impressions drop after the fix.
+> **Platform properties (2026):** Search Console can expose verified TikTok,
+> Instagram, X, and YouTube accounts as individual properties. Verify each
+> account separately, unless it was already added through a claimed Search
+> profile. Use these properties for Google Search performance only, not as a
+> substitute for the platform's own analytics. Source:
+> developers.google.com/search/docs/monitor-debug/analyze-social-video-content
+
### `/seo google inspect <url>`
URL Inspection: real indexation status from Google.
diff --git a/skills/seo-hreflang/SKILL.md b/skills/seo-hreflang/SKILL.md
index fd0aac8..36ce868 100644
--- a/skills/seo-hreflang/SKILL.md
+++ b/skills/seo-hreflang/SKILL.md
@@ -10,7 +10,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-image-gen/SKILL.md b/skills/seo-image-gen/SKILL.md
index ef302e7..a8df5f1 100644
--- a/skills/seo-image-gen/SKILL.md
+++ b/skills/seo-image-gen/SKILL.md
@@ -7,7 +7,7 @@ license: MIT
compatibility: "Requires nanobanana MCP server"
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-images/SKILL.md b/skills/seo-images/SKILL.md
index cb4430b..e12651f 100644
--- a/skills/seo-images/SKILL.md
+++ b/skills/seo-images/SKILL.md
@@ -12,7 +12,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -106,7 +106,7 @@ Third-party reporting and Wikipedia describe a Rust-based JPEG XL decoder as shi
#### Detected lazy-loader methods (`lazy_method` field)
-`scripts/parse_html.py` classifies each image's lazy-loading mechanism via the
+`claude-seo run parse_html.py` classifies each image's lazy-loading mechanism via the
`lazy_method` field on every image entry. Five values:
| `lazy_method` | Signal detected | Common stack |
diff --git a/skills/seo-local/SKILL.md b/skills/seo-local/SKILL.md
index 85cd87c..bb162d2 100644
--- a/skills/seo-local/SKILL.md
+++ b/skills/seo-local/SKILL.md
@@ -13,7 +13,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-maps/SKILL.md b/skills/seo-maps/SKILL.md
index 29a1de3..e6eb77e 100644
--- a/skills/seo-maps/SKILL.md
+++ b/skills/seo-maps/SKILL.md
@@ -14,7 +14,7 @@ license: MIT
compatibility: "DataForSEO MCP for Tier 1+, Google Maps API for Tier 2"
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-page/SKILL.md b/skills/seo-page/SKILL.md
index 083bf21..0d9c829 100644
--- a/skills/seo-page/SKILL.md
+++ b/skills/seo-page/SKILL.md
@@ -10,7 +10,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-plan/SKILL.md b/skills/seo-plan/SKILL.md
index d788c6e..16fe209 100644
--- a/skills/seo-plan/SKILL.md
+++ b/skills/seo-plan/SKILL.md
@@ -11,7 +11,7 @@ argument-hint: "[business-type]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-programmatic/SKILL.md b/skills/seo-programmatic/SKILL.md
index 2c14f7e..fdb05b9 100644
--- a/skills/seo-programmatic/SKILL.md
+++ b/skills/seo-programmatic/SKILL.md
@@ -11,7 +11,7 @@ argument-hint: "[url or plan]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-schema/SKILL.md b/skills/seo-schema/SKILL.md
index 53e89e5..bb508e5 100644
--- a/skills/seo-schema/SKILL.md
+++ b/skills/seo-schema/SKILL.md
@@ -9,7 +9,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -66,7 +66,7 @@ See `schema/templates.json` for ready-to-use JSON-LD templates for these types.
- **Dataset**: Not discontinued; consumed by Google Dataset Search, with no Google Search rich-result surface. Don't advise removal as if it were killed.
### Still supported (do not flag):
-- QAPage (expanded comment-thread properties 2026-03-24), DiscussionForumPosting, Education Q&A (Quiz / `eduQuestionType=Flashcard`). For e-commerce, **hasAdultConsideration** (added 2026-05-22; value `https://schema.org/SexualContentConsideration`) is required for adult products.
+- QAPage (expanded comment-thread properties 2026-03-24), DiscussionForumPosting, Education Q&A (Quiz / `eduQuestionType=Flashcard`). For e-commerce, **hasAdultConsideration** (added 2026-05-20; value `https://schema.org/SexualContentConsideration`) is required for adult products. `Product.category` accepts `Text`, `CategoryCode`, or arrays mixing both.
## Generation
@@ -76,6 +76,8 @@ When generating schema for a page:
3. Generate valid JSON-LD with all required + recommended properties
4. Include only truthful, verifiable data. Use placeholders clearly marked for user to fill
5. Validate output before presenting
+6. For review markup, reject fake reviews and undisclosed incentivized reviews.
+ An incentive must be clearly and prominently disclosed on the page.
## Common Schema Templates
diff --git a/skills/seo-sitemap/SKILL.md b/skills/seo-sitemap/SKILL.md
index 7fd0e64..79fe5cd 100644
--- a/skills/seo-sitemap/SKILL.md
+++ b/skills/seo-sitemap/SKILL.md
@@ -9,7 +9,7 @@ argument-hint: "[url or generate]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
diff --git a/skills/seo-sxo/SKILL.md b/skills/seo-sxo/SKILL.md
index e7c0c93..337a3ce 100644
--- a/skills/seo-sxo/SKILL.md
+++ b/skills/seo-sxo/SKILL.md
@@ -13,7 +13,7 @@ license: MIT
metadata:
author: AgriciDaniel
original_author: "Florian Schmitz (Pro Hub Challenge)"
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -43,8 +43,8 @@ well-optimized it is.
### Step 1: Target Acquisition
-1. Fetch the target URL via `scripts/render_page.py --mode auto` (SPA-aware and SSRF-safe)
-2. Parse with `scripts/parse_html.py` to extract: title, H1, meta description,
+1. Fetch the target URL via `claude-seo run render_page.py <URL> --mode auto` (SPA-aware and SSRF-safe)
+2. Parse with `claude-seo run parse_html.py <URL>` to extract: title, H1, meta description,
headings hierarchy, word count, schema markup, CTAs, media elements
3. If no keyword provided, extract primary keyword from title tag + H1 overlap
4. Validate keyword is non-empty before proceeding
@@ -244,7 +244,7 @@ The SXO score is **separate** from the main SEO Health Score.
## Quality Checklist
Before delivering results, verify:
-- [ ] Target URL was fetched via `scripts/render_page.py --mode auto` (not raw curl/fetch)
+- [ ] Target URL was fetched via `claude-seo run render_page.py <URL> --mode auto` (not raw curl/fetch)
- [ ] Page type classification uses taxonomy from references
- [ ] At least 5 SERP results were analyzed
- [ ] User stories cite specific SERP signals as evidence
diff --git a/skills/seo-technical/SKILL.md b/skills/seo-technical/SKILL.md
index dd4f934..ab1f8ba 100644
--- a/skills/seo-technical/SKILL.md
+++ b/skills/seo-technical/SKILL.md
@@ -10,7 +10,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -30,6 +30,10 @@ metadata:
- Googlebot **fetch limits**: Googlebot fetches the first **2MB of HTML** and first **64MB of a PDF** (uncompressed; 15MB is the broader crawler-infra default). Long-standing, not a 2026 change, but inline base64 images, oversized inline CSS/JS, or bloated nav can push critical content/JSON-LD past the cap and out of the index. Keep key content + structured data within the first 2MB.
- Crawl rate **auto-adjusts** (backs off on 5xx/slow responses); there is **no manual crawl-rate control** (the legacy Search Console setting was removed Jan 2024). Influence crawling via sitemaps, server responsiveness, and robots controls.
- Google's canonical crawling/robots reference moved to **developers.google.com/crawling** (migrated 2025-11-20); IP-range files relocated to `/crawling/ipranges/` and `googlebot.json` was renamed `common-crawlers.json`.
+- AMP has no separate ranking advantage. Since 2026-07-01, Google Search sends
+ users directly to publisher-hosted AMP URLs, so do not recommend AMP Cache,
+ AMP Viewer, or signed exchange maintenance. Audit AMP against the same content,
+ action-parity, and quality requirements as other pages.
#### AI Crawler Management
@@ -76,6 +80,10 @@ Allow: /
### 2. Indexability
- Canonical tags: self-referencing, no conflicts with noindex
- Duplicate content: near-duplicates, parameter URLs, www vs non-www
+- Canonicalization fixes can take time: Google may retain corrected pages in a
+ duplicate cluster for **up to two weeks** while re-evaluating them. Do not
+ interpret an unchanged canonical immediately after a fix as proof that the
+ fix failed.
- Thin content: pages below minimum word counts per type
- Pagination: rel=next/prev or load-more pattern
- Hreflang: correct for multi-language/multi-region sites
@@ -159,8 +167,9 @@ Google now ships a Lighthouse **Agentic Browsing** category (default-on since
Lighthouse 13.3.0, Chrome 150+; buckets: agent-centric accessibility, CLS +
llms.txt, three WebMCP audits). It reports a **fractional pass-ratio (X of N),
not a 0-100 score**, keep that distinct from this skill's own Agent-UX 0-100
-heuristic below. The PSI REST API does not expose it; run via Lighthouse CLI
-`--only-categories=agentic-browsing`, DevTools, or the PSI web UI. See
+heuristic below. Lighthouse 13.4.1 re-enabled the category through the PSI API.
+It is also available through Lighthouse CLI with
+`--only-categories=agentic-browsing`, DevTools, and the PSI web UI. See
`references/agent-friendly-pages.md`.
### Audit command
@@ -176,9 +185,10 @@ The scanner outputs an Agent-UX score (0-100) plus itemized issues:
- Accessibility tree findings: total nodes, interactive nodes, unnamed
interactive elements, `role="generic"` ratio
-The accessibility-tree snapshot uses Playwright's
-`page.accessibility.snapshot(interesting_only=False)`. To capture the tree
-without scoring, use `claude-seo run render_page.py <url> --a11y-tree --json`.
+The accessibility-tree snapshot uses Chromium's
+`Accessibility.getFullAXTree` CDP command through Playwright. To capture the
+tree without scoring, use
+`claude-seo run render_page.py <url> --a11y-tree --json`.
Surface findings as **opportunities**, not failures; don't gate audits on a
sub-100 Agent-UX score. WebMCP origin-trial/sign-up status needs verification,
diff --git a/skills/seo-technical/references/agent-friendly-pages.md b/skills/seo-technical/references/agent-friendly-pages.md
index 281c7a3..1054928 100644
--- a/skills/seo-technical/references/agent-friendly-pages.md
+++ b/skills/seo-technical/references/agent-friendly-pages.md
@@ -123,10 +123,10 @@ into three buckets:
- **WebMCP integration** — three audits, see below.
**Run paths:** DevTools Lighthouse panel (Chrome 150+, default-on, no toggle);
-CLI `npx lighthouse@latest <url> --only-categories=agentic-browsing` (per-audit
-JSON for CI); PageSpeed Insights **web UI**. **The PSI REST API does NOT return
-this category** — `scripts/pagespeed_check.py` will not contain agentic results
-(disabled in Lighthouse 13.4.0); CrUX never provides these lab audits.
+CLI `npx lighthouse@latest <url> --only-categories=agentic-browsing` (Node.js
+22.19+, per-audit JSON for CI); PageSpeed Insights web UI and API. Lighthouse
+13.4.1 enabled the category through the PSI API after 13.4.0 had disabled it.
+CrUX never provides these lab audits.
## WebMCP (proposed standard; status needs recheck)
@@ -165,16 +165,16 @@ Chrome DevTools and look for:
- Any `<div>` with `onclick` and no `role` / `tabindex` → custom widget that
agents won't see.
-`scripts/render_page.py --mode auto` already loads pages headlessly; extending
-it with an accessibility-tree dump (`page.accessibility.snapshot()` in
-Playwright) is the natural place to land an automated agent-UX check in a
-future iteration.
+`claude-seo run render_page.py <URL> --mode auto --a11y-tree --json` loads the
+page headlessly and captures Chromium's full accessibility tree through CDP.
+Use `claude-seo run agent_ux_check.py <URL> --json` for the bounded Agent-UX
+heuristic and its explicit complete, partial, or unavailable score status.
## Last verified
-2026-06-21. (Google has now published an agent-UX scoring framework — the
-Lighthouse Agentic Browsing category — and WebMCP has reached a public Chrome
-149 origin trial; both are reflected above.) Update when:
+2026-08-25. Google has published the Lighthouse Agentic Browsing framework,
+Lighthouse 13.4.1 exposes it through the PSI API, and the local renderer now
+captures the Chromium accessibility tree through CDP. Update when:
- WebMCP graduates from origin trial to a stable/shipped API (or W3C status changes).
- Google adds or renames audits in the `agentic-browsing` category.
diff --git a/skills/seo/SKILL.md b/skills/seo/SKILL.md
index 1a77062..92e22e9 100644
--- a/skills/seo/SKILL.md
+++ b/skills/seo/SKILL.md
@@ -6,7 +6,7 @@ argument-hint: "[command] [url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "2.2.4"
+ version: "2.2.5"
category: seo
---
@@ -87,7 +87,7 @@ When the user invokes `/seo audit`, delegate to subagents in parallel:
15. **Offer PDF report**: "Generate a professional PDF report? Use `/seo google report full`"
For individual commands, load the relevant sub-skill directly.
-After any analysis command completes, offer to generate a PDF report via `scripts/google_report.py`.
+After any analysis command completes, offer to generate a PDF report via `claude-seo run google_report.py`.
## Synthesis Methodology
diff --git a/skills/seo/references/cwv-thresholds.md b/skills/seo/references/cwv-thresholds.md
index 2eded12..44f60bd 100644
--- a/skills/seo/references/cwv-thresholds.md
+++ b/skills/seo/references/cwv-thresholds.md
@@ -101,7 +101,7 @@ npx lighthouse URL --output json --output-path report.json
## Performance Tooling Updates (2025-2026)
-- **Lighthouse 13.4.0** (June 2026, latest stable): Lighthouse 13.0 (Oct 2025) migrated performance audits to **insight-based audits** aligned with the DevTools Performance panel and removed legacy audits (first-meaningful-paint, font-size, third-party-facades) — the performance *score* is metric-based and was **not** re-weighted. 13.2.0–13.3.0 added and default-enabled a new **Agentic Browsing** category (Chrome 150+; fractional pass-ratio — see `agent-friendly-pages.md`); 13.4.0 disabled it in the PSI REST API. Lighthouse is a lab tool (simulated conditions): always cross-reference with CrUX field data.
+- **Lighthouse 13.4.1** (July 2026, latest stable): Lighthouse 13.0 (Oct 2025) migrated performance audits to **insight-based audits** aligned with the DevTools Performance panel and removed legacy audits (first-meaningful-paint, font-size, third-party-facades). The performance *score* remains metric-based and was **not** re-weighted. 13.2.0-13.3.0 added and default-enabled a new **Agentic Browsing** category (Chrome 150+; fractional pass-ratio, see `agent-friendly-pages.md`). Version 13.4.1 enabled it through the PSI API and requires Node.js 22.19 or newer for the CLI. Lighthouse is a lab tool (simulated conditions): always cross-reference with CrUX field data.
- **PSI / PSI API v5** run Lighthouse 13.x (updated 2025-10-20). The **PWA category was removed in Lighthouse 12** — do not parse a `pwa` category. Mobile lab **CPU throttling was increased on 2024-12-05** (higher mobile lab TBT since then; field/desktop unaffected — do not compare mobile lab TBT across that boundary).
- **CrUX Vis** replaced the CrUX Dashboard (Looker Studio), which was **shut down at end of November 2025** (October 2025 was its final dataset; the CrUX Connector is no longer updated). Use [CrUX Vis](https://cruxvis.withgoogle.com) or the CrUX API directly.
- **LCP subparts** added to CrUX (February 2025): Time to First Byte (TTFB), resource load delay, resource load time, and element render delay are now available as sub-components of LCP in CrUX data.
diff --git a/skills/seo/references/free-backlink-sources.md b/skills/seo/references/free-backlink-sources.md
index 4b14b86..55aa2f7 100644
--- a/skills/seo/references/free-backlink-sources.md
+++ b/skills/seo/references/free-backlink-sources.md
@@ -41,7 +41,7 @@ When only Common Crawl is available, cap the maximum health score at 70/100 and
- **Signup:** https://moz.com/products/api (credit card required, not charged)
- **Data:** Domain Authority (0-100), Page Authority, Spam Score (1-17%), link counts,
referring domains, anchor text distribution
-- **Script:** `scripts/moz_api.py`
+- **Command:** `claude-seo run moz_api.py`
- **Commands:** `metrics`, `domains`, `anchors`, `pages`
- **Blind spots:** No link velocity, no toxic link patterns beyond Spam Score,
3-day update lag, smaller index than Ahrefs/Semrush
@@ -54,7 +54,7 @@ When only Common Crawl is available, cap the maximum health score at 70/100 and
are accessible to the same API account
- **Data:** Inbound-link source URL, target URL, anchor text, sampled link
counts, and referring-domain comparison totals
-- **Script:** `scripts/bing_webmaster.py`
+- **Command:** `claude-seo run bing_webmaster.py`
- **Commands:** `links`, `counts`, `compare` (comparison requires both
properties to be registered to the same API account)
- **Blind spots:** Only Bing-indexed pages (~15% of web), verified sites only,
@@ -65,7 +65,7 @@ When only Common Crawl is available, cap the maximum health score at 70/100 and
- **Releases:** Quarterly (e.g., cc-main-2025-18)
- **No auth needed:** Public data, free to download
- **Data:** Domain-level in-degree, PageRank, harmonic centrality, referring domains
-- **Script:** `scripts/commoncrawl_graph.py`
+- **Command:** `claude-seo run commoncrawl_graph.py`
- **Cache:** `~/.cache/claude-seo/commoncrawl/` (90-day TTL)
- **Blind spots:** No anchor text, no page-level data, monthly/quarterly freshness,
domain-level only (e.g., "nytimes.com links to example.com" but not which page)
@@ -73,7 +73,7 @@ When only Common Crawl is available, cap the maximum health score at 70/100 and
### Verification Crawler (Always Available)
- **No auth needed:** Uses existing fetch_page.py + parse_html.py
- **Data:** Binary verification (link exists/lost/moved), anchor text, rel attributes
-- **Script:** `scripts/verify_backlinks.py`
+- **Command:** `claude-seo run verify_backlinks.py`
- **Input:** JSON file with `[{"source_url": "..."}]` entries
- **Polite crawling:** 1-second delay between requests to same domain
- **Best for:** Checking if known backlinks still exist, monitoring link health
diff --git a/skills/seo/references/schema-types.md b/skills/seo/references/schema-types.md
index 3a67db2..2cb3ea5 100644
--- a/skills/seo/references/schema-types.md
+++ b/skills/seo/references/schema-types.md
@@ -96,6 +96,8 @@ Google's documentation explicitly recommends JSON-LD over Microdata and RDFa.
| ConferenceEvent | December 2025 | Schema.org v29.4 addition |
| PerformingArtsEvent | December 2025 | Schema.org v29.4 addition |
| hasAdultConsideration | 2026-05-20 | Product variant / Merchant listing; **required for adult-oriented products**; Google Search supports only `https://schema.org/SexualContentConsideration` |
+| Product.category | 2026-07-07 | Accepts `Text`, `CategoryCode`, or arrays mixing both; use Google's taxonomy URL and `codeValue` for Google Product Categories |
+| Offer sale duration | 2026-07-07 | Use `validFrom` plus `validThrough` or `priceValidUntil`, in ISO 8601 format |
| QAPage / DiscussionForumPosting comment-thread props | 2026-03-24 | New supported properties for comment-thread structure |
| Education Q&A (Quiz / eduQuestionType=Flashcard) | 2026 | Active rich result; carousel expanded to more languages |
diff --git a/skills/seo/references/thinking-framework.md b/skills/seo/references/thinking-framework.md
index 95301d8..f56bf05 100644
--- a/skills/seo/references/thinking-framework.md
+++ b/skills/seo/references/thinking-framework.md
@@ -25,12 +25,12 @@ not a recommendation.
Collect signals without interpreting them. For a website audit this means:
-- Raw HTML + rendered HTML (via `scripts/render_page.py`)
+- Raw HTML + rendered HTML (via `claude-seo run render_page.py`)
- Schema.org markup actually present (via `seo-schema`)
- SERP visibility for the site's published topics (via `seo-dataforseo` /
Google APIs when available)
- Backlink + brand-mention landscape (via `seo-backlinks`)
-- Core Web Vitals field data from CrUX (via `scripts/pagespeed_check.py`)
+- Core Web Vitals field data from CrUX (via `claude-seo run pagespeed_check.py`)
- AI-search citation patterns (via `seo-geo`)
- Competitor pages on the target's primary keywords
@@ -185,7 +185,7 @@ Stop strategizing. Produce the artifact:
measurable outcomes.
- Generated schema JSON-LD ready to paste into the site.
- A content brief with target keywords, outline, and internal links.
-- A PDF via `scripts/google_report.py` when the user asks for one.
+- A PDF via `claude-seo run google_report.py` when the user asks for one.
- The smallest implementation of the highest-leverage recommendation,
not the full plan.
diff --git a/tests/test_consistency_check.py b/tests/test_consistency_check.py
index dab475a..a0f23b6 100644
--- a/tests/test_consistency_check.py
+++ b/tests/test_consistency_check.py
@@ -8,8 +8,10 @@ basename-level checking had masked.
"""
import json
import os
+import re
import subprocess
import sys
+from pathlib import Path
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SCRIPT = os.path.join(REPO, "scripts", "consistency_check.py")
@@ -31,3 +33,14 @@ def test_no_consistency_errors():
def test_checker_scans_whole_tree():
_, result = run_checker()
assert result["files_checked"] > 300
+
+
+def test_user_facing_markdown_has_no_raw_core_script_paths():
+ pattern = re.compile(r"(?<![\w/])scripts/([A-Za-z0-9_]+\.py)\b")
+ root = Path(REPO)
+ offenders = []
+ for top in ("skills", "agents", "extensions"):
+ for path in (root / top).rglob("*.md"):
+ for match in pattern.finditer(path.read_text(encoding="utf-8")):
+ offenders.append(f"{path.relative_to(root)}: scripts/{match.group(1)}")
+ assert offenders == [], "raw bundled script paths:\n" + "\n".join(offenders)
diff --git a/tests/test_content_quality.py b/tests/test_content_quality.py
index ce5d518..220e75d 100644
--- a/tests/test_content_quality.py
+++ b/tests/test_content_quality.py
@@ -16,7 +16,9 @@ from __future__ import annotations
import json
import os
import sys
+from datetime import date
from pathlib import Path
+from urllib.parse import urlsplit
import pytest
@@ -24,12 +26,11 @@ _SCRIPTS = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__
if _SCRIPTS not in sys.path:
sys.path.insert(0, _SCRIPTS)
-import content_quality # noqa: E402
import content_humanize # noqa: E402
+import content_quality # noqa: E402
import content_verify # noqa: E402
import seo_updates # noqa: E402
-
# ---------------------------------------------------------------------------
# content_quality
# ---------------------------------------------------------------------------
@@ -230,20 +231,66 @@ def test_seo_updates_every_entry_has_google_owned_source() -> None:
data_path = Path(__file__).resolve().parents[1] / "data" / "google-updates.json"
with data_path.open() as fh:
data = json.load(fh)
- google_hosts = (
+ google_hosts = {
"developers.google.com",
"blog.google",
"status.search.google.com",
"web.dev",
"services.google.com",
"support.google.com",
- )
+ }
for entry in data["updates"]:
url = entry.get("source", "")
- assert any(host in url for host in google_hosts), (
+ parsed = urlsplit(url)
+ assert parsed.scheme == "https"
+ assert parsed.hostname in google_hosts, (
f"{entry['name']!r} cites non-Google URL: {url}. "
"Move third-party-only entries to unverified[]."
)
+ assert parsed.username is None and parsed.password is None
+
+
+def test_seo_updates_schema_and_order_are_enforced() -> None:
+ data_path = Path(__file__).resolve().parents[1] / "data" / "google-updates.json"
+ with data_path.open(encoding="utf-8") as fh:
+ data = json.load(fh)
+
+ allowed_kinds = {
+ "core",
+ "spam",
+ "core+spam",
+ "policy",
+ "qrg",
+ "product",
+ "schema",
+ "cwv",
+ "discover",
+ "documentation",
+ }
+ updates = data["updates"]
+ dates = [entry["date"] for entry in updates]
+ names = [entry["name"] for entry in updates]
+
+ assert dates == sorted(dates), "updates[] must be chronological"
+ assert len(names) == len(set(names)), "update names must be unique"
+ assert all(entry["kind"] in allowed_kinds for entry in updates)
+ assert all(entry.get("notes", "").strip() for entry in updates)
+ assert all(date.fromisoformat(value) for value in dates)
+
+ verified = date.fromisoformat(data["last_verified"])
+ assert verified >= date.fromisoformat(dates[-1])
+ assert verified <= date.today()
+
+
+def test_seo_updates_primary_ledger_does_not_embed_third_party_sources() -> None:
+ data_path = Path(__file__).resolve().parents[1] / "data" / "google-updates.json"
+ with data_path.open(encoding="utf-8") as fh:
+ data = json.load(fh)
+
+ for entry in data["updates"]:
+ assert "third_party_sources" not in entry
+ assert "unconfirmed" not in entry["notes"].lower()
+ assert "reported" not in entry["notes"].lower()
def test_seo_updates_unverified_entries_call_out_status() -> None:
diff --git a/tests/test_manual_install_layout.py b/tests/test_manual_install_layout.py
new file mode 100644
index 0000000..96ce8fa
--- /dev/null
+++ b/tests/test_manual_install_layout.py
@@ -0,0 +1,35 @@
+"""Manual installers must preserve the runtime's repository-relative layout."""
+
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def _text(relative: str) -> str:
+ return (ROOT / relative).read_text(encoding="utf-8")
+
+
+def test_bash_installer_copies_google_update_data_beside_scripts() -> None:
+ installer = _text("install.sh")
+ assert 'mkdir -p "${SKILL_DIR}/data"' in installer
+ assert (
+ 'cp -r "${TEMP_DIR}/claude-seo/data/"* "${SKILL_DIR}/data/"'
+ in installer
+ )
+
+
+def test_powershell_installer_copies_google_update_data_beside_scripts() -> None:
+ installer = _text("install.ps1")
+ assert '$DataPath = "$TempDir\\data"' in installer
+ assert '$SkillData = "$SkillDir\\data"' in installer
+ assert 'Copy-Item -Recurse -Force "$DataPath\\*" $SkillData' in installer
+
+
+def test_runtime_import_validation_requires_html_clean_split_package() -> None:
+ runtime = _text("scripts/runtime.py")
+ assert "import bs4, lxml, lxml_html_clean, playwright, requests, trafilatura" in runtime
+
+
+def test_google_updates_data_exists_at_installed_relative_path() -> None:
+ assert (ROOT / "data" / "google-updates.json").is_file()
+ assert (ROOT / "scripts" / "seo_updates.py").is_file()
diff --git a/tests/test_phase_j_executable.py b/tests/test_phase_j_executable.py
index 730b533..95b3bde 100644
--- a/tests/test_phase_j_executable.py
+++ b/tests/test_phase_j_executable.py
@@ -17,8 +17,6 @@ import sys
from pathlib import Path
from unittest import mock
-import pytest
-
_REPO_ROOT = Path(__file__).resolve().parents[1]
_SCRIPTS = _REPO_ROOT / "scripts"
if str(_SCRIPTS) not in sys.path:
@@ -29,7 +27,6 @@ import iptc_ai_label # noqa: E402
import render_page # noqa: E402
import ucp_check # noqa: E402
-
# ---------------------------------------------------------------------------
# ucp_check
# ---------------------------------------------------------------------------
@@ -243,6 +240,47 @@ def test_analyze_accessibility_tree_handles_none_input():
assert findings["total_nodes"] == 0
+def test_agent_ux_rejects_empty_rendered_document(monkeypatch):
+ monkeypatch.setattr(
+ agent_ux_check,
+ "render_page",
+ lambda *_args, **_kwargs: {
+ "url": "https://empty.example/",
+ "status_code": 200,
+ "error": None,
+ "content": "<html><head></head><body></body></html>",
+ "accessibility_tree": None,
+ "accessibility_error": "no nodes",
+ "accessibility_partial": True,
+ },
+ )
+ report = agent_ux_check.audit("https://empty.example/")
+ assert report["score"] is None
+ assert report["score_status"] == "unavailable"
+ assert "no meaningful body content" in report["render_error"]
+
+
+def test_agent_ux_labels_missing_accessibility_tree_as_partial(monkeypatch):
+ monkeypatch.setattr(
+ agent_ux_check,
+ "render_page",
+ lambda *_args, **_kwargs: {
+ "url": "https://partial.example/",
+ "status_code": 200,
+ "error": None,
+ "content": "<html><body><main>Useful content</main></body></html>",
+ "accessibility_tree": None,
+ "accessibility_error": "CDP unavailable",
+ "accessibility_partial": True,
+ },
+ )
+ report = agent_ux_check.audit("https://partial.example/")
+ assert report["score"] is not None
+ assert report["score_status"] == "partial"
+ assert report["partial"] is True
+ assert report["partial_reasons"] == ["CDP unavailable"]
+
+
def test_analyze_accessibility_tree_counts_roles_and_names():
tree = {
"role": "WebArea",
diff --git a/tests/test_pyproject_metadata.py b/tests/test_pyproject_metadata.py
index 1bc08e0..07c36b3 100644
--- a/tests/test_pyproject_metadata.py
+++ b/tests/test_pyproject_metadata.py
@@ -5,7 +5,6 @@ from __future__ import annotations
import re
from pathlib import Path
-
REPO_ROOT = Path(__file__).resolve().parents[1]
@@ -31,6 +30,7 @@ def test_pyproject_has_minimal_ruff_config_only() -> None:
def test_requirements_accept_selected_security_compatibility_floors() -> None:
text = (REPO_ROOT / "requirements.txt").read_text(encoding="utf-8")
assert re.search(r"^lxml>=6\.1\.1,<7\.0\.0", text, re.MULTILINE)
+ assert re.search(r"^lxml_html_clean>=0\.4\.3,<1\.0\.0", text, re.MULTILINE)
assert re.search(r"^urllib3>=2\.7\.0,<3\.0\.0", text, re.MULTILINE)
assert re.search(r"^numpy>=1\.26\.0,<3\.0\.0", text, re.MULTILINE)
assert re.search(r"^google-auth-httplib2>=0\.4\.0,<1\.0\.0", text, re.MULTILINE)
diff --git a/tests/test_render_page.py b/tests/test_render_page.py
index a494094..9c34c35 100644
--- a/tests/test_render_page.py
+++ b/tests/test_render_page.py
@@ -32,7 +32,6 @@ if _SCRIPTS not in sys.path:
import render_page # noqa: E402
-
# ---------------------------------------------------------------------------
# _is_spa: SPA shell detector
# ---------------------------------------------------------------------------
@@ -104,6 +103,29 @@ def test_is_spa_does_not_render_complete_builder_page() -> None:
assert render_page._is_spa(html) is False
+ "marker",
+ (
+ '<div id="root">',
+ '<div id="__next">',
+ '<div id="app">',
+ '<div id="__nuxt">',
+ '<main data-svelte-h="abc">',
+ '<astro-island uid="x">',
+ ),
+)
+def test_is_spa_does_not_flag_complete_server_rendered_framework_page(
+ marker: str,
+) -> None:
+ html = (
+ "<html><body>"
+ + marker
+ + ("Complete server-rendered product details and specifications. " * 12)
+ + "</main></div></astro-island></body></html>"
+ )
+ assert render_page._is_spa(html) is False
+
+
def test_is_spa_ignores_large_inline_script_as_visible_text() -> None:
html = (
"<html><body><script>"
@@ -285,7 +307,6 @@ class _FakeBrowserPage(_StabilityPage):
self.navigation_timeout = navigation_timeout
self.goto_options = None
self.url = "https://app.example/"
- self.accessibility = SimpleNamespace(snapshot=lambda **_kwargs: None)
def on(self, *_args):
return None
@@ -306,8 +327,40 @@ class _FakeBrowserPage(_StabilityPage):
class _FakePlaywrightManager:
def __init__(self, page):
+ class _Session:
+ def __init__(self):
+ self.commands = []
+
+ def send(self, method, params=None):
+ self.commands.append((method, params))
+ if method == "Accessibility.getFullAXTree":
+ return {
+ "nodes": [
+ {
+ "nodeId": "1",
+ "role": {"value": "RootWebArea"},
+ "name": {"value": "Example"},
+ "childIds": ["2"],
+ },
+ {
+ "nodeId": "2",
+ "parentId": "1",
+ "role": {"value": "button"},
+ "name": {"value": "Submit"},
+ },
+ ]
+ }
+ return {}
+
+ def detach(self):
+ return None
+
+ context = SimpleNamespace(
+ new_page=lambda: page,
+ new_cdp_session=lambda _page: _Session(),
+ )
browser = SimpleNamespace(
- new_context=lambda **_kwargs: SimpleNamespace(new_page=lambda: page),
+ new_context=lambda **_kwargs: context,
close=lambda: None,
)
self.playwright = SimpleNamespace(
@@ -321,12 +374,17 @@ class _FakePlaywrightManager:
return False
-def _render_with_fake_browser(page):
+def _render_with_fake_browser(page, *, extract_accessibility=False):
spa_html = '<html><body><div id="root"></div></body></html>'
with patch.object(render_page, "validate_url_strict", side_effect=_mock_validate_strict), \
patch.object(render_page, "safe_requests_get", return_value=_fake_response(spa_html)), \
patch.object(render_page, "sync_playwright", lambda: _FakePlaywrightManager(page)):
- return render_page.render_page("https://app.example/", mode="auto", timeout_ms=1000)
+ return render_page.render_page(
+ "https://app.example/",
+ mode="auto",
+ timeout_ms=1000,
+ extract_accessibility=extract_accessibility,
+ )
def test_render_uses_domcontentloaded_for_persistent_socket_pages() -> None:
@@ -348,6 +406,34 @@ def test_render_navigation_timeout_returns_degraded_dom() -> None:
assert any("DOMContentLoaded timed out" in item for item in result["render_diagnostics"])
+def test_render_captures_accessibility_tree_through_cdp() -> None:
+ page = _FakeBrowserPage([(200, 20), (200, 20), (200, 20)])
+ result = _render_with_fake_browser(page, extract_accessibility=True)
+ assert result["accessibility_error"] is None
+ assert result["accessibility_partial"] is False
+ assert result["accessibility_tree"]["role"] == "RootWebArea"
+ assert result["accessibility_tree"]["children"][0] == {
+ "role": "button",
+ "name": "Submit",
+ "ignored": False,
+ }
+
+
+def test_render_surfaces_accessibility_capture_failure() -> None:
+ page = _FakeBrowserPage([(200, 20), (200, 20), (200, 20)])
+ with patch.object(
+ render_page,
+ "_capture_accessibility_tree",
+ side_effect=RuntimeError("CDP unavailable"),
+ ):
+ result = _render_with_fake_browser(page, extract_accessibility=True)
+ assert result["error"] is None
+ assert result["accessibility_tree"] is None
+ assert result["accessibility_partial"] is True
+ assert "CDP unavailable" in result["accessibility_error"]
+ assert result["accessibility_error"] in result["render_diagnostics"]
+
+
def test_render_page_auto_stays_raw_for_static_html() -> None:
"""auto mode + non-SPA raw HTML → no Playwright invocation."""
rich_html = "<html><body>" + ("hello world. " * 20) + "</body></html>"
@@ -457,7 +543,118 @@ def test_render_page_result_dict_has_all_documented_fields() -> None:
expected_fields = {
"url", "status_code", "content", "raw_content", "is_spa",
"extracted_text", "publication_date", "accessibility_tree",
+ "accessibility_error", "accessibility_partial",
"headers", "redirect_chain", "console_errors", "render_engine",
"render_diagnostics", "render_ms", "mode_used", "error",
}
assert set(result.keys()) == expected_fields
+
+
+def test_cdp_accessibility_nodes_are_bounded_and_rebuilt(monkeypatch) -> None:
+ monkeypatch.setattr(render_page, "ACCESSIBILITY_MAX_NODES", 2)
+ nodes = [
+ {
+ "nodeId": "1",
+ "role": {"value": "RootWebArea"},
+ "name": {"value": "Page"},
+ "childIds": ["2", "3"],
+ },
+ {
+ "nodeId": "2",
+ "parentId": "1",
+ "role": {"value": "link"},
+ "name": {"value": "Home"},
+ },
+ {
+ "nodeId": "3",
+ "parentId": "1",
+ "role": {"value": "button"},
+ "name": {"value": "Buy"},
+ },
+ ]
+ tree, partial = render_page._accessibility_tree_from_cdp(nodes)
+ assert partial is True
+ assert tree["children"] == [
+ {"role": "link", "name": "Home", "ignored": False}
+ ]
+
+
+def test_cdp_detach_failure_does_not_discard_captured_tree() -> None:
+ class Session:
+ def send(self, method: str, _params: object = None) -> dict:
+ if method == "Accessibility.getFullAXTree":
+ return {
+ "nodes": [
+ {
+ "nodeId": "1",
+ "role": {"value": "RootWebArea"},
+ "name": {"value": "Page"},
+ }
+ ]
+ }
+ return {}
+
+ def detach(self) -> None:
+ raise RuntimeError("already detached")
+
+ class Context:
+ def new_cdp_session(self, _page: object) -> Session:
+ return Session()
+
+ tree, partial = render_page._capture_accessibility_tree(Context(), object())
+ assert tree == {"role": "RootWebArea", "name": "Page", "ignored": False}
+ assert partial is False
+
+
+def test_json_summary_is_full_by_default_and_explicit_when_bounded() -> None:
+ result = {
+ "content": "c" * 12,
+ "raw_content": "r" * 8,
+ "extracted_text": "word " * 5,
+ }
+ full = render_page._json_summary(result)
+ assert full["content"] == result["content"]
+ assert full["truncation"]["limit"] is None
+ assert full["truncation"]["fields"]["content"]["truncated"] is False
+
+ bounded = render_page._json_summary(result, max_text=5)
+ assert bounded["content"] == "ccccc"
+ assert bounded["extracted_text"] == "word "
+ assert bounded["truncation"]["fields"]["content"] == {
+ "original_chars": 12,
+ "returned_chars": 5,
+ "truncated": True,
+ }
+
+
+def test_json_and_output_are_composable(tmp_path, monkeypatch, capsys) -> None:
+ output = tmp_path / "rendered.html"
+ result = {
+ "url": "https://example.test/",
+ "content": "<html><body>complete output</body></html>",
+ "raw_content": "<html></html>",
+ "extracted_text": "complete output",
+ "error": None,
+ }
+ monkeypatch.setattr(render_page, "render_page", lambda *_args, **_kwargs: result)
+ monkeypatch.setattr(
+ sys,
+ "argv",
+ [
+ "render_page.py",
+ "https://example.test/",
+ "--json",
+ "--max-text",
+ "8",
+ "--output",
+ str(output),
+ ],
+ )
+ with pytest.raises(SystemExit) as exc:
+ render_page._cli()
+ assert exc.value.code == 0
+ payload = json.loads(capsys.readouterr().out)
+ assert payload["output_written"] is True
+ assert payload["content"] == "<html><b"
+ assert payload["truncation"]["fields"]["content"]["truncated"] is True
+ assert output.read_text(encoding="utf-8") == result["content"]
diff --git a/tests/test_schema_hook_policy.py b/tests/test_schema_hook_policy.py
index 49b45d3..ecc6fd3 100644
--- a/tests/test_schema_hook_policy.py
+++ b/tests/test_schema_hook_policy.py
@@ -7,6 +7,8 @@ confirmed. Genuinely deprecated types must still block the edit (exit 2).
from __future__ import annotations
+import json
+import os
import subprocess
import sys
from pathlib import Path
@@ -26,9 +28,98 @@ def _run(tmp_path: Path, schema_type: str, extra: str = "") -> int:
return subprocess.run([sys.executable, str(HOOK), str(html)]).returncode
+def _run_payload(tmp_path: Path, payload: object, **kwargs: object) -> subprocess.CompletedProcess:
+ html = tmp_path / "payload.html"
+ html.write_text(
+ '<html><head><script type="application/ld+json">'
+ + json.dumps(payload, ensure_ascii=False)
+ + "</script></head></html>",
+ encoding="utf-8",
+ )
+ return subprocess.run([sys.executable, str(HOOK), str(html)], **kwargs)
+
+
def test_faqpage_not_blocked(tmp_path):
assert _run(tmp_path, "FAQPage") == 0
def test_deprecated_type_still_blocks(tmp_path):
assert _run(tmp_path, "ClaimReview") == 2
+
+
+def test_valid_top_level_graph_does_not_require_container_type(tmp_path: Path) -> None:
+ payload = {
+ "@context": "https://schema.org",
+ "@graph": [
+ {"@type": "Organization", "name": "Example"},
+ {"@type": "WebSite", "name": "Example"},
+ ],
+ }
+ assert _run_payload(tmp_path, payload).returncode == 0
+
+
+def test_graph_members_inherit_context_but_still_require_type(tmp_path: Path) -> None:
+ payload = {
+ "@context": "https://schema.org",
+ "@graph": [{"name": "Missing type"}],
+ }
+ result = _run_payload(tmp_path, payload, capture_output=True, text=True)
+ assert result.returncode == 1
+ assert "Missing @type" in result.stdout
+ assert "Missing @context" not in result.stdout
+
+
+def test_deprecated_graph_member_still_blocks(tmp_path: Path) -> None:
+ payload = {
+ "@context": "https://schema.org",
+ "@graph": [{"@type": "ClaimReview", "name": "Old markup"}],
+ }
+ assert _run_payload(tmp_path, payload).returncode == 2
+
+
+def test_non_object_graph_members_are_reported_without_crashing(tmp_path: Path) -> None:
+ payload = {
+ "@context": "https://schema.org",
+ "@graph": ["not-a-node", 42],
+ }
+ result = _run_payload(tmp_path, payload, capture_output=True, text=True)
+ assert result.returncode == 1
+ assert "@graph member 1 must be an object" in result.stdout
+ assert "@graph member 2 must be an object" in result.stdout
+
+
+def test_graph_must_be_a_list(tmp_path: Path) -> None:
+ payload = {
+ "@context": "https://schema.org",
+ "@graph": {"@type": "Organization"},
+ }
+ result = _run_payload(tmp_path, payload, capture_output=True, text=True)
+ assert result.returncode == 1
+ assert "@graph must be a list" in result.stdout
+
+
+def test_replace_placeholder_matches_tokens_not_normal_words(tmp_path: Path) -> None:
+ safe = {
+ "@context": "https://schema.org",
+ "@type": "Product",
+ "name": "Replacement coils",
+ "description": "Replace the filter yearly",
+ }
+ assert _run_payload(tmp_path, safe).returncode == 0
+
+ for value in ("REPLACE", "REPLACE_TITLE"):
+ blocked = {**safe, "name": value}
+ assert _run_payload(tmp_path, blocked).returncode == 2
+
+
+def test_hook_diagnostics_do_not_crash_under_cp1252(tmp_path: Path) -> None:
+ payload = {
+ "@context": "https://schema.org",
+ "@type": "ClaimReview",
+ "name": "Crème brûlée",
+ }
+ env = os.environ.copy()
+ env["PYTHONIOENCODING"] = "cp1252"
+ result = _run_payload(tmp_path, payload, env=env, capture_output=True)
+ assert result.returncode == 2
+ assert b"UnicodeEncodeError" not in result.stderr
diff --git a/tests/test_schema_v2.py b/tests/test_schema_v2.py
index 52a06cf..2074a28 100644
--- a/tests/test_schema_v2.py
+++ b/tests/test_schema_v2.py
@@ -15,15 +15,12 @@ import json
import os
import sys
-import pytest
-
_SCRIPTS = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "scripts")
if _SCRIPTS not in sys.path:
sys.path.insert(0, _SCRIPTS)
-import schema_generate # noqa: E402
import schema_ecommerce_validate as ev # noqa: E402
-
+import schema_generate # noqa: E402
# ---------------------------------------------------------------------------
# schema_generate
@@ -215,6 +212,22 @@ def test_validate_summary_counts_severities() -> None:
assert sum(s.values()) == len(result["findings"])
+def test_product_template_includes_current_category_and_sale_fields() -> None:
+ from pathlib import Path
+
+ template_path = Path(__file__).resolve().parents[1] / "schema" / "templates.json"
+ payload = json.loads(template_path.read_text(encoding="utf-8"))
+ product = next(
+ item["template"]
+ for item in payload["templates"]
+ if item["type"] == "Product (Full E-commerce)"
+ )
+
+ assert "category" in product
+ assert "validFrom" in product["offers"]
+ assert "priceValidUntil" in product["offers"]
+
+
# ---------------------------------------------------------------------------
# deprecated-types reference file
# ---------------------------------------------------------------------------