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.

feat: v1.9.0 Pro Hub Challenge community integration

Daniel259179391ce1
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 3ad4c69..29aad51 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -11,7 +11,7 @@
{
"name": "claude-seo",
"source": "./",
- "description": "Comprehensive SEO analysis skill for Claude Code. 19 sub-skills covering technical SEO, E-E-A-T, schema markup, GEO/AEO, backlinks, local SEO, maps intelligence, Google API integration (GSC, PageSpeed, CrUX, GA4), and PDF/Excel reporting."
+ "description": "Comprehensive SEO analysis skill for Claude Code. 20 core sub-skills covering technical SEO, E-E-A-T, schema markup, image optimization, GEO/AEO, backlinks, local SEO, maps intelligence, semantic topic clustering, SXO, SEO drift monitoring, e-commerce SEO, international SEO with cultural profiles, Google API integration, and PDF reporting."
}
]
}
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index ada725e..01c5769 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "claude-seo",
- "version": "1.8.2",
- "description": "Comprehensive SEO analysis skill for Claude Code. Covers technical SEO, content quality (E-E-A-T), schema markup, image optimization, sitemap architecture, AI search optimization (GEO), local SEO (GBP, citations, reviews, map pack), maps intelligence, and strategic planning across all industries.",
+ "version": "1.9.0",
+ "description": "Comprehensive SEO analysis skill for Claude Code. 20 core sub-skills covering technical SEO, content quality (E-E-A-T), schema markup, image optimization, sitemap architecture, AI search optimization (GEO), local SEO, maps intelligence, semantic topic clustering, search experience optimization (SXO), SEO drift monitoring, e-commerce SEO, international SEO with cultural profiles, and strategic planning across all industries.",
"author": {
"name": "AgriciDaniel",
"url": "https://github.com/AgriciDaniel"
@@ -32,6 +32,15 @@
"moz",
"bing-webmaster",
"common-crawl",
- "backlink-verification"
+ "backlink-verification",
+ "semantic-clustering",
+ "topic-clusters",
+ "sxo",
+ "search-experience",
+ "drift-monitoring",
+ "ecommerce-seo",
+ "google-shopping",
+ "cultural-profiles",
+ "content-parity"
]
}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 45a263e..4c90b31 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,4 +41,11 @@ jobs:
python3 -m py_compile scripts/commoncrawl_graph.py
python3 -m py_compile scripts/verify_backlinks.py
python3 -m py_compile scripts/validate_backlink_report.py
- echo "All 21 scripts passed syntax check"
+ python3 -m py_compile scripts/dataforseo_costs.py
+ python3 -m py_compile scripts/dataforseo_merchant.py
+ python3 -m py_compile scripts/dataforseo_normalize.py
+ python3 -m py_compile scripts/drift_baseline.py
+ python3 -m py_compile scripts/drift_compare.py
+ python3 -m py_compile scripts/drift_report.py
+ python3 -m py_compile scripts/drift_history.py
+ echo "All 28 scripts passed syntax check"
diff --git a/.gitignore b/.gitignore
index bb2e0f2..dd3e400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,6 +100,10 @@ seo command demo.gif
Google-SEO-Report-*.html
Google-SEO-Report-*.pdf
+# Claude Code local config (project-specific permissions, not for repo)
+.claude/
+.superpowers/
+
# Site-specific analysis outputs
LOCAL-SEO-ANALYSIS-*.md
LOCAL-SEO-ANALYSIS-*.html
@@ -111,6 +115,23 @@ dirigo-seo-images-review.html
# Site-specific scripts
indexnow-submit.sh
+# SEO Drift Monitor (SQLite baselines)
+*.db
+
+# Generated cluster maps
+cluster-map.html
+CLUSTER-REPORT*.md
+
+# Generated SXO reports
+SXO-ANALYSIS*.md
+
+# Generated drift reports
+DRIFT-REPORT*.md
+DRIFT-COMPARISON*.html
+
+# Generated e-commerce reports
+ECOMMERCE-ANALYSIS*.md
+
# Generated setup guides
Google-API-Setup-Guide-*.html
scripts/generate_setup_guide.py
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..7106dbd
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,125 @@
+# Claude SEO — Multi-Platform Agent Instructions
+
+> For **Cursor**, **Cursor Cloud Agents**, **Google Antigravity**, and **Gemini CLI**.
+> Claude Code users: see `CLAUDE.md` instead.
+
+## Overview
+
+Claude SEO is a Tier 4 SEO analysis skill with 20 core sub-skills (+ 3 extensions),
+15 core subagents (+ 2 extension agents, 17 total), and 30 Python execution scripts.
+
+## Quick Reference
+
+| Command | What it does |
+|---------|-------------|
+| `/seo audit <url>` | Full website audit with parallel subagent delegation |
+| `/seo page <url>` | Deep single-page analysis |
+| `/seo technical <url>` | Technical SEO audit (9 categories) |
+| `/seo content <url>` | E-E-A-T and content quality analysis |
+| `/seo schema <url>` | Schema.org detection, validation, generation |
+| `/seo sitemap <url>` | XML sitemap analysis or generation |
+| `/seo images <url>` | Image SEO: on-page audit, SERP analysis, file optimization |
+| `/seo geo <url>` | AI Overviews / Generative Engine Optimization |
+| `/seo plan <type>` | Strategic SEO planning |
+| `/seo cluster <keyword>` | SERP-based semantic clustering and content architecture |
+| `/seo sxo <url>` | Search Experience Optimization: page-type analysis, personas |
+| `/seo drift baseline <url>` | Capture SEO baseline for change monitoring |
+| `/seo drift compare <url>` | Compare current state to stored baseline |
+| `/seo drift history <url>` | Show drift history over time |
+| `/seo ecommerce <url>` | E-commerce SEO: product schema, marketplace intelligence |
+| `/seo programmatic [url]` | Programmatic SEO at scale |
+| `/seo competitor-pages [url]` | Competitor comparison pages |
+| `/seo local <url>` | Local SEO analysis (GBP, citations, reviews) |
+| `/seo maps [cmd] [args]` | Maps intelligence (geo-grid, GBP audit, competitors) |
+| `/seo hreflang <url>` | Hreflang/i18n SEO audit, cultural profiles, content parity |
+| `/seo google [cmd] [url]` | Google SEO APIs (GSC, PageSpeed, CrUX, Indexing, GA4) |
+| `/seo backlinks <url>` | Backlink profile analysis |
+| `/seo backlinks setup` | Setup free backlink APIs |
+| `/seo backlinks verify <url>` | Verify known backlinks still exist |
+| `/seo dataforseo [cmd]` | Live SEO data via DataForSEO (extension) |
+| `/seo image-gen [use-case]` | AI image generation for SEO assets (extension) |
+| `/seo firecrawl [cmd] <url>` | Full-site crawling and site mapping (extension) |
+
+## Using with Cursor / Cursor Cloud
+
+Cursor reads this file automatically. All SKILL.md files contain the full
+analysis logic as natural language instructions. Python scripts in `scripts/`
+provide execution capabilities.
+
+**Running scripts directly** (Cursor doesn't have MCP):
+```bash
+# Page fetching with SSRF protection
+python scripts/fetch_page.py https://example.com
+
+# HTML parsing for SEO elements
+python scripts/parse_html.py https://example.com
+
+# PageSpeed Insights
+python scripts/pagespeed_check.py https://example.com --json
+
+# Drift baseline
+python scripts/drift_baseline.py https://example.com
+
+# DataForSEO (requires credentials)
+DATAFORSEO_USERNAME=user DATAFORSEO_PASSWORD=pass python scripts/dataforseo_merchant.py search "keyword"
+```
+
+**Cursor Cloud gotchas:**
+- SSL certificates may not resolve for some domains — investigate the certificate issue rather than disabling verification
+- PATH may not include Python venv — use full path: `~/.claude/skills/seo/.venv/bin/python`
+- Screenshots save to `/tmp/` not CWD — check absolute paths
+
+## Using with Google Antigravity
+
+Antigravity discovers this project via `plugin.json` at the repo root.
+Place the repo in `~/.gemini/antigravity/plugins/claude-seo/` or install via:
+
+```bash
+bash install.sh
+```
+
+## Architecture
+
+```
+skills/ # 23 skills (auto-discovered)
+ seo/SKILL.md # Main orchestrator + routing
+ seo-cluster/ # Semantic clustering (v1.9.0)
+ seo-sxo/ # Search Experience Optimization (v1.9.0)
+ seo-drift/ # SEO drift monitoring (v1.9.0)
+ seo-ecommerce/ # E-commerce SEO (v1.9.0)
+ seo-audit/ # Full site audit
+ seo-page/ # Single-page analysis
+ seo-technical/ # Technical SEO
+ seo-content/ # E-E-A-T quality
+ seo-schema/ # Schema.org markup
+ seo-sitemap/ # XML sitemaps
+ seo-images/ # Image optimization
+ seo-geo/ # AI search / GEO
+ seo-local/ # Local SEO
+ seo-maps/ # Maps intelligence
+ seo-plan/ # Strategic planning
+ seo-hreflang/ # International SEO
+ seo-google/ # Google APIs
+ seo-backlinks/ # Backlink analysis
+ seo-programmatic/ # Programmatic SEO
+ seo-competitor-pages/ # Competitor pages
+ seo-dataforseo/ # DataForSEO (extension)
+ seo-image-gen/ # AI images (extension)
+agents/ # 17 subagents
+scripts/ # 30 Python scripts
+schema/ # JSON-LD templates
+extensions/ # Optional add-ons (DataForSEO, Firecrawl, Banana, ASO)
+```
+
+## Key Principles
+
+1. **Progressive Disclosure**: Read SKILL.md for routing, load references on demand
+2. **Industry Detection**: Auto-detect SaaS, e-commerce, local, publisher, agency
+3. **Security**: All scripts call `validate_url()` for SSRF protection
+4. **Config location**: `~/.config/claude-seo/` for API credentials
+
+## Credits
+
+Created by [@AgriciDaniel](https://github.com/AgriciDaniel).
+v1.9.0 community contributions by Lutfiya Miller, Chris Muller, Florian Schmitz,
+Dan Colta, and Matej Marjanovic. See [CONTRIBUTORS.md](CONTRIBUTORS.md).
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3790d9c..7de97a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,33 @@ 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).
+## [1.9.0] - 2026-04-14
+
+### Added
+- **seo-cluster**: SERP-based semantic topic clustering for content architecture (skill + 3 references + interactive cluster-map.html visualization + agent). Contributed by Lutfiya Miller (Pro Hub Challenge Winner).
+- **seo-sxo**: Search Experience Optimization — reads SERPs backwards to detect page-type mismatches, derives user stories, scores pages from persona perspectives (skill + 4 references + agent). Contributed by Florian Schmitz.
+- **seo-drift**: SEO drift monitoring — baseline, diff, and track changes to on-page SEO with 17 comparison rules across 3 severity levels. SQLite persistence (skill + 1 reference + agent + 4 Python scripts). Contributed by Dan Colta. Security-hardened: all curl usage eliminated, SSRF protection enforced.
+- **seo-ecommerce**: E-commerce SEO — Google Shopping intelligence, Amazon marketplace analysis, product schema validation (skill + 1 reference + agent + 2 Python scripts). Contributed by Matej Marjanovic.
+- **DataForSEO cost guardrails**: `scripts/dataforseo_costs.py` with threshold-based approval, session budget tracking, daily spend summaries. `references/cost-tiers.md` pricing table. Contributed by Matej Marjanovic.
+- **seo-hreflang cultural profiles**: 4 cultural adaptation profiles (DACH, Francophone, Hispanic, Japanese) with locale format tables, content parity audit, and freshness tracking. 3 new reference files. Contributed by Chris Muller.
+- **CONTRIBUTORS.md**: Community credits file for Pro Hub Challenge and PR contributors
+- **AGENTS.md**: Multi-platform discovery file for Cursor/Antigravity (concept by Matej Marjanovic, rewritten for v1.9.0)
+- **Schema templates**: Product (Full E-commerce) and ItemList (hub/pillar pages) added to `schema/templates.json`
+- 5 new commands: `/seo cluster`, `/seo sxo`, `/seo drift baseline|compare|history`, `/seo ecommerce`
+
+### Changed
+- Orchestrator spawns up to 15 subagents (was 12): +seo-cluster, +seo-sxo, +seo-drift, +seo-ecommerce
+- seo-hreflang SKILL.md enhanced with Cultural Adaptation Assessment, Content Parity Audit, and Locale Format Validation sections
+- seo-dataforseo SKILL.md enhanced with Cost Guardrails section requiring cost checks before API calls
+- All 23 SKILL.md files stamped to v1.9.0
+- Install scripts (install.sh, install.ps1) pinned to v1.9.0
+- plugin.json updated with 9 new keywords
+
+### Community
+- Pro Hub Challenge: Lutfiya Miller (Winner - Semantic Cluster Engine), Florian Schmitz (SXO Skill), Dan Colta (SEO Drift Monitor), Chris Muller (Multi-lingual SEO), Matej Marjanovic (E-commerce + Cost Config + Platform Support), Benjamin Samar (SEO Dungeon - reviewed)
+- 5 out of 6 submissions scored Proficient or above
+- See CONTRIBUTORS.md for full credits and original repo links
+
## [1.8.2] - 2026-04-10
### Added
diff --git a/CLAUDE.md b/CLAUDE.md
index 2b804be..c710e0c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -4,22 +4,25 @@
This repository contains **Claude SEO**, a Tier 4 Claude Code skill for comprehensive
SEO analysis across all industries. It follows the Agent Skills open standard and the
-3-layer architecture (directive, orchestration, execution). 16 core sub-skills (+ 3
-extensions), 11 core subagents (+ 2 extension agents, 13 total), and an extensible reference
+3-layer architecture (directive, orchestration, execution). 20 core sub-skills (+ 3
+extensions), 15 core subagents (+ 2 extension agents, 17 total), and an extensible reference
system cover technical SEO, content quality,
schema markup, image optimization, sitemap architecture, AI search optimization,
-local SEO (GBP, citations, reviews, map pack), and maps intelligence (geo-grid
-rank tracking, GBP auditing, review intelligence, competitor radius mapping).
+local SEO (GBP, citations, reviews, map pack), maps intelligence, semantic topic
+clustering, search experience optimization (SXO), SEO drift monitoring, e-commerce
+SEO, and international SEO with cultural adaptation profiles.
## Architecture
```
claude-seo/
CLAUDE.md # Project instructions (this file)
+ CONTRIBUTORS.md # Community credits (Pro Hub Challenge)
+ AGENTS.md # Multi-platform agent instructions (Cursor, Antigravity)
.claude-plugin/
- plugin.json # Plugin manifest (v1.8.1)
+ plugin.json # Plugin manifest (v1.9.0)
marketplace.json # Marketplace catalog for distribution
- skills/ # 19 skills (auto-discovered)
+ skills/ # 23 skills (auto-discovered)
seo/ # Main orchestrator skill
SKILL.md # Entry point, routing table, core rules
references/ # On-demand knowledge files (12 files)
@@ -41,11 +44,24 @@ claude-seo/
SKILL.md
references/ # API reference files (10 files)
seo-backlinks/SKILL.md # Backlink profile analysis
+ seo-cluster/ # Semantic topic clustering (v1.9.0, by Lutfiya Miller)
+ SKILL.md
+ references/ # Clustering methodology, architecture, workflow
+ templates/ # cluster-map.html interactive visualization
+ seo-sxo/ # Search Experience Optimization (v1.9.0, by Florian Schmitz)
+ SKILL.md
+ references/ # Page-type taxonomy, user stories, personas, wireframes
+ seo-drift/ # SEO drift monitoring (v1.9.0, by Dan Colta)
+ SKILL.md
+ references/ # Comparison rules (17 rules, 3 severity levels)
+ seo-ecommerce/ # E-commerce SEO (v1.9.0, by Matej Marjanovic)
+ SKILL.md
+ references/ # Marketplace API endpoints
seo-dataforseo/SKILL.md # Live SEO data via DataForSEO MCP (extension mirror)
seo-image-gen/ # AI image generation for SEO assets (extension mirror)
SKILL.md
references/ # Image gen reference files (7 files)
- agents/ # 13 subagents (auto-discovered)
+ agents/ # 17 subagents (auto-discovered)
seo-technical.md # Crawlability, indexability, security
seo-content.md # E-E-A-T, readability, thin content
seo-schema.md # Structured data validation
@@ -59,9 +75,13 @@ claude-seo/
seo-backlinks.md # Backlink profile analyst (Moz, Bing, CC, verify)
seo-dataforseo.md # DataForSEO data analyst
seo-image-gen.md # SEO image audit analyst
+ seo-cluster.md # Semantic clustering analysis
+ seo-sxo.md # Search experience optimization
+ seo-drift.md # SEO drift monitoring
+ seo-ecommerce.md # E-commerce SEO analysis
hooks/ # Quality gate hooks
hooks.json # PostToolUse schema validation
- scripts/ # Python execution scripts (21 tracked + 2 dev-only)
+ scripts/ # Python execution scripts (28 tracked + 2 dev-only)
google_auth.py # Credential management (OAuth, SA, API key, 4-tier detection)
backlinks_auth.py # Backlink API credential management (Moz, Bing)
moz_api.py # Moz Link Explorer API (DA/PA, spam, domains, anchors)
@@ -82,6 +102,13 @@ claude-seo/
parse_html.py # HTML parser for SEO elements
capture_screenshot.py # Playwright screenshots
analyze_visual.py # Visual analysis helper
+ drift_baseline.py # SEO drift baseline capture (SQLite)
+ drift_compare.py # SEO drift comparison engine (17 rules)
+ drift_report.py # SEO drift HTML report generator
+ drift_history.py # SEO drift history query
+ dataforseo_costs.py # DataForSEO cost estimation and budget tracking
+ dataforseo_merchant.py # Google Shopping / Amazon data fetching
+ dataforseo_normalize.py # DataForSEO response normalization utility
mobile_analysis.py # Mobile rendering analysis (gitignored, dev-only)
schema/ # Schema.org JSON-LD templates
extensions/ # Optional add-on install helpers
@@ -95,7 +122,7 @@ claude-seo/
| Command | Purpose |
|---------|---------|
-| `/seo audit <url>` | Full site audit with 12 parallel subagents |
+| `/seo audit <url>` | Full site audit with up to 15 parallel subagents |
| `/seo page <url>` | Deep single-page analysis |
| `/seo technical <url>` | Technical SEO audit (9 categories) |
| `/seo content <url>` | E-E-A-T and content quality analysis |
@@ -113,6 +140,12 @@ claude-seo/
| `/seo backlinks <url>` | Backlink profile analysis (free: Moz, Bing, CC; premium: DataForSEO) |
| `/seo backlinks setup` | Setup instructions for free backlink APIs |
| `/seo backlinks verify <url>` | Verify known backlinks still exist |
+| `/seo cluster <seed-keyword>` | SERP-based semantic clustering and content architecture |
+| `/seo sxo <url>` | Search Experience Optimization: page-type analysis, personas |
+| `/seo drift baseline <url>` | Capture SEO baseline for change monitoring |
+| `/seo drift compare <url>` | Compare current state to stored baseline |
+| `/seo drift history <url>` | Show drift history over time |
+| `/seo ecommerce <url>` | E-commerce SEO: product schema, marketplace intelligence |
| `/seo firecrawl [command] <url>` | Full-site crawling and site mapping (extension) |
| `/seo dataforseo [command]` | Live SEO data via DataForSEO MCP (extension) |
| `/seo image-gen [use-case] <desc>` | AI image generation for SEO assets (extension) |
@@ -161,5 +194,15 @@ Part of the Claude Code skill family:
1. **Progressive Disclosure**: Metadata always loaded, instructions on activation, resources on demand
2. **Industry Detection**: Auto-detect SaaS, e-commerce, local, publisher, agency
-3. **Parallel Execution**: Full audits spawn up to 12 subagents simultaneously
+3. **Parallel Execution**: Full audits spawn up to 15 subagents simultaneously
4. **Extension System**: DataForSEO MCP for live data, Firecrawl MCP for site crawling, Banana MCP for AI image generation
+
+## Release Blog Post
+
+After cutting a new release (git tag + `gh release create`), run:
+
+```
+/release-blog
+```
+
+This generates a blog post on https://claude-seo.md/blog/, handles cover image generation, SEO metadata, FAQ schema, internal linking, sitemap/llms.txt updates, Vercel deployment, and Google indexing.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a90da5a..8ea892d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -45,3 +45,15 @@ bash install.sh
- Python: Follow PEP 8 conventions. Use `ruff check` or `flake8` for linting before submitting
- Shell: Use `set -euo pipefail` and quote all variables
- Markdown: Keep lines under 120 characters where practical
+
+## Community Extensions (Pro Hub Challenge)
+
+Claude SEO accepts community-built extensions through challenges and PRs.
+v1.9.0 integrated 5 community submissions — see [CONTRIBUTORS.md](CONTRIBUTORS.md).
+
+To submit a community extension:
+1. Build your skill/agent/script following the patterns in this repo
+2. Keep SKILL.md under 500 lines, references under 200 lines
+3. All scripts must import `validate_url()` from `google_auth.py` for SSRF protection
+4. Include `original_author` in your SKILL.md frontmatter metadata
+5. Submit a PR or post in the [AI Marketing Hub](https://www.skool.com/ai-marketing-hub)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
new file mode 100644
index 0000000..a83670e
--- /dev/null
+++ b/CONTRIBUTORS.md
@@ -0,0 +1,39 @@
+# Contributors
+
+Claude SEO is created and maintained by [@AgriciDaniel](https://github.com/AgriciDaniel).
+
+This project thrives thanks to community contributions from the
+[AI Marketing Hub](https://www.skool.com/ai-marketing-hub) Pro Hub Challenge
+and open-source pull requests.
+
+## Pro Hub Challenge (v1.9.0)
+
+The Pro Hub Challenge invited community members to build extensions for Claude SEO
+and Claude Blog. These submissions were reviewed, security-audited, and integrated
+into v1.9.0 with the contributors' permission.
+
+| Contributor | Submission | Repo | Integrated As |
+|------------|------------|------|--------------|
+| **Lutfiya Miller** (Winner) | Semantic Cluster Engine | [Drfiya/semantic-cluster-engine](https://github.com/Drfiya/semantic-cluster-engine) | `seo-cluster` (core skill) |
+| **Chris Muller** | Multi-lingual SEO | [Chriss54/claude-blog-multilingual](https://github.com/Chriss54/claude-blog-multilingual) | `seo-hreflang` enhancements (cultural profiles, locale formats, content parity) |
+| **Florian Schmitz** | SXO Skill | [tools-enerix/claude-sxo-skill](https://github.com/tools-enerix/claude-sxo-skill) | `seo-sxo` (core skill) |
+| **Dan Colta** | SEO Drift Monitor | [dancolta/seo-drift-monitor](https://github.com/dancolta/seo-drift-monitor) | `seo-drift` (core skill) |
+| **Matej Marjanovic** | E-commerce + DataForSEO Cost Config + ASO + Platform Support | [matej-marjanovic/claude-seo](https://github.com/matej-marjanovic/claude-seo) | `seo-ecommerce` (core), cost infrastructure, `seo-aso` (extension), `AGENTS.md` |
+| **Benjamin Samar** | SEO Dungeon | -- | Reviewed (not integrated in v1.9.0) |
+
+## Community Pull Requests
+
+| Contributor | PR | What |
+|------------|-----|------|
+| [@edocltd](https://github.com/edocltd) | [#50](https://github.com/AgriciDaniel/claude-seo/pull/50) | Ukrainian localization |
+| [@MalteBerlin](https://github.com/MalteBerlin) | [#45](https://github.com/AgriciDaniel/claude-seo/pull/45) | Sub-skills count correction |
+| [@olivierroy](https://github.com/olivierroy) | [#43](https://github.com/AgriciDaniel/claude-seo/pull/43) | Extension install fix |
+
+## How to Contribute
+
+See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on submitting pull requests,
+creating extensions, and participating in future challenges.
+
+Join the community:
+- Free: https://www.skool.com/ai-marketing-hub
+- Pro: https://www.skool.com/ai-marketing-hub-pro
diff --git a/README.md b/README.md
index bc17394..1d5d838 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-<!-- Updated: 2026-04-10 -->
+<!-- Updated: 2026-04-14 -->
![Claude SEO](screenshots/cover-image.jpeg)
# Claude SEO - SEO Audit Skill for Claude Code
-Comprehensive SEO analysis skill for Claude Code. Covers technical SEO, on-page analysis, content quality (E-E-A-T), schema markup, image optimization, sitemap architecture, AI search optimization (GEO), local SEO, maps intelligence, Google SEO APIs (Search Console, PageSpeed, CrUX, GA4), PDF report generation, and strategic planning.
+Comprehensive SEO analysis skill for Claude Code. 20 core sub-skills covering technical SEO, on-page analysis, content quality (E-E-A-T), schema markup, image optimization, sitemap architecture, AI search optimization (GEO), local SEO, maps intelligence, semantic topic clustering, search experience optimization (SXO), SEO drift monitoring, e-commerce SEO, international SEO with cultural profiles, Google SEO APIs (Search Console, PageSpeed, CrUX, GA4), PDF report generation, and strategic planning.
![SEO Command Demo](screenshots/seo-command-demo.gif)
@@ -129,6 +129,12 @@ claude
| `/seo google [command] [url]` | Google SEO APIs (GSC, PageSpeed, CrUX, Indexing, GA4) |
| `/seo google report [type]` | Generate PDF/HTML report with charts (cwv-audit, gsc-performance, full) |
| `/seo backlinks <url>` | Backlink profile analysis (free: Moz, Bing, Common Crawl) |
+| `/seo cluster <seed-keyword>` | SERP-based semantic clustering and content architecture |
+| `/seo sxo <url>` | Search Experience Optimization: page-type, user stories, personas |
+| `/seo drift baseline <url>` | Capture SEO baseline for change monitoring |
+| `/seo drift compare <url>` | Compare current state to stored baseline |
+| `/seo drift history <url>` | Show drift history over time |
+| `/seo ecommerce <url>` | E-commerce SEO: product schema, marketplace intelligence |
| `/seo firecrawl [command] <url>` | Full-site crawling and site mapping (extension) |
| `/seo dataforseo [command]` | Live SEO data via DataForSEO (extension) |
| `/seo image-gen [use-case] <desc>` | AI image generation for SEO assets (extension) |
@@ -233,8 +239,8 @@ Direct integration with Google's SEO data:
```
~/.claude/skills/seo/ # Main orchestrator skill
-~/.claude/skills/seo-*/ # Sub-skills (16 + 3 extensions)
-~/.claude/agents/seo-*.md # Subagents (11 + 2 extensions)
+~/.claude/skills/seo-*/ # Sub-skills (20 + 3 extensions)
+~/.claude/agents/seo-*.md # Subagents (15 + 2 extensions)
```
### Video & Live Schema (New)
@@ -368,6 +374,20 @@ Claude SEO is part of a family of Claude Code skills that work together:
- [MCP Integration](docs/MCP-INTEGRATION.md)
- [Troubleshooting](docs/TROUBLESHOOTING.md)
+## Community Contributors
+
+v1.9.0 includes contributions from the [AI Marketing Hub](https://www.skool.com/ai-marketing-hub) Pro Hub Challenge:
+
+| Contributor | Contribution |
+|------------|-------------|
+| **Lutfiya Miller** (Winner) | Semantic Cluster Engine → `seo-cluster` |
+| **Florian Schmitz** | SXO Skill → `seo-sxo` |
+| **Dan Colta** | SEO Drift Monitor → `seo-drift` |
+| **Chris Muller** | Multi-lingual SEO → `seo-hreflang` enhancements |
+| **Matej Marjanovic** | E-commerce + DataForSEO Cost Config → `seo-ecommerce` + cost guardrails |
+
+See [CONTRIBUTORS.md](CONTRIBUTORS.md) for full details and original repo links.
+
## License
MIT License - see [LICENSE](LICENSE) for details.
diff --git a/agents/seo-cluster.md b/agents/seo-cluster.md
new file mode 100644
index 0000000..48f3d25
--- /dev/null
+++ b/agents/seo-cluster.md
@@ -0,0 +1,74 @@
+---
+name: seo-cluster
+description: >
+ Semantic topic clustering analysis using SERP overlap methodology. Expands seed
+ keywords, performs pairwise SERP comparison, classifies intent, designs
+ hub-and-spoke content architecture, and generates internal link matrices.
+model: sonnet
+maxTurns: 20
+tools: WebSearch, WebFetch, Read, Write, Bash, Glob, Grep
+---
+
+<!-- Original concept: Lutfiya Miller — Semantic Cluster Engine (Pro Hub Challenge) -->
+
+You are a Semantic Topic Clustering specialist. Your job is to analyze keywords using
+SERP overlap data and design optimal content cluster architectures.
+
+## What to Analyze
+
+When given a seed keyword or set of keywords:
+
+1. **Expand** the seed into 30-50 keyword variants using WebSearch (related searches,
+ PAA questions, long-tail modifiers, question variants, intent modifiers)
+2. **Classify intent** for each keyword: Informational, Commercial, Transactional,
+ or Navigational. Remove navigational keywords from clustering.
+3. **Compare SERPs** pairwise within intent groups. For each pair, WebSearch both
+ keywords and count shared URLs in the top 10 organic results.
+4. **Apply thresholds**: 7-10 shared = same post, 4-6 = same cluster, 2-3 = interlink,
+ 0-1 = separate.
+5. **Design architecture**: Select the pillar keyword (broadest, highest volume),
+ group spokes into 2-5 clusters of 2-4 posts each.
+6. **Build link matrix**: Mandatory (spoke-pillar bidirectional), recommended
+ (spoke-spoke within cluster), optional (cross-cluster).
+
+## How to Report Findings
+
+Provide a structured JSON cluster plan with all data. Include:
+- The SERP overlap matrix (keyword pairs and scores)
+- Cluster assignments with rationale
+- Template selection per post with intent justification
+- Complete internal link adjacency list
+- Cannibalization check results
+
+## Output Format
+
+Your primary output is a `cluster-plan.json` file matching the schema defined in
+`skills/seo-cluster/references/hub-spoke-architecture.md`. Also produce a
+human-readable `cluster-plan.md` summary.
+
+## Reference Files
+
+Load on demand when you need detailed methodology:
+- `skills/seo-cluster/references/serp-overlap-methodology.md` — Scoring algorithm and thresholds
+- `skills/seo-cluster/references/hub-spoke-architecture.md` — Cluster structure and templates
+- `skills/seo-cluster/references/execution-workflow.md` — Priority ordering and context injection
+
+## Cross-Skill Awareness
+
+- If the user already has an `/seo plan` output, parse it for existing keyword research
+ and competitive analysis. Do not duplicate that work.
+- Content quality standards come from `seo-content` (E-E-A-T requirements).
+- Schema markup templates for cluster pages are defined in `seo-schema`.
+
+## Pre-Delivery Validation Checklist
+
+Before presenting results, verify:
+- [ ] No two posts share the same primary keyword
+- [ ] Every spoke has at least 3 incoming internal links planned
+- [ ] Every spoke links to the pillar (mandatory)
+- [ ] Pillar links to every spoke (mandatory)
+- [ ] No orphan pages in the link matrix
+- [ ] Template selection matches intent classification
+- [ ] Word count targets are within specification (pillar: 2500-4000, spoke: 1200-1800)
+- [ ] Total cluster size is within constraints (2-5 clusters, 2-4 posts each)
+- [ ] SERP overlap data supports cluster groupings (no spoke with < 4 overlap to cluster peers)
diff --git a/agents/seo-drift.md b/agents/seo-drift.md
new file mode 100644
index 0000000..099dd6f
--- /dev/null
+++ b/agents/seo-drift.md
@@ -0,0 +1,59 @@
+---
+name: seo-drift
+description: >
+ SEO drift analysis agent. Captures baselines of SEO-critical page elements and
+ compares against stored snapshots to detect regressions. Reports changes with
+ severity classification. Only spawned when a drift baseline exists for the URL.
+model: sonnet
+maxTurns: 15
+tools: Read, Bash, Write, Glob, Grep
+---
+
+<!-- Original concept: Dan Colta — SEO Drift Monitor (Pro Hub Challenge) -->
+
+You are an SEO drift analysis specialist. You detect regressions in on-page SEO
+elements by comparing current page state against stored baselines.
+
+## Tools
+
+All page fetching goes through the project's existing scripts with SSRF protection:
+- `python scripts/drift_baseline.py <url>` -- capture a new baseline
+- `python scripts/drift_compare.py <url>` -- compare current state to baseline
+- `python scripts/drift_history.py <url>` -- show change history
+- `python scripts/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
+IP ranges.
+
+## Workflow
+
+1. **Baseline**: Capture current SEO state (title, meta, canonical, robots, headings,
+ schema, OG tags, CWV, status code). Store with SHA-256 content hashes in SQLite.
+2. **Compare**: Fetch current state, run 17 comparison rules across 3 severity levels
+ (CRITICAL, WARNING, INFO). Report all triggered rules with old/new values.
+3. **History**: Query SQLite for all baselines and comparisons for a URL. Show timeline.
+
+## Severity Classification
+
+- **CRITICAL**: Schema removed, canonical changed/removed, noindex added, H1/title
+ removed, H1 changed >50%, status code became 4xx/5xx
+- **WARNING**: Title/description changed, CWV regressed >20%, performance score
+ dropped 10+ points, OG tags removed, schema modified
+- **INFO**: New schema added, H2 structure changed, content hash changed
+
+## Cross-Skill Delegation
+
+When drift is detected, recommend the appropriate skill:
+- Schema issues: `/seo schema <url>`
+- Performance regression: `/seo technical <url>` or `/seo google psi <url>`
+- Content/title changes: `/seo page <url>` or `/seo content <url>`
+- Canonical/indexability: `/seo technical <url>`
+
+## Output
+
+For comparisons, present:
+1. Summary line: number of CRITICAL / WARNING / INFO findings
+2. Table of all triggered rules with severity, old value, new value, and action
+3. Cross-skill recommendations for any CRITICAL or WARNING findings
+4. Offer HTML report generation for sharing with stakeholders
diff --git a/agents/seo-ecommerce.md b/agents/seo-ecommerce.md
new file mode 100644
index 0000000..2ad7104
--- /dev/null
+++ b/agents/seo-ecommerce.md
@@ -0,0 +1,64 @@
+---
+name: seo-ecommerce
+description: >
+ E-commerce SEO analyst. Validates product schema, analyzes Google Shopping and
+ Amazon marketplace visibility, identifies pricing gaps, and recommends product
+ page optimizations. Spawned when e-commerce site detected during audits.
+model: sonnet
+maxTurns: 20
+tools: Read, Bash, Write, Glob, Grep
+---
+
+<!-- Original concept: Matej Marjanovic -- E-commerce DataForSEO Expansion (Pro Hub Challenge) -->
+
+You are an e-commerce SEO analyst specializing in product pages, marketplace
+visibility, and structured data optimization.
+
+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/fetch_page.py` and `scripts/parse_html.py`
+3. Validate Product schema against Google's required and recommended fields
+4. If DataForSEO credentials available, fetch marketplace data via
+ `scripts/dataforseo_merchant.py`
+
+## Cost Guardrails
+
+Before ANY DataForSEO Merchant API call:
+```bash
+python scripts/dataforseo_costs.py check <endpoint>
+```
+
+Only proceed if `"status": "approved"`. If `"needs_approval"`, surface the cost
+to the parent orchestrator. If `"blocked"`, skip marketplace analysis and note
+the limitation.
+
+After each API call, log the cost:
+```bash
+python scripts/dataforseo_costs.py log <endpoint> <actual_cost>
+```
+
+## Analysis Priorities
+
+1. **Schema completeness** -- missing Product fields = missing rich results
+2. **Image optimization** -- product images need alt text, WebP, >= 800px
+3. **Pricing competitiveness** -- compare against marketplace medians
+4. **Content uniqueness** -- flag manufacturer copy-paste descriptions
+5. **Internal linking** -- breadcrumbs, related products, category links
+
+## Output Format
+
+Match existing claude-seo patterns:
+- Tables for comparative data (pricing, seller landscape)
+- Scores as XX/100 (schema, images, content, overall)
+- Priority: Critical > High > Medium > Low
+- Note data source: "DataForSEO Merchant (live)" or "On-page analysis (static)"
+- Include actionable recommendations with expected impact
+
+## Error Handling
+
+- If DataForSEO is unavailable, complete the on-page analysis without marketplace data
+- If the URL is not a product page, detect page type and adjust analysis scope
+- If schema parsing fails, analyze raw HTML for product signals
+- Report all errors clearly with suggested next steps
diff --git a/agents/seo-sxo.md b/agents/seo-sxo.md
new file mode 100644
index 0000000..95a3784
--- /dev/null
+++ b/agents/seo-sxo.md
@@ -0,0 +1,94 @@
+---
+name: seo-sxo
+description: >
+ Search Experience Optimization analyst. Performs SERP backwards analysis to detect
+ page-type mismatches, derives user stories from intent signals, and scores pages
+ from multiple persona perspectives. Identifies why well-optimized content fails to rank.
+model: sonnet
+maxTurns: 20
+tools: Read, Bash, WebFetch, WebSearch, Glob, Grep, Write
+---
+
+<!-- Original concept: Florian Schmitz — SXO Skill (Pro Hub Challenge) -->
+
+You are an SXO (Search Experience Optimization) analyst. Your job is to determine
+why a page fails to rank by analyzing what Google actually rewards for a keyword,
+then comparing that against the target page.
+
+## Execution Steps
+
+### 1. Fetch and Parse Target Page
+
+- Fetch the target URL using `python scripts/fetch_page.py "<url>"` (SSRF protection)
+- Parse with `python scripts/parse_html.py "<url>"` to extract SEO elements
+- Identify: page type, title, H1, meta description, headings, word count, schema, CTAs, media
+- If no keyword was provided, derive primary keyword from title + H1 overlap
+
+### 2. SERP Analysis
+
+- Search Google for the target keyword using WebSearch
+- Analyze the top 10 organic results:
+ - Classify each result's page type using `skills/seo-sxo/references/page-type-taxonomy.md`
+ - Record content format, estimated depth, schema signals, media presence
+- Record SERP features: featured snippets, PAA questions, ads, related searches, AI Overview
+- Calculate SERP consensus: dominant page type and confidence percentage
+
+### 3. Page-Type Mismatch Detection
+
+- Classify the target page using the same taxonomy
+- Compare against SERP dominant type
+- Rate mismatch severity: CRITICAL / HIGH / MEDIUM / ALIGNED
+- If mismatch detected, this is the PRIMARY finding -- lead with it
+
+### 4. User Story Derivation
+
+- Read `skills/seo-sxo/references/user-story-framework.md`
+- Derive 3-5 user stories from observed SERP signals
+- Every story must cite the specific signal that generated it
+- Cover at least 2 journey stages (awareness, consideration, decision)
+
+### 5. Gap Analysis
+
+Score the target page across 7 dimensions (100 points total):
+- Page Type (0-15), Content Depth (0-15), UX Signals (0-15), Schema (0-15),
+ Media (0-15), Authority (0-15), Freshness (0-10)
+- Provide specific evidence for each score
+
+### 6. Persona Scoring
+
+- Read `skills/seo-sxo/references/persona-scoring.md`
+- Derive 4-7 personas from SERP signals
+- Score each persona on: Relevance, Clarity, Trust, Action (25 pts each)
+- Sort recommendations by weakest persona first
+
+### 7. Wireframe (Only if requested)
+
+- Read `skills/seo-sxo/references/wireframe-templates.md`
+- Generate IST (current) wireframe from parsed page
+- Generate SOLL (recommended) wireframe matching SERP expectations
+- Use ultra-concrete placeholders with actual section names, CTA text, and link targets
+
+## Cross-Skill References
+
+- E-E-A-T gaps detected? Recommend `/seo content` for deep analysis
+- Missing schema types? Recommend `/seo schema` for generation
+- Local intent in SERP? Recommend `/seo local` for GBP analysis
+- Thin content? Recommend `/seo page` for page-level audit
+
+## Output Rules
+
+- SXO score is SEPARATE from SEO Health Score -- always label it "SXO Gap Score"
+- Lead with mismatch finding if one exists (this is the key insight)
+- Include limitations section (what could not be assessed)
+- Offer: "Generate a PDF report? Use `/seo google report`"
+
+## Pre-Delivery Checklist
+
+Before presenting results, verify:
+- [ ] URL was fetched via scripts/fetch_page.py (not raw curl)
+- [ ] At least 5 SERP results were analyzed
+- [ ] Page type classification uses the taxonomy reference
+- [ ] User stories cite specific SERP signals
+- [ ] Persona scores include concrete improvement suggestions
+- [ ] Mismatch severity is clearly rated
+- [ ] Limitations section is present
diff --git a/claude-seo-slides/index.html b/claude-seo-slides/index.html
new file mode 100644
index 0000000..773a6ae
--- /dev/null
+++ b/claude-seo-slides/index.html
@@ -0,0 +1,317 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Claude SEO v1.7.2 — What's New</title>
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&family=IBM+Plex+Mono:wght@400;700&display=swap" rel="stylesheet">
+<style>
+*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
+:root{--coral:#E07850;--orange:#FF6B35;--bg:#0A0A0A;--surface:#111111;--surface2:#1A1A1A;--text:#F5F5F0;--text-gray:#888888;--text-muted:#6a6a6a;--border:#2D2D2D;--border-subtle:#1D1D1D;--green:#4ADE80;--blue:#60A5FA;--rose:#F43F5E;--amber:#F0A830;--grotesk:'Space Grotesk',system-ui,sans-serif;--mono:'IBM Plex Mono','JetBrains Mono',monospace}
+html{scroll-behavior:smooth;scroll-snap-type:y mandatory}
+body{font-family:var(--mono);background:var(--bg);color:var(--text);overflow-x:hidden}
+::selection{background:rgba(224,120,80,.3)}
+.slide{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:60px 40px;scroll-snap-align:start;position:relative;overflow:hidden}
+.slide-inner{max-width:1000px;width:100%;position:relative;z-index:2}
+.slide-num{position:absolute;top:30px;right:40px;font-size:11px;color:var(--text-muted);letter-spacing:3px;font-family:var(--mono)}
+.slide-tag{display:inline-flex;align-items:center;gap:8px;padding:4px 14px;background:var(--surface2);border:1px solid var(--border);font-size:10px;letter-spacing:2px;color:var(--coral);text-transform:uppercase;margin-bottom:24px}
+h1{font-family:var(--grotesk);font-size:clamp(36px,6vw,72px);font-weight:700;color:var(--text);letter-spacing:-2px;line-height:1}
+h1 .accent{color:var(--coral)}
+h2{font-family:var(--grotesk);font-size:clamp(28px,4vw,48px);font-weight:700;letter-spacing:-1px;line-height:1.1;margin-bottom:32px}
+h2 .accent{color:var(--coral)}
+h3{font-family:var(--grotesk);font-size:20px;font-weight:700;margin-bottom:12px;color:var(--text)}
+p{font-size:14px;color:var(--text-gray);line-height:1.8;max-width:600px}
+.subtitle{font-size:16px;color:var(--text-gray);margin-top:16px;line-height:1.7}
+.stats{display:flex;gap:40px;margin-top:40px;flex-wrap:wrap}
+.stat{display:flex;flex-direction:column;gap:4px}
+.stat-num{font-family:var(--grotesk);font-size:36px;font-weight:700;color:var(--coral)}
+.stat-label{font-size:10px;color:var(--text-muted);letter-spacing:2px;text-transform:uppercase}
+.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-top:32px}
+.card{background:var(--surface);border:1px solid var(--border);padding:28px;transition:border-color .3s}
+.card:hover{border-color:var(--coral)}
+.card-icon{font-size:24px;margin-bottom:12px}
+.card h3{font-size:15px;margin-bottom:8px}
+.card p{font-size:12px;line-height:1.7}
+.flow{margin-top:32px;background:var(--surface);border:1px solid var(--border);padding:32px;overflow-x:auto}
+.flow-row{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;min-width:max-content;padding:8px 0}
+.flow-box{padding:10px 18px;border:1.5px solid var(--border);font-size:11px;letter-spacing:.5px;white-space:nowrap;background:var(--surface2)}
+.flow-box.active{border-color:var(--coral);color:var(--coral)}
+.flow-box.green{border-color:var(--green);color:var(--green)}
+.flow-box.blue{border-color:var(--blue);color:var(--blue)}
+.flow-box.amber{border-color:var(--amber);color:var(--amber)}
+.flow-arrow{color:var(--text-muted);font-size:18px;flex-shrink:0}
+.tier-table{width:100%;border-collapse:collapse;margin-top:24px;font-size:12px}
+.tier-table th{text-align:left;padding:12px 16px;font-size:10px;letter-spacing:2px;text-transform:uppercase;color:var(--coral);border-bottom:1px solid var(--border);background:var(--surface)}
+.tier-table td{padding:12px 16px;border-bottom:1px solid var(--border-subtle);color:var(--text-gray);vertical-align:top}
+.tier-table tr:hover td{background:var(--surface2)}
+.tier-label{color:var(--text);font-weight:700}
+.compare{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:24px}
+.compare-col{background:var(--surface);border:1px solid var(--border);padding:24px}
+.compare-col h3{font-size:13px;margin-bottom:16px;letter-spacing:1px}
+.compare-col.before h3{color:var(--text-muted)}
+.compare-col.after h3{color:var(--coral)}
+.compare-item{font-size:12px;color:var(--text-gray);padding:6px 0;border-bottom:1px solid var(--border-subtle);display:flex;justify-content:space-between}
+.compare-item .val{color:var(--text);font-weight:700}
+.cmd{background:var(--surface);border:1px solid var(--border);padding:16px 20px;font-family:var(--mono);font-size:13px;margin-top:16px;overflow-x:auto}
+.cmd .prompt{color:var(--text-muted)}
+.cmd .command{color:var(--coral)}
+.arch{margin-top:24px;display:flex;flex-direction:column;gap:12px}
+.arch-layer{display:flex;align-items:stretch;gap:12px}
+.arch-label{width:100px;flex-shrink:0;display:flex;align-items:center;font-size:10px;letter-spacing:2px;text-transform:uppercase;color:var(--text-muted)}
+.arch-boxes{display:flex;gap:8px;flex-wrap:wrap;flex:1}
+.arch-box{padding:8px 14px;border:1px solid var(--border);font-size:11px;background:var(--surface);white-space:nowrap}
+.arch-box.core{border-color:var(--coral);color:var(--coral)}
+.arch-box.ext{border-color:var(--amber);color:var(--amber)}
+.arch-box.api{border-color:var(--green);color:var(--green)}
+.slide-nav{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:100;background:rgba(10,10,10,.9);padding:8px 16px;border:1px solid var(--border)}
+.slide-nav a{width:10px;height:10px;background:var(--border);display:block;transition:background .2s}
+.slide-nav a:hover,.slide-nav a.active{background:var(--coral)}
+@media(max-width:768px){.slide{padding:40px 20px}.stats{gap:24px}.stat-num{font-size:28px}.compare{grid-template-columns:1fr}.arch-label{width:70px;font-size:9px}}
+</style>
+</head>
+<body>
+
+<nav class="slide-nav" id="nav">
+ <a href="#title"></a><a href="#growth"></a><a href="#google"></a><a href="#tiers"></a>
+ <a href="#dataforseo"></a><a href="#extensions"></a><a href="#agents"></a>
+ <a href="#marketplace"></a><a href="#next"></a>
+</nav>
+
+<!-- SLIDE 1: TITLE -->
+<section class="slide" id="title">
+ <div class="slide-inner" style="text-align:center">
+ <div class="slide-tag">v1.7.2 update</div>
+ <h1>Claude <span class="accent">SEO</span></h1>
+ <p class="subtitle" style="margin:20px auto 0">From the first release to v1.7.2 — the project has completely transformed</p>
+ <div class="stats" style="justify-content:center;margin-top:48px">
+ <div class="stat"><span class="stat-num">19</span><span class="stat-label">Sub-skills</span></div>
+ <div class="stat"><span class="stat-num">12</span><span class="stat-label">Subagents</span></div>
+ <div class="stat"><span class="stat-num">3</span><span class="stat-label">Extensions</span></div>
+ <div class="stat"><span class="stat-num">3,500+</span><span class="stat-label">Stars</span></div>
+ </div>
+ </div>
+ <span class="slide-num">01 / 09</span>
+</section>
+
+<!-- SLIDE 2: BEFORE / AFTER -->
+<section class="slide" id="growth">
+ <div class="slide-inner">
+ <div class="slide-tag">evolution</div>
+ <h2>From v1.0 to <span class="accent">v1.7.2</span></h2>
+ <div class="compare">
+ <div class="compare-col before">
+ <h3>v1.0 (first release)</h3>
+ <div class="compare-item"><span>Sub-skills</span><span class="val">12</span></div>
+ <div class="compare-item"><span>Subagents</span><span class="val">7</span></div>
+ <div class="compare-item"><span>Extensions</span><span class="val">0</span></div>
+ <div class="compare-item"><span>Google APIs</span><span class="val">None</span></div>
+ <div class="compare-item"><span>Live SERP data</span><span class="val">No</span></div>
+ <div class="compare-item"><span>Backlink analysis</span><span class="val">No</span></div>
+ <div class="compare-item"><span>Full-site crawl</span><span class="val">No</span></div>
+ <div class="compare-item"><span>AI image gen</span><span class="val">No</span></div>
+ <div class="compare-item"><span>PDF / Excel reports</span><span class="val">No</span></div>
+ <div class="compare-item"><span>Stars</span><span class="val">~500</span></div>
+ </div>
+ <div class="compare-col after">
+ <h3>v1.7.2 (today)</h3>
+ <div class="compare-item"><span>Sub-skills</span><span class="val">19</span></div>
+ <div class="compare-item"><span>Subagents</span><span class="val">12</span></div>
+ <div class="compare-item"><span>Extensions</span><span class="val">3</span></div>
+ <div class="compare-item"><span>Google APIs</span><span class="val">6 APIs, 21 commands</span></div>
+ <div class="compare-item"><span>Live SERP data</span><span class="val">DataForSEO MCP</span></div>
+ <div class="compare-item"><span>Backlink analysis</span><span class="val">7-section + scoring</span></div>
+ <div class="compare-item"><span>Full-site crawl</span><span class="val">Firecrawl MCP</span></div>
+ <div class="compare-item"><span>AI image gen</span><span class="val">Banana / Gemini</span></div>
+ <div class="compare-item"><span>PDF / Excel reports</span><span class="val">A4 PDF + .xlsx</span></div>
+ <div class="compare-item"><span>Stars</span><span class="val" style="color:var(--coral)">3,500+</span></div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">02 / 09</span>
+</section>
+
+<!-- SLIDE 3: GOOGLE APIs -->
+<section class="slide" id="google">
+ <div class="slide-inner">
+ <div class="slide-tag">feature 1</div>
+ <h2>Google <span class="accent">SEO APIs</span></h2>
+ <p>Direct integration with 6 Google APIs. Live data, not estimates.</p>
+ <div class="cards">
+ <div class="card"><div class="card-icon">&#9889;</div><h3>PageSpeed + CrUX</h3><p>Lab + field Core Web Vitals. The actual data Google uses for ranking.</p></div>
+ <div class="card"><div class="card-icon">&#128270;</div><h3>Search Console</h3><p>Top queries, URL inspection, sitemap status, indexation coverage.</p></div>
+ <div class="card"><div class="card-icon">&#128202;</div><h3>GA4 Analytics</h3><p>Organic traffic trends, top landing pages, device and country breakdown.</p></div>
+ <div class="card"><div class="card-icon">&#128221;</div><h3>Indexing API</h3><p>Notify Google of new/updated/removed URLs. Instant indexing requests.</p></div>
+ <div class="card"><div class="card-icon">&#127909;</div><h3>YouTube Data</h3><p>Video and channel SEO research. Titles, descriptions, tags, engagement.</p></div>
+ <div class="card"><div class="card-icon">&#128196;</div><h3>PDF + Excel Reports</h3><p>A4 reports with charts. Excel workbooks with filters and frozen headers.</p></div>
+ </div>
+ </div>
+ <span class="slide-num">03 / 09</span>
+</section>
+
+<!-- SLIDE 4: CREDENTIAL TIERS -->
+<section class="slide" id="tiers">
+ <div class="slide-inner">
+ <div class="slide-tag">credential system</div>
+ <h2>4-Tier <span class="accent">Auth</span></h2>
+ <p>Start free. Unlock more APIs as you add credentials.</p>
+ <table class="tier-table">
+ <thead><tr><th>Tier</th><th>Auth</th><th>APIs Unlocked</th><th>Cost</th></tr></thead>
+ <tbody>
+ <tr><td><span class="tier-label" style="color:var(--green)">Tier 0</span></td><td>API Key</td><td>PageSpeed, CrUX, CrUX History, YouTube, NLP</td><td>Free</td></tr>
+ <tr><td><span class="tier-label" style="color:var(--blue)">Tier 1</span></td><td>+ OAuth / SA</td><td>Search Console, URL Inspection, Indexing API</td><td>Free</td></tr>
+ <tr><td><span class="tier-label" style="color:var(--amber)">Tier 2</span></td><td>+ GA4 Auth</td><td>GA4 Organic Traffic Reports</td><td>Free</td></tr>
+ <tr><td><span class="tier-label" style="color:var(--coral)">Tier 3</span></td><td>+ Ads Account</td><td>Google Ads Keyword Planner</td><td>Ads spend</td></tr>
+ </tbody>
+ </table>
+ <div class="cmd" style="margin-top:24px">
+ <span class="prompt">$</span> <span class="command">/seo google report full --format all</span>
+ </div>
+ </div>
+ <span class="slide-num">04 / 09</span>
+</section>
+
+<!-- SLIDE 5: DATAFORSEO -->
+<section class="slide" id="dataforseo">
+ <div class="slide-inner">
+ <div class="slide-tag">feature 2</div>
+ <h2>DataFor<span class="accent">SEO</span></h2>
+ <p>Live SERP data, keyword research, backlinks, and 9 API modules. 22 commands.</p>
+ <div class="cards" style="grid-template-columns:repeat(3,1fr)">
+ <div class="card"><h3>SERP Analysis</h3><p>Live Google results. Positions, featured snippets, People Also Ask, local pack.</p></div>
+ <div class="card"><h3>Keyword Research</h3><p>Search volume, difficulty, CPC, competition. Same data as paid SEO tools.</p></div>
+ <div class="card"><h3>Backlink Profiles</h3><p>Referring domains, anchor text, domain rating. 7-section analysis + health score.</p></div>
+ <div class="card"><h3>On-Page Analysis</h3><p>Content scores, readability, keyword density, page structure.</p></div>
+ <div class="card"><h3>Domain Analytics</h3><p>Competitor research, traffic estimates, technology detection.</p></div>
+ <div class="card"><h3>AI Optimization</h3><p>AI search visibility, brand mentions, citation signals.</p></div>
+ </div>
+ <div class="cmd" style="margin-top:20px">
+ <span class="prompt">$</span> <span class="command">/seo dataforseo serp best coffee shops new york</span>
+ </div>
+ </div>
+ <span class="slide-num">05 / 09</span>
+</section>
+
+<!-- SLIDE 6: EXTENSION SYSTEM -->
+<section class="slide" id="extensions">
+ <div class="slide-inner">
+ <div class="slide-tag">architecture</div>
+ <h2>Extension <span class="accent">System</span></h2>
+ <p>Core works with zero API keys. Plug in extensions for deeper data.</p>
+ <div class="flow">
+ <div class="flow-row">
+ <div class="flow-box active">Core (17 skills)</div>
+ <span class="flow-arrow">+</span>
+ <div class="flow-box amber">DataForSEO</div>
+ <span class="flow-arrow">+</span>
+ <div class="flow-box blue">Firecrawl</div>
+ <span class="flow-arrow">+</span>
+ <div class="flow-box green">Banana</div>
+ <span class="flow-arrow">=</span>
+ <div class="flow-box active" style="border-width:2px">Full Power</div>
+ </div>
+ </div>
+ <div class="cards" style="margin-top:24px;grid-template-columns:repeat(3,1fr)">
+ <div class="card" style="border-color:var(--amber)"><h3 style="color:var(--amber)">DataForSEO</h3><p>22 commands. Live SERPs, keywords, backlinks, content analysis, AI visibility. 9 API modules.</p></div>
+ <div class="card" style="border-color:var(--blue)"><h3 style="color:var(--blue)">Firecrawl</h3><p>Full-site crawl with JS rendering. Site mapping, broken link detection. 500 free credits/month.</p></div>
+ <div class="card" style="border-color:var(--green)"><h3 style="color:var(--green)">Banana</h3><p>AI image generation via Gemini. OG images, hero graphics, product shots. ~$0.02 per image.</p></div>
+ </div>
+ <div class="cmd" style="margin-top:20px">
+ <span class="prompt">$</span> <span class="command">./extensions/dataforseo/install.sh</span>
+ <span style="color:var(--text-muted);margin-left:16px"># one script, done</span>
+ </div>
+ </div>
+ <span class="slide-num">06 / 09</span>
+</section>
+
+<!-- SLIDE 7: AGENT ARCHITECTURE -->
+<section class="slide" id="agents">
+ <div class="slide-inner">
+ <div class="slide-tag">how it works</div>
+ <h2>Audit <span class="accent">Pipeline</span></h2>
+ <p>12 AI agents run in parallel. Extensions auto-detected and spawned.</p>
+ <div class="flow">
+ <div class="flow-row">
+ <div class="flow-box active">/seo audit url</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box">Detect business type</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box blue">Detect extensions</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box green">Spawn agents</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box active">Score 0-100</div>
+ </div>
+ </div>
+ <div class="arch" style="margin-top:28px">
+ <div class="arch-layer">
+ <div class="arch-label">Core</div>
+ <div class="arch-boxes">
+ <div class="arch-box core">technical</div>
+ <div class="arch-box core">content</div>
+ <div class="arch-box core">schema</div>
+ <div class="arch-box core">sitemap</div>
+ <div class="arch-box core">performance</div>
+ <div class="arch-box core">visual</div>
+ <div class="arch-box core">geo</div>
+ <div class="arch-box core">local</div>
+ </div>
+ </div>
+ <div class="arch-layer">
+ <div class="arch-label">Conditional</div>
+ <div class="arch-boxes">
+ <div class="arch-box api">google</div>
+ <div class="arch-box ext">maps</div>
+ <div class="arch-box ext">dataforseo</div>
+ <div class="arch-box ext">image-gen</div>
+ </div>
+ </div>
+ </div>
+ <p style="margin-top:20px;font-size:12px;color:var(--text-muted)">Core agents always run. Conditional agents spawn when credentials or extensions are detected.</p>
+ </div>
+ <span class="slide-num">07 / 09</span>
+</section>
+
+<!-- SLIDE 8: MARKETPLACE -->
+<section class="slide" id="marketplace">
+ <div class="slide-inner">
+ <div class="slide-tag">compliance</div>
+ <h2>Marketplace <span class="accent">Ready</span></h2>
+ <p>Passes <code style="color:var(--coral)">claude plugin validate</code> with 0 errors, 0 warnings.</p>
+ <div class="cards" style="margin-top:24px;grid-template-columns:repeat(3,1fr)">
+ <div class="card" style="text-align:center"><div class="card-icon" style="color:var(--green)">&#10003;</div><h3>Anthropic Best Practices</h3><p>Per-skill LICENSE.txt, PRIVACY.md, clean frontmatter, lean root files</p></div>
+ <div class="card" style="text-align:center"><div class="card-icon" style="color:var(--green)">&#10003;</div><h3>Plugin Validation</h3><p>marketplace.json + plugin.json validated by CLI. 0 errors, 0 warnings.</p></div>
+ <div class="card" style="text-align:center"><div class="card-icon" style="color:var(--green)">&#10003;</div><h3>awesome-claude-skills</h3><p>PR submitted to 49K-star curated list. Listed on VoltAgent awesome-list.</p></div>
+ </div>
+ <div class="cmd" style="margin-top:24px">
+ <span class="prompt">$</span> <span class="command">claude plugin install claude-seo@claude-seo-marketplace</span>
+ </div>
+ </div>
+ <span class="slide-num">08 / 09</span>
+</section>
+
+<!-- SLIDE 9: WHAT'S NEXT -->
+<section class="slide" id="next">
+ <div class="slide-inner" style="text-align:center">
+ <div class="slide-tag">what's next</div>
+ <h2>v1.8 <span class="accent">Roadmap</span></h2>
+ <div class="cards" style="max-width:700px;margin:32px auto 0;grid-template-columns:1fr 1fr">
+ <div class="card"><h3>Content Strategy Skill</h3><p>Turn audit findings into topic clusters, content calendars, and brief docs.</p></div>
+ <div class="card"><h3>Deeper Crawl Integration</h3><p>Wire Firecrawl into every subagent. Broken links at scale, orphan detection.</p></div>
+ </div>
+ <div style="margin-top:48px">
+ <h1 style="font-size:clamp(28px,5vw,56px)">github.com/AgriciDaniel/<span class="accent">claude-seo</span></h1>
+ <p style="margin:20px auto 0;text-align:center">Star the repo. Drop a comment. See you in v1.8.</p>
+ </div>
+ </div>
+ <span class="slide-num">09 / 09</span>
+</section>
+
+<script>
+const slides=document.querySelectorAll('.slide'),dots=document.querySelectorAll('.slide-nav a');
+new IntersectionObserver(e=>e.forEach(e=>{if(e.isIntersecting){const i=[...slides].indexOf(e.target);dots.forEach(d=>d.classList.remove('active'));if(dots[i])dots[i].classList.add('active')}}),{threshold:.5}).observe&&slides.forEach(s=>new IntersectionObserver(e=>e.forEach(e=>{if(e.isIntersecting){const i=[...slides].indexOf(e.target);dots.forEach(d=>d.classList.remove('active'));if(dots[i])dots[i].classList.add('active')}}),{threshold:.5}).observe(s));
+document.addEventListener('keydown',e=>{const c=[...slides].findIndex(s=>{const r=s.getBoundingClientRect();return r.top>=-100&&r.top<innerHeight/2});if(['ArrowDown',' ','ArrowRight'].includes(e.key)){e.preventDefault();if(c<slides.length-1)slides[c+1].scrollIntoView({behavior:'smooth'})}if(['ArrowUp','ArrowLeft'].includes(e.key)){e.preventDefault();if(c>0)slides[c-1].scrollIntoView({behavior:'smooth'})}});
+</script>
+</body>
+</html>
diff --git a/claude-seo-slides/script.html b/claude-seo-slides/script.html
new file mode 100644
index 0000000..8304948
--- /dev/null
+++ b/claude-seo-slides/script.html
@@ -0,0 +1,255 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Video Script — Claude SEO v1.7.2</title>
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&family=IBM+Plex+Mono:wght@400;700&display=swap" rel="stylesheet">
+<style>
+*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
+:root{--coral:#E07850;--orange:#FF6B35;--bg:#0A0A0A;--surface:#111111;--surface2:#1A1A1A;--text:#F5F5F0;--text-gray:#999;--text-muted:#666;--border:#2D2D2D;--green:#4ADE80;--blue:#60A5FA;--amber:#F0A830;--grotesk:'Space Grotesk',system-ui,sans-serif;--mono:'IBM Plex Mono','JetBrains Mono',monospace}
+html{scroll-behavior:smooth}
+body{font-family:var(--mono);background:var(--bg);color:var(--text);padding:0;margin:0}
+::selection{background:rgba(224,120,80,.3)}
+.wrap{max-width:800px;margin:0 auto;padding:40px 24px 120px}
+header{text-align:center;padding:60px 0 40px;border-bottom:1px solid var(--border)}
+header h1{font-family:var(--grotesk);font-size:32px;font-weight:700;letter-spacing:-1px}
+header h1 .accent{color:var(--coral)}
+header p{font-size:12px;color:var(--text-muted);margin-top:8px;letter-spacing:1px}
+.meta{display:flex;gap:24px;justify-content:center;margin-top:20px;flex-wrap:wrap}
+.meta-item{font-size:11px;color:var(--text-gray);display:flex;align-items:center;gap:6px}
+.meta-dot{width:6px;height:6px;background:var(--coral);flex-shrink:0}
+.section{margin-top:48px;padding-top:48px;border-top:1px solid var(--border)}
+.section-header{display:flex;align-items:center;gap:12px;margin-bottom:24px}
+.section-time{font-size:10px;letter-spacing:2px;color:var(--coral);text-transform:uppercase;padding:4px 10px;border:1px solid var(--coral);white-space:nowrap}
+.section-title{font-family:var(--grotesk);font-size:22px;font-weight:700;letter-spacing:-.5px}
+.script{font-size:14px;color:var(--text-gray);line-height:2;margin-bottom:16px}
+.script strong{color:var(--text);font-weight:700}
+.direction{background:var(--surface);border-left:3px solid var(--coral);padding:10px 16px;margin:16px 0;font-size:12px;color:var(--coral);font-style:italic}
+.cmd{background:var(--surface);border:1px solid var(--border);padding:12px 16px;margin:12px 0;font-size:13px;overflow-x:auto}
+.cmd .prompt{color:var(--text-muted)}
+.cmd .command{color:var(--coral)}
+.points{list-style:none;margin:16px 0}
+.points li{padding:8px 0 8px 20px;font-size:13px;color:var(--text-gray);line-height:1.7;position:relative;border-bottom:1px solid rgba(45,45,45,.5)}
+.points li::before{content:'';position:absolute;left:0;top:14px;width:8px;height:8px;border:1.5px solid var(--coral)}
+.desc-box{background:var(--surface);border:1px solid var(--border);padding:24px;margin-top:32px}
+.desc-box h3{font-family:var(--grotesk);font-size:16px;margin-bottom:16px;color:var(--coral)}
+.desc-box pre{font-size:12px;color:var(--text-gray);line-height:1.8;white-space:pre-wrap;word-wrap:break-word}
+.thumbs{display:flex;gap:12px;margin-top:16px;flex-wrap:wrap}
+.thumb{padding:10px 20px;border:1px solid var(--border);font-size:12px;color:var(--text);background:var(--surface2)}
+@media print{body{background:#fff;color:#111}.section{border-top-color:#ddd}.direction{background:#f5f5f5;border-left-color:#E07850}.cmd{background:#f5f5f5;border-color:#ddd}.cmd .command{color:#c0440a}}
+</style>
+</head>
+<body>
+
+<header>
+ <h1>Claude <span class="accent">SEO</span> v1.7.2</h1>
+ <p>Video Script</p>
+ <div class="meta">
+ <div class="meta-item"><div class="meta-dot"></div>~5 minutes</div>
+ <div class="meta-item"><div class="meta-dot"></div>Screen recording + face cam</div>
+ <div class="meta-item"><div class="meta-dot"></div>Natural, conversational</div>
+ </div>
+</header>
+
+<div class="wrap">
+
+<!-- INTRO -->
+<div class="section" style="border-top:none;margin-top:0;padding-top:0">
+ <div class="section-header">
+ <div class="section-time">0:00 - 0:35</div>
+ <div class="section-title">Intro</div>
+ </div>
+
+ <p class="script">Hey everyone. About a month ago I released Claude SEO &mdash; the first version, kind of a proof of concept. Since then, the project has completely transformed. We went from the initial release to <strong>v1.7.2</strong>, from <strong>12 skills to 19</strong>, from zero extensions to <strong>three</strong>, and from about 2,000 stars to over <strong>3,500</strong>. Which is insane. Thank you.</p>
+
+ <p class="script">In this video I'm going to walk you through the three biggest things that changed: <strong>Google API integration</strong> with live data and PDF reports, <strong>DataForSEO</strong> for live SERP and keyword data, and the <strong>extension system</strong> that makes it all plug and play.</p>
+
+ <p class="script">Let's get into it.</p>
+</div>
+
+<!-- SECTION 1: GOOGLE APIs -->
+<div class="section">
+ <div class="section-header">
+ <div class="section-time">0:35 - 2:15</div>
+ <div class="section-title">Google SEO APIs</div>
+ </div>
+
+ <div class="direction">Screen: Show terminal with Claude Code open</div>
+
+ <p class="script">The biggest addition is direct Google API integration. The first version of Claude SEO was smart but blind &mdash; it could analyze your HTML, but it couldn't see what Google actually sees. Now it can.</p>
+
+ <p class="script">Claude SEO pulls live data from <strong>six Google APIs</strong> &mdash; Search Console, PageSpeed Insights, CrUX, GA4, the Indexing API, and YouTube Data.</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">/seo google psi https://example.com</span></div>
+
+ <p class="script">So here I'm running a PageSpeed check. This isn't just lab data &mdash; it pulls <strong>real Chrome User Experience data</strong>, the actual Core Web Vitals that Google uses for ranking. LCP, INP, CLS &mdash; all from real users.</p>
+
+ <p class="script">The credential system has <strong>four tiers</strong>. You can start completely free:</p>
+
+ <ul class="points">
+ <li><strong>Tier 0</strong> &mdash; free API key &mdash; gives you PageSpeed, CrUX, CrUX History, YouTube, and NLP</li>
+ <li><strong>Tier 1</strong> &mdash; add OAuth &mdash; unlocks Search Console, URL Inspection, and the Indexing API</li>
+ <li><strong>Tier 2</strong> &mdash; add GA4 &mdash; organic traffic reports, top landing pages, device breakdown</li>
+ <li><strong>Tier 3</strong> &mdash; add Google Ads &mdash; Keyword Planner data</li>
+ </ul>
+
+ <p class="script">One API key, five minutes of setup, and you already have live performance data. No paid tools needed.</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">/seo google report full</span></div>
+
+ <p class="script">And all of this feeds into <strong>professional PDF reports</strong>. A4 format, charts, color-coded scores, table of contents &mdash; something you can actually hand to a client or a boss.</p>
+
+ <div class="direction">Show generated PDF &mdash; flip through a few pages, pause on charts</div>
+
+ <p class="script">New in v1.7.2 &mdash; <strong>Excel export</strong>.</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">/seo google report full --format all</span></div>
+
+ <p class="script">That gives you PDF, HTML, and an Excel workbook all at once. The spreadsheet has separate sheets for queries, pages, indexation &mdash; with filters, frozen headers, auto-width columns. Clients love data they can sort.</p>
+</div>
+
+<!-- SECTION 2: DataForSEO -->
+<div class="section">
+ <div class="section-header">
+ <div class="section-time">2:15 - 3:30</div>
+ <div class="section-title">DataForSEO &mdash; Live SEO Data</div>
+ </div>
+
+ <div class="direction">Screen: Terminal</div>
+
+ <p class="script">The second big feature is the DataForSEO extension. This gives Claude SEO access to <strong>live SERP data, keyword research, backlink profiles</strong>, and a lot more.</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">/seo dataforseo serp best coffee shops new york</span></div>
+
+ <p class="script">So here I'm pulling a live Google SERP. Not cached, not estimated &mdash; this is what's actually ranking right now. You see positions, URLs, featured snippets, People Also Ask, local pack results &mdash; everything.</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">/seo dataforseo keywords seo audit tool</span></div>
+
+ <p class="script">Keyword research &mdash; search volume, difficulty score, CPC, competition level. This is the same data you'd get from paid tools like Ahrefs or SEMrush, but you're running it from your terminal inside Claude Code.</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">/seo dataforseo backlinks example.com</span></div>
+
+ <p class="script">And backlink analysis. Referring domains, anchor text distribution, domain rating. We also added a dedicated <strong>/seo backlinks</strong> command in v1.7.2 that wraps this data with a 7-section analysis framework &mdash; toxic link detection with 30 spam patterns, competitor gap analysis, and a health score from 0 to 100.</p>
+
+ <p class="script">DataForSEO has <strong>22 commands across 9 API modules</strong>. SERP, keywords, backlinks, on-page analysis, domain analytics, business data, content analysis, and AI optimization. It's a lot.</p>
+
+ <p class="script">And installing it is one script:</p>
+
+ <div class="cmd"><span class="prompt">$</span> <span class="command">./extensions/dataforseo/install.sh</span></div>
+
+ <p class="script">It asks for your API credentials, configures the MCP server, and you're done. Which brings me to the third thing I want to show you.</p>
+</div>
+
+<!-- SECTION 3: Extension System -->
+<div class="section">
+ <div class="section-header">
+ <div class="section-time">3:30 - 4:15</div>
+ <div class="section-title">The Extension System</div>
+ </div>
+
+ <div class="direction">Screen: Show the extensions/ folder in editor, then the before/after slide</div>
+
+ <p class="script">This is the part I'm most proud of because it's how Claude SEO scales without getting bloated.</p>
+
+ <p class="script">The core skill &mdash; <strong>17 sub-skills, 12 subagents</strong> &mdash; works with <strong>zero API keys</strong>. You install it, run <strong>/seo audit</strong>, and 12 AI agents analyze your site in parallel. Technical SEO, content quality, schema, GEO, local SEO &mdash; all of that runs on Claude's own intelligence, no external APIs.</p>
+
+ <p class="script">But when you want deeper data, you plug in an extension. Right now there are three:</p>
+
+ <ul class="points">
+ <li><strong>DataForSEO</strong> &mdash; 22 commands: live SERPs, keyword volume, backlinks, content analysis</li>
+ <li><strong>Firecrawl</strong> &mdash; full-site crawling with JavaScript rendering, 500 free credits/month</li>
+ <li><strong>Banana</strong> &mdash; AI image generation via Google Gemini for OG images, hero graphics, product shots</li>
+ </ul>
+
+ <p class="script">Each extension is self-contained. One install script, one uninstall script. It copies the skill files, configures the MCP server, done. And the <strong>audit orchestrator detects what's installed</strong> &mdash; if you have DataForSEO, it automatically spawns the DataForSEO agent during audits. If you have Firecrawl, it maps your site first. The more you plug in, the deeper your audits get.</p>
+
+ <p class="script">And building new extensions is easy. Same pattern, same structure. If you want to add Ahrefs, SEMrush, or any MCP server &mdash; you follow the template.</p>
+</div>
+
+<!-- SECTION 4: Marketplace -->
+<div class="section">
+ <div class="section-header">
+ <div class="section-time">4:15 - 4:50</div>
+ <div class="section-title">Marketplace &amp; Community</div>
+ </div>
+
+ <div class="direction">Screen: GitHub repo, then show validation passing</div>
+
+ <p class="script">Last thing. We did a full compliance audit against <strong>Anthropic's official documentation</strong>. Every skill now has its own LICENSE file. We added a PRIVACY.md. Cleaned up all the frontmatter. And the plugin now <strong>passes validation</strong> with zero errors, zero warnings.</p>
+
+ <div class="direction">Show: claude plugin validate . passing</div>
+
+ <p class="script">We're submitting to the official Claude Code plugin marketplace. And we got listed on the <strong>awesome-claude-skills repo</strong> &mdash; the one with 49,000 stars.</p>
+
+ <p class="script">The project is now at <strong>19 sub-skills, 12 subagents, 3 extensions, 3,500+ stars, 560 forks</strong>. Community PRs keep coming in &mdash; we've reviewed and responded to every single one.</p>
+</div>
+
+<!-- OUTRO -->
+<div class="section">
+ <div class="section-header">
+ <div class="section-time">4:50 - 5:10</div>
+ <div class="section-title">Outro</div>
+ </div>
+
+ <p class="script">If you're using Claude Code for anything SEO-related, give Claude SEO a try. Install is one command &mdash; link in the description. Star the repo if you find it useful, and drop a comment if there's a feature you want to see next.</p>
+
+ <p class="script">I'm thinking v1.8 might be the <strong>content strategy skill</strong> &mdash; turning audit findings into actual content plans and topic clusters. Let me know what you think.</p>
+
+ <p class="script">See you in the next one.</p>
+</div>
+
+<!-- YOUTUBE DESCRIPTION -->
+<div class="desc-box" style="margin-top:64px">
+ <h3>YouTube Description</h3>
+ <pre>Claude SEO v1.7.2 -- Universal SEO Skill for Claude Code
+
+From the first release to v1.7.2: 19 sub-skills, 12 subagents, 3 extensions.
+
+What's new:
+- Google SEO APIs (Search Console, PageSpeed, CrUX, GA4, Indexing API)
+- PDF & Excel reports (A4 with charts, multi-sheet .xlsx)
+- DataForSEO extension (22 commands: live SERP, keywords, backlinks, on-page)
+- Backlink analysis skill (7-section profile + health score + disavow)
+- Firecrawl extension (full-site crawling with JS rendering)
+- Banana extension (AI image generation via Gemini)
+- Extension system (plug in what you need, core works without any API keys)
+- Official marketplace compliance (passes claude plugin validate)
+
+Timestamps:
+0:00 Intro
+0:35 Google SEO APIs (live data, PDF/Excel reports)
+2:15 DataForSEO (SERP, keywords, backlinks)
+3:30 Extension System (how it works)
+4:15 Marketplace & Community
+4:50 Outro
+
+Install:
+curl -fsSL https://raw.githubusercontent.com/AgriciDaniel/claude-seo/main/install.sh | bash
+
+GitHub: https://github.com/AgriciDaniel/claude-seo
+Skool: https://www.skool.com/ai-marketing-hub-pro
+
+Previous video: https://www.youtube.com/watch?v=COMnNlUakQk
+
+19 sub-skills | 12 subagents | 3 extensions | 3,500+ stars | MIT licensed | $0 forever
+
+#ClaudeCode #SEO #AI #ClaudeSEO #DataForSEO #GoogleAPIs</pre>
+</div>
+
+<!-- THUMBNAIL IDEAS -->
+<div class="desc-box">
+ <h3>Thumbnail Text Ideas</h3>
+ <div class="thumbs">
+ <div class="thumb">Claude SEO v1.7.2</div>
+ <div class="thumb">Google APIs + Live SEO Data</div>
+ <div class="thumb">19 Skills | 3 Extensions</div>
+ <div class="thumb">From v1.0 to v1.7.2</div>
+ </div>
+</div>
+
+</div>
+</body>
+</html>
diff --git a/claude-seo-slides/v190.html b/claude-seo-slides/v190.html
new file mode 100644
index 0000000..fd85b3b
--- /dev/null
+++ b/claude-seo-slides/v190.html
@@ -0,0 +1,870 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Claude SEO v1.9.0 — The Community Release</title>
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&family=IBM+Plex+Mono:wght@400;700&display=swap" rel="stylesheet">
+<style>
+*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
+:root{
+ --coral:#E07850;
+ --bg:#0A0A0A;
+ --surface:#111111;
+ --surface2:#1A1A1A;
+ --text:#F5F5F0;
+ --text-gray:#888888;
+ --text-muted:#6a6a6a;
+ --border:#2D2D2D;
+ --border-subtle:#1D1D1D;
+ --green:#4ADE80;
+ --blue:#60A5FA;
+ --rose:#F43F5E;
+ --amber:#F0A830;
+ --grotesk:'Space Grotesk',system-ui,sans-serif;
+ --mono:'IBM Plex Mono','JetBrains Mono',monospace;
+}
+html{scroll-behavior:smooth;scroll-snap-type:y mandatory}
+body{font-family:var(--mono);background:var(--bg);color:var(--text);overflow-x:hidden}
+::selection{background:rgba(224,120,80,.3)}
+
+#progress{position:fixed;top:0;left:0;height:3px;background:var(--coral);width:0%;transition:width .4s ease;z-index:200}
+
+.slide{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:56px 40px;scroll-snap-align:start;position:relative;overflow:hidden}
+.slide-inner{max-width:1100px;width:100%;position:relative;z-index:2}
+.slide-num{position:absolute;top:28px;right:40px;font-size:11px;color:var(--text-muted);letter-spacing:3px;font-family:var(--mono)}
+
+.slide-tag{display:inline-flex;align-items:center;gap:8px;padding:4px 14px;background:var(--surface2);border:1px solid var(--border);font-size:10px;letter-spacing:2px;color:var(--coral);text-transform:uppercase;margin-bottom:20px;font-family:var(--mono)}
+
+h1{font-family:var(--grotesk);font-size:clamp(34px,5.5vw,68px);font-weight:700;color:var(--text);letter-spacing:-2px;line-height:1}
+h1 .accent{color:var(--coral)}
+h2{font-family:var(--grotesk);font-size:clamp(24px,3.5vw,42px);font-weight:700;letter-spacing:-1px;line-height:1.1;margin-bottom:20px}
+h2 .accent{color:var(--coral)}
+h3{font-family:var(--grotesk);font-size:16px;font-weight:700;margin-bottom:9px;color:var(--text)}
+p{font-size:13px;color:var(--text-gray);line-height:1.8;max-width:680px}
+.subtitle{font-size:15px;color:var(--text-gray);margin-top:14px;line-height:1.7;max-width:700px}
+
+/* Stats */
+.stats{display:flex;gap:36px;margin-top:36px;flex-wrap:wrap}
+.stat-num{font-family:var(--grotesk);font-size:38px;font-weight:700;color:var(--coral)}
+.stat-label{font-size:10px;color:var(--text-muted);letter-spacing:2px;text-transform:uppercase;margin-top:2px}
+
+/* Metric cards (exec summary) */
+.metric-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}
+.mc{background:var(--surface);border:1px solid var(--border);padding:16px 12px;text-align:center}
+.mc-val{font-family:var(--grotesk);font-size:28px;font-weight:700;color:var(--coral);line-height:1}
+.mc-delta{font-size:10px;color:var(--green);margin-top:3px}
+.mc-label{font-size:9px;letter-spacing:1.5px;text-transform:uppercase;color:var(--text-muted);margin-top:3px}
+
+/* Cards */
+.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-top:22px}
+.card{background:var(--surface);border:1px solid var(--border);padding:22px;transition:border-color .3s}
+.card:hover{border-color:var(--coral)}
+.card-icon{font-size:20px;margin-bottom:9px}
+.card h3{font-size:13px;margin-bottom:7px}
+.card p{font-size:11px;line-height:1.7;max-width:none}
+
+/* Two-column layouts */
+.two-col{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:20px;align-items:start}
+.two-col-3{display:grid;grid-template-columns:3fr 2fr;gap:24px;margin-top:20px;align-items:start}
+.two-col-2{display:grid;grid-template-columns:2fr 3fr;gap:24px;margin-top:20px;align-items:start}
+
+/* Tables */
+.data-table{width:100%;border-collapse:collapse;font-size:11px;margin-top:14px}
+.data-table th{text-align:left;padding:9px 12px;font-size:9px;letter-spacing:1.5px;text-transform:uppercase;color:var(--coral);border-bottom:1px solid var(--border);background:var(--surface)}
+.data-table td{padding:8px 12px;border-bottom:1px solid var(--border-subtle);color:var(--text-gray);vertical-align:top;line-height:1.5}
+.data-table tr:hover td{background:var(--surface2)}
+.td-name{color:var(--text);font-weight:700;font-size:12px}
+.sev-high{color:var(--rose);font-weight:700}
+.sev-med{color:var(--amber)}
+.sev-low{color:var(--text-muted)}
+.status-fixed{color:var(--green);font-weight:700}
+
+/* Badges */
+.badge{display:inline-block;padding:2px 9px;font-size:9px;letter-spacing:1px;text-transform:uppercase;font-weight:700;font-family:var(--mono)}
+.badge-new{background:rgba(74,222,128,.1);color:var(--green);border:1px solid rgba(74,222,128,.3)}
+.badge-enhanced{background:rgba(224,120,80,.1);color:var(--coral);border:1px solid rgba(224,120,80,.3)}
+.badge-deferred{background:rgba(106,106,106,.1);color:var(--text-muted);border:1px solid rgba(106,106,106,.2)}
+.badge-winner{background:rgba(240,168,48,.1);color:var(--amber);border:1px solid rgba(240,168,48,.3)}
+
+/* Compare */
+.compare{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}
+.compare-col{background:var(--surface);border:1px solid var(--border);padding:18px}
+.compare-col h3{font-size:11px;margin-bottom:12px;letter-spacing:1px;text-transform:uppercase}
+.compare-col.before h3{color:var(--text-muted)}
+.compare-col.after h3{color:var(--coral)}
+.compare-item{font-size:11px;color:var(--text-gray);padding:5px 0;border-bottom:1px solid var(--border-subtle);display:flex;justify-content:space-between;gap:8px}
+.compare-item .val{color:var(--text);font-weight:700;text-align:right;flex-shrink:0}
+
+/* Command block */
+.cmd{background:var(--surface);border:1px solid var(--border);padding:11px 16px;font-family:var(--mono);font-size:11px;margin-top:12px;overflow-x:auto}
+.cmd .prompt{color:var(--text-muted)}
+.cmd .command{color:var(--coral)}
+
+/* Code block */
+.code-block{background:var(--surface);border:1px solid var(--border);padding:16px 18px;font-family:var(--mono);font-size:11px;line-height:1.7;color:var(--text-gray);overflow-x:auto;margin-top:12px;white-space:pre}
+.code-block .cc{color:var(--text-muted);font-style:italic}
+.code-block .ck{color:var(--coral)}
+.code-block .cs{color:var(--green)}
+
+/* Feature list */
+.feat-list{display:flex;flex-direction:column;gap:8px}
+.feat-item{display:flex;align-items:flex-start;gap:9px;font-size:12px;color:var(--text-gray);line-height:1.5}
+.feat-item::before{content:"→";color:var(--coral);flex-shrink:0;font-size:11px;margin-top:1px}
+
+/* Flow */
+.flow{margin-top:20px;background:var(--surface);border:1px solid var(--border);padding:20px;overflow-x:auto}
+.flow-row{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;min-width:max-content}
+.flow-box{padding:8px 14px;border:1.5px solid var(--border);font-size:10px;letter-spacing:.5px;white-space:nowrap;background:var(--surface2)}
+.flow-box.active{border-color:var(--coral);color:var(--coral)}
+.flow-box.green{border-color:var(--green);color:var(--green)}
+.flow-box.blue{border-color:var(--blue);color:var(--blue)}
+.flow-box.amber{border-color:var(--amber);color:var(--amber)}
+.flow-arrow{color:var(--text-muted);font-size:14px;flex-shrink:0}
+
+/* Score timeline */
+.score-timeline{display:flex;align-items:flex-start;justify-content:center;gap:0;margin-top:24px}
+.score-node{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:130px}
+.score-val{font-family:var(--grotesk);font-size:48px;font-weight:700;line-height:1}
+.score-sub{font-size:9px;letter-spacing:1.5px;text-transform:uppercase;color:var(--text-muted);margin-top:2px}
+.score-desc{font-size:10px;color:var(--text-gray);text-align:center;line-height:1.5}
+.score-connector{width:44px;flex-shrink:0;height:2px;background:var(--border);margin-top:24px}
+
+/* Screenshots */
+.ss-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}
+.ss-item{display:flex;flex-direction:column;align-items:center;gap:8px}
+.ss-item img{max-width:100%;max-height:62vh;object-fit:contain;border:1px solid var(--border);background:var(--surface)}
+.ss-item .ss-cap{font-size:10px;color:var(--text-muted);text-align:center;letter-spacing:.5px}
+.ss-notice{background:var(--surface2);border:1px solid var(--border);padding:8px 14px;font-size:10px;color:var(--text-muted);margin-bottom:14px;display:flex;align-items:center;gap:8px}
+.contributor-img{max-width:100%;max-height:52vh;object-fit:contain;border:1px solid var(--border);background:var(--surface)}
+
+/* Integration notes */
+.int-note{background:var(--surface2);border-left:2px solid var(--text-muted);padding:8px 12px;margin-top:10px;font-size:11px;color:var(--text-muted)}
+.int-note strong{color:var(--text);font-weight:600}
+
+/* Roadmap items */
+.ritem{background:var(--surface);border:1px solid var(--border);border-left:3px solid;padding:14px 16px;margin-bottom:10px}
+.ritem.high{border-left-color:var(--rose);background:rgba(244,63,94,.04)}
+.ritem.med{border-left-color:var(--amber);background:rgba(240,168,48,.04)}
+.ritem h3{font-size:13px;margin-bottom:4px;display:flex;justify-content:space-between;align-items:center}
+.ritem p{font-size:11px;max-width:none;margin-top:0}
+
+/* Success / info boxes */
+.success-box{background:rgba(74,222,128,.05);border:1px solid rgba(74,222,128,.25);padding:16px 18px;margin-top:12px}
+.info-box{background:rgba(96,165,250,.05);border:1px solid rgba(96,165,250,.25);padding:16px 18px;margin-top:12px}
+
+/* Big keyword */
+.big-word{font-family:var(--grotesk);font-size:clamp(56px,11vw,120px);font-weight:700;color:var(--coral);letter-spacing:-5px;line-height:.9;display:block}
+
+/* Info row */
+.info-row{display:flex;gap:24px;flex-wrap:wrap;justify-content:center;margin-top:16px}
+.info-item{font-size:12px;color:var(--text-gray)}
+.info-item strong{color:var(--coral)}
+
+/* Nav */
+.slide-nav{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:100;background:rgba(10,10,10,.92);padding:7px 14px;border:1px solid var(--border)}
+.slide-nav a{width:8px;height:8px;background:var(--border);display:block;transition:background .2s;cursor:pointer}
+.slide-nav a:hover,.slide-nav a.active{background:var(--coral)}
+.key-hint{position:fixed;bottom:25px;right:28px;font-size:9px;color:var(--text-muted);letter-spacing:1px;font-family:var(--mono)}
+
+@media(max-width:768px){
+ .slide{padding:36px 18px}
+ .stats{gap:20px}
+ .stat-num{font-size:28px}
+ .compare,.two-col,.two-col-3,.two-col-2,.metric-row,.ss-pair{grid-template-columns:1fr}
+ .score-timeline{flex-wrap:wrap;gap:16px}
+ .score-connector{display:none}
+ .cards{grid-template-columns:1fr}
+}
+</style>
+</head>
+<body>
+
+<div id="progress"></div>
+
+<nav class="slide-nav" id="nav">
+ <a href="#s1"></a><a href="#s2"></a><a href="#s3"></a><a href="#s4"></a><a href="#s5"></a>
+ <a href="#s6"></a><a href="#s7"></a><a href="#s8"></a><a href="#s9"></a><a href="#s10"></a>
+ <a href="#s11"></a><a href="#s12"></a><a href="#s13"></a><a href="#s14"></a><a href="#s15"></a>
+</nav>
+<div class="key-hint">&#8592; &#8594; arrows / scroll</div>
+
+<!-- ===== 01: TITLE ===== -->
+<section class="slide" id="s1">
+ <div class="slide-inner" style="text-align:center">
+ <div class="slide-tag">v1.9.0 — april 2026</div>
+ <h1>Claude <span class="accent">SEO</span></h1>
+ <p class="subtitle" style="margin:16px auto 0;text-align:center">
+ The Community Release. Built by the AI Marketing Hub. Together.
+ </p>
+ <div class="stats" style="justify-content:center;margin-top:48px">
+ <div class="stat"><div class="stat-num">23</div><div class="stat-label">Total Skills</div></div>
+ <div class="stat"><div class="stat-num">5</div><div class="stat-label">Contributors</div></div>
+ <div class="stat"><div class="stat-num">4</div><div class="stat-label">New Skills</div></div>
+ <div class="stat"><div class="stat-num">30</div><div class="stat-label">Scripts</div></div>
+ </div>
+ </div>
+ <span class="slide-num">01 / 15</span>
+</section>
+
+<!-- ===== 02: EXECUTIVE SUMMARY ===== -->
+<section class="slide" id="s2">
+ <div class="slide-inner">
+ <div class="slide-tag">executive summary</div>
+ <h2>v1.9.0 by the <span class="accent">Numbers</span></h2>
+ <p>First community-driven release. Six members submitted for the inaugural Pro Hub Challenge. Five shipped. Four are entirely new Tier-4 skills.</p>
+
+ <div class="metric-row" style="margin-top:20px">
+ <div class="mc"><div class="mc-val">23</div><div class="mc-delta">+4 new</div><div class="mc-label">Total Skills</div></div>
+ <div class="mc"><div class="mc-val">17</div><div class="mc-delta">+4 new</div><div class="mc-label">Subagents</div></div>
+ <div class="mc"><div class="mc-val">30</div><div class="mc-delta">+7 new</div><div class="mc-label">Scripts</div></div>
+ <div class="mc"><div class="mc-val">61</div><div class="mc-delta">31 mod, 30 new</div><div class="mc-label">Files Changed</div></div>
+ </div>
+ <div class="metric-row">
+ <div class="mc"><div class="mc-val">6</div><div class="mc-delta">Pro Hub Challenge</div><div class="mc-label">Submissions</div></div>
+ <div class="mc"><div class="mc-val">5</div><div class="mc-delta">4 new, 1 enhanced</div><div class="mc-label">Integrated</div></div>
+ <div class="mc"><div class="mc-val">85</div><div class="mc-delta">4 fixes applied</div><div class="mc-label">Security / 100</div></div>
+ <div class="mc"><div class="mc-val">4</div><div class="mc-delta">Peak: 97/100</div><div class="mc-label">Review Rounds</div></div>
+ </div>
+
+ <div class="two-col" style="margin-top:16px">
+ <div class="success-box">
+ <h3 style="color:var(--green);margin-bottom:8px">Community Wins</h3>
+ <div class="feat-list">
+ <div class="feat-item">First Pro Hub Challenge, $600 Claude Credits prize pool</div>
+ <div class="feat-item">5 of 6 submissions integrated into the official release</div>
+ <div class="feat-item">4 new skills added — cluster, sxo, drift, ecommerce</div>
+ <div class="feat-item">All contributors credited in CONTRIBUTORS.md and skill frontmatter</div>
+ </div>
+ </div>
+ <div class="info-box">
+ <h3 style="color:var(--blue);margin-bottom:8px">Technical Wins</h3>
+ <div class="feat-list">
+ <div class="feat-item">XSS in cluster-map.html fixed with escapeHtml() wrapping</div>
+ <div class="feat-item">DataForSEO cost guardrail bypass chain discovered and closed</div>
+ <div class="feat-item">fcntl file locking for concurrent agent safety</div>
+ <div class="feat-item">CI expanded from 21 to 28 tracked scripts</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">02 / 15</span>
+</section>
+
+<!-- ===== 03: THE CHALLENGE ===== -->
+<section class="slide" id="s3">
+ <div class="slide-inner">
+ <div class="slide-tag">origin story</div>
+ <h2>Pro Hub <span class="accent">Challenge</span></h2>
+ <div class="two-col" style="margin-top:0">
+ <div>
+ <p style="margin-bottom:16px">We opened claude-seo to the AI Marketing Hub community. Build an extension, win Claude Credits. One month to ship something real.</p>
+ <div class="cards" style="margin-top:0;grid-template-columns:1fr;gap:10px">
+ <div class="card" style="padding:16px">
+ <div class="card-icon">&#127942;</div>
+ <h3>$600 in Claude Credits</h3>
+ <p>$400 first place. $200 second. No entry fee, no team-size restrictions.</p>
+ </div>
+ <div class="card" style="padding:16px">
+ <div class="card-icon">&#128295;</div>
+ <h3>Rigorous Integration</h3>
+ <p>Every submission: code review, security audit, de-branding, line-limit check. No rubber-stamping.</p>
+ </div>
+ </div>
+ </div>
+ <div>
+ <div style="font-size:9px;letter-spacing:1.5px;text-transform:uppercase;color:var(--coral);margin-bottom:10px">Full Timeline</div>
+ <table class="data-table" style="margin-top:0">
+ <thead><tr><th>Stage</th><th>Outcome</th></tr></thead>
+ <tbody>
+ <tr><td>Challenge announced</td><td>$600 prize pool declared</td></tr>
+ <tr><td>Submissions closed</td><td>6 entries received</td></tr>
+ <tr><td>Round 1: code review</td><td style="color:var(--amber)">87 / 100</td></tr>
+ <tr><td>Round 2: re-review</td><td style="color:var(--amber)">93 / 100</td></tr>
+ <tr><td>Round 3: max-effort plan</td><td style="color:var(--green)">97 / 100</td></tr>
+ <tr><td>Round 4: cybersecurity audit</td><td style="color:var(--coral)">85 / 100</td></tr>
+ <tr><td>Security fixes applied</td><td>4 vulnerabilities resolved</td></tr>
+ <tr><td>v1.9.0 shipped</td><td style="color:var(--green)">5 of 6 integrated</td></tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">03 / 15</span>
+</section>
+
+<!-- ===== 04: COMMUNITY POSTS ===== -->
+<section class="slide" id="s4">
+ <div class="slide-inner">
+ <div class="slide-tag">community moments</div>
+ <h2>The <span class="accent">Posts</span></h2>
+ <div class="ss-notice">
+ &#9432;&nbsp; Images load in Firefox. In Chrome: right-click this file &rarr; Open with Firefox, or run <code style="color:var(--coral)">python3 -m http.server 8080</code> and open localhost:8080
+ </div>
+ <div class="ss-pair">
+ <div class="ss-item">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/Pro%20hub%20challenge%20post.png"
+ alt="Challenge Announcement Post"
+ onerror="this.parentElement.innerHTML='<div style=&quot;border:1px solid var(--border);padding:40px;text-align:center;color:var(--text-muted);font-size:11px&quot;>Challenge Announcement Post<br><span style=&quot;font-size:9px;margin-top:8px;display:block&quot;>Open in Firefox to view</span></div>'">
+ <div class="ss-cap">Challenge Announcement — AI Marketing Hub Pro</div>
+ </div>
+ <div class="ss-item">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/Pro%20hub%20challenge%20post%20winner.png"
+ alt="Winner Announcement Post"
+ onerror="this.parentElement.innerHTML='<div style=&quot;border:1px solid var(--border);padding:40px;text-align:center;color:var(--text-muted);font-size:11px&quot;>Winner Announcement Post<br><span style=&quot;font-size:9px;margin-top:8px;display:block&quot;>Open in Firefox to view</span></div>'">
+ <div class="ss-cap">Winner Announcement — Lutfiya Miller wins</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">04 / 15</span>
+</section>
+
+<!-- ===== 05: CONTRIBUTORS ===== -->
+<section class="slide" id="s5">
+ <div class="slide-inner">
+ <div class="slide-tag">community</div>
+ <h2>Meet the <span class="accent">Contributors</span></h2>
+ <table class="data-table">
+ <thead>
+ <tr><th>Contributor</th><th>Submission</th><th>Integrated As</th><th>Result</th></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><span class="td-name">Lutfiya Miller</span></td>
+ <td>Semantic Cluster Engine</td>
+ <td><code style="color:var(--coral);font-size:10px">/seo cluster</code></td>
+ <td><span class="badge badge-winner">Winner</span></td>
+ </tr>
+ <tr>
+ <td><span class="td-name">Florian Schmitz</span></td>
+ <td>SXO Skill</td>
+ <td><code style="color:var(--coral);font-size:10px">/seo sxo</code></td>
+ <td><span class="badge badge-new">New Skill</span></td>
+ </tr>
+ <tr>
+ <td><span class="td-name">Dan Colta</span></td>
+ <td>SEO Drift Monitor</td>
+ <td><code style="color:var(--coral);font-size:10px">/seo drift</code></td>
+ <td><span class="badge badge-new">New Skill</span></td>
+ </tr>
+ <tr>
+ <td><span class="td-name">Matej Marjanovic</span></td>
+ <td>E-commerce + Cost Config</td>
+ <td><code style="color:var(--coral);font-size:10px">/seo ecommerce</code></td>
+ <td><span class="badge badge-new">New Skill</span></td>
+ </tr>
+ <tr>
+ <td><span class="td-name">Chris Muller</span></td>
+ <td>Multi-lingual Blog</td>
+ <td><code style="color:var(--coral);font-size:10px">/seo hreflang</code> (enhanced)</td>
+ <td><span class="badge badge-enhanced">Enhancement</span></td>
+ </tr>
+ <tr>
+ <td><span class="td-name">Benjamin Samar</span></td>
+ <td>SEO Dungeon</td>
+ <td>claude-blog scope — deferred</td>
+ <td><span class="badge badge-deferred">Reviewed</span></td>
+ </tr>
+ </tbody>
+ </table>
+ <p style="margin-top:16px;font-size:11px;color:var(--text-muted)">Attribution: original_author in each SKILL.md frontmatter + CONTRIBUTORS.md. Security fixes applied to 3 submissions during integration. SKILL.md 500-line limit and reference file 200-line limit enforced on all.</p>
+ </div>
+ <span class="slide-num">05 / 15</span>
+</section>
+
+<!-- ===== 06: SEO-CLUSTER (Lutfiya) ===== -->
+<section class="slide" id="s6">
+ <div class="slide-inner">
+ <div class="slide-tag">new skill 1 of 4</div>
+ <h2>Semantic Topic <span class="accent">Clustering</span></h2>
+ <div class="two-col-2">
+ <div>
+ <p style="margin-bottom:14px">By <strong style="color:var(--amber)">Lutfiya Miller</strong> (Challenge Winner). SERP overlap grouping without paid keyword tools.</p>
+ <div class="feat-list">
+ <div class="feat-item">7-10 shared SERP results: same post. 4-6: hub cluster. 2-3: interlink candidates</div>
+ <div class="feat-item">Hub-spoke architecture: pillar + cluster pages + cross-link map ready to implement</div>
+ <div class="feat-item">Outputs cluster-map.html — interactive SVG with hover, click-through, color-coded clusters</div>
+ <div class="feat-item">No paid API required; replaces $99/month clustering tools</div>
+ </div>
+ <div class="cmd" style="margin-top:14px"><span class="prompt">$ </span><span class="command">/seo cluster "coffee shops new york"</span></div>
+ <div class="int-note">
+ <strong>Integration Notes:</strong> XSS in SVG rendering fixed during integration (escapeHtml wrapping on all truncate() output). De-branded from original submission.
+ </div>
+ </div>
+ <div class="ss-item" style="align-items:flex-start">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/Lutfiya.png"
+ class="contributor-img"
+ alt="Lutfiya Miller's submission post"
+ onerror="this.style.display='none'">
+ <div class="ss-cap" style="margin-top:6px">Lutfiya Miller — submission post</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">06 / 15</span>
+</section>
+
+<!-- ===== 07: SEO-SXO (Florian) ===== -->
+<section class="slide" id="s7">
+ <div class="slide-inner">
+ <div class="slide-tag">new skill 2 of 4</div>
+ <h2>Search Experience <span class="accent">Optimization</span></h2>
+ <div class="two-col-2">
+ <div>
+ <p style="margin-bottom:14px">By <strong style="color:var(--text)">Florian Schmitz</strong>. Read SERPs backwards. Find page-type mismatches before Google penalizes them.</p>
+ <div class="feat-list">
+ <div class="feat-item">Page-type taxonomy: informational, transactional, navigational, commercial</div>
+ <div class="feat-item">Persona scoring: visitor intent vs. page intent alignment</div>
+ <div class="feat-item">Detects mismatch (e.g., product page ranking for comparison query) and recommends fixes</div>
+ </div>
+ <div style="background:var(--surface);border:1px solid var(--border);padding:16px;margin-top:14px">
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--coral);text-transform:uppercase;margin-bottom:10px">Example Detection</div>
+ <div style="font-size:11px;color:var(--text-gray);line-height:2">
+ Query: <span style="color:var(--text)">"best crm software"</span> — SERP: <span style="color:var(--amber)">Comparison List</span><br>
+ Your page: <span style="color:var(--rose)">Product Landing Page</span> — Mismatch: <span style="color:var(--rose)">HIGH</span><br>
+ Fix: <span style="color:var(--green)">add comparison table, pricing tiers, feature matrix</span>
+ </div>
+ </div>
+ <div class="cmd"><span class="prompt">$ </span><span class="command">/seo sxo https://yoursite.com/page</span></div>
+ <div class="int-note"><strong>Integration Notes:</strong> Consolidated from four original SKILL.md files that each exceeded the 500-line limit.</div>
+ </div>
+ <div class="ss-item" style="align-items:flex-start">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/florian.png"
+ class="contributor-img"
+ alt="Florian Schmitz's submission post"
+ onerror="this.style.display='none'">
+ <div class="ss-cap" style="margin-top:6px">Florian Schmitz — submission post</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">07 / 15</span>
+</section>
+
+<!-- ===== 08: SEO-DRIFT (Dan) ===== -->
+<section class="slide" id="s8">
+ <div class="slide-inner">
+ <div class="slide-tag">new skill 3 of 4</div>
+ <h2>SEO Drift <span class="accent">Monitoring</span></h2>
+ <div class="two-col-2">
+ <div>
+ <p style="margin-bottom:14px">By <strong style="color:var(--text)">Dan Colta</strong>. Git for SEO. Baseline your pages. Catch regressions before rankings drop.</p>
+ <div class="flow">
+ <div class="flow-row">
+ <div class="flow-box active">baseline</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box">SQLite</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box amber">17 rules</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box green">drift score</div>
+ <span class="flow-arrow">&#10132;</span>
+ <div class="flow-box blue">HTML report</div>
+ </div>
+ </div>
+ <div class="feat-list" style="margin-top:14px">
+ <div class="feat-item">17 rules: title, meta, headings, canonical, schema, internal links, status codes, response time</div>
+ <div class="feat-item">3 severity levels: CRITICAL, WARNING, INFO. Weighted drift score 0–100</div>
+ <div class="feat-item">SQLite at <code style="color:var(--coral);font-size:10px">~/.cache/claude-seo/drift/baselines.db</code></div>
+ <div class="feat-item">Parameterized SQL throughout. html.escape() on all report output</div>
+ </div>
+ <div style="display:flex;gap:8px;margin-top:12px;flex-wrap:wrap">
+ <div class="cmd" style="flex:1;margin-top:0"><span class="prompt">$ </span><span class="command">/seo drift baseline url</span></div>
+ <div class="cmd" style="flex:1;margin-top:0"><span class="prompt">$ </span><span class="command">/seo drift compare url</span></div>
+ </div>
+ <div class="int-note"><strong>Integration Notes:</strong> Parameterized SQL and html.escape() already present in submission — minimal security changes needed.</div>
+ </div>
+ <div class="ss-item" style="align-items:flex-start">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/dan.png"
+ class="contributor-img"
+ alt="Dan Colta's submission post"
+ onerror="this.style.display='none'">
+ <div class="ss-cap" style="margin-top:6px">Dan Colta — submission post</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">08 / 15</span>
+</section>
+
+<!-- ===== 09: SEO-ECOMMERCE (Matej) ===== -->
+<section class="slide" id="s9">
+ <div class="slide-inner">
+ <div class="slide-tag">new skill 4 of 4</div>
+ <h2>E-commerce <span class="accent">SEO</span></h2>
+ <div class="two-col-2">
+ <div>
+ <p style="margin-bottom:14px">By <strong style="color:var(--text)">Matej Marjanovic</strong>. Product schema, marketplace intelligence, and cost-aware DataForSEO.</p>
+ <div class="feat-list">
+ <div class="feat-item">Product and ItemList schema templates added to schema/templates.json</div>
+ <div class="feat-item">DataForSEO Merchant API: live Google Shopping prices + Amazon competitor data</div>
+ <div class="feat-item">Category hierarchy and breadcrumb analysis for large catalogs</div>
+ <div class="feat-item">Auto-detects WooCommerce, Shopify, and custom store implementations</div>
+ </div>
+ <div style="background:var(--surface);border:1px solid rgba(74,222,128,.25);padding:14px;margin-top:14px">
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--green);text-transform:uppercase;margin-bottom:8px">Matej's Cost Guardrail Contribution</div>
+ <div style="font-size:11px;color:var(--text-gray);line-height:1.9">
+ Unknown endpoint: <code style="color:var(--coral)">needs_approval</code> (was: $0.05 default)<br>
+ Budget reset: requires <code style="color:var(--coral)">--confirm</code> + audit trail<br>
+ Result: no surprise DataForSEO bills
+ </div>
+ </div>
+ <div class="cmd"><span class="prompt">$ </span><span class="command">/seo ecommerce https://shop.com/product</span></div>
+ <div class="int-note"><strong>Integration Notes:</strong> Cost guardrail logic extracted and applied globally across all DataForSEO calls, not just ecommerce.</div>
+ </div>
+ <div class="ss-item" style="align-items:flex-start">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/Matej.png"
+ class="contributor-img"
+ alt="Matej Marjanovic's submission post"
+ onerror="this.style.display='none'">
+ <div class="ss-cap" style="margin-top:6px">Matej Marjanovic — submission post</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">09 / 15</span>
+</section>
+
+<!-- ===== 10: SEO-HREFLANG (Chris) ===== -->
+<section class="slide" id="s10">
+ <div class="slide-inner">
+ <div class="slide-tag">enhancement</div>
+ <h2>International SEO <span class="accent">Enhanced</span></h2>
+ <div class="two-col-2">
+ <div>
+ <p style="margin-bottom:14px">By <strong style="color:var(--text)">Chris Muller</strong>. 4 cultural adaptation profiles added to seo-hreflang. Not just tags. Real localization signals.</p>
+ <table class="data-table" style="margin-top:0">
+ <thead><tr><th>Market</th><th>Locales</th><th>Key Signals</th></tr></thead>
+ <tbody>
+ <tr><td style="color:var(--text)">DACH</td><td>de-AT/CH/DE</td><td>Formal Sie, Swiss CHF, legal disclaimers</td></tr>
+ <tr><td style="color:var(--text)">France</td><td>fr-FR</td><td>LCEN compliance, CNIL privacy, formal register</td></tr>
+ <tr><td style="color:var(--text)">Spain</td><td>es-ES/MX</td><td>Regional nuance, EU GDPR, Basque/Catalan</td></tr>
+ <tr><td style="color:var(--text)">Japan</td><td>ja-JP</td><td>Keigo formality, Yahoo/Rakuten signals</td></tr>
+ </tbody>
+ </table>
+ <div class="feat-list" style="margin-top:14px">
+ <div class="feat-item">Validates hreflang syntax and x-default coverage (BCP 47)</div>
+ <div class="feat-item">Content parity scoring across locale pairs</div>
+ <div class="feat-item">3 new reference files in skills/seo-hreflang/references/</div>
+ </div>
+ <div class="cmd"><span class="prompt">$ </span><span class="command">/seo hreflang https://site.com</span></div>
+ <div class="int-note"><strong>Integration Notes:</strong> Blog-specific content extracted for claude-blog; only SEO hreflang parts integrated here.</div>
+ </div>
+ <div class="ss-item" style="align-items:flex-start">
+ <img
+ src="file:///home/agricidaniel/Downloads/pro-hub-challenge-march-screenshots/chris.png"
+ class="contributor-img"
+ alt="Chris Muller's submission post"
+ onerror="this.style.display='none'">
+ <div class="ss-cap" style="margin-top:6px">Chris Muller — submission post</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">10 / 15</span>
+</section>
+
+<!-- ===== 11: ARCHITECTURE EVOLUTION ===== -->
+<section class="slide" id="s11">
+ <div class="slide-inner">
+ <div class="slide-tag">architecture</div>
+ <h2>v1.8 <span class="accent">&#8594;</span> v1.9.0</h2>
+ <div class="two-col" style="margin-top:0">
+ <div>
+ <div class="compare" style="margin-top:0">
+ <div class="compare-col before">
+ <h3>v1.8.x</h3>
+ <div class="compare-item"><span>Skills</span><span class="val">19</span></div>
+ <div class="compare-item"><span>Subagents</span><span class="val">13</span></div>
+ <div class="compare-item"><span>Scripts</span><span class="val">23</span></div>
+ <div class="compare-item"><span>Reference files</span><span class="val">~25</span></div>
+ <div class="compare-item"><span>Schema templates</span><span class="val">8</span></div>
+ <div class="compare-item"><span>Routing commands</span><span class="val">18</span></div>
+ </div>
+ <div class="compare-col after">
+ <h3>v1.9.0</h3>
+ <div class="compare-item"><span>Skills</span><span class="val" style="color:var(--coral)">23 (+4)</span></div>
+ <div class="compare-item"><span>Subagents</span><span class="val" style="color:var(--coral)">17 (+4)</span></div>
+ <div class="compare-item"><span>Scripts</span><span class="val" style="color:var(--coral)">30 (+7)</span></div>
+ <div class="compare-item"><span>Reference files</span><span class="val" style="color:var(--coral)">~38 (+13)</span></div>
+ <div class="compare-item"><span>Schema templates</span><span class="val" style="color:var(--coral)">10 (+2)</span></div>
+ <div class="compare-item"><span>Routing commands</span><span class="val" style="color:var(--coral)">23 (+5)</span></div>
+ </div>
+ </div>
+ </div>
+ <div>
+ <div style="font-size:9px;letter-spacing:1.5px;text-transform:uppercase;color:var(--coral);margin-bottom:10px">7 New Python Scripts</div>
+ <div class="feat-list">
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">dataforseo_costs.py</code> — cost estimation, approval workflow, fcntl budget locking</div>
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">dataforseo_merchant.py</code> — Google Shopping + Amazon via Merchant API</div>
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">dataforseo_normalize.py</code> — shared response normalization utility</div>
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">drift_baseline.py</code> — SQLite baseline capture, SSRF-protected</div>
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">drift_compare.py</code> — 17-rule comparison engine, parameterized SQL</div>
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">drift_report.py</code> — HTML reporting with html.escape() throughout</div>
+ <div class="feat-item"><code style="color:var(--coral);font-size:10px">drift_history.py</code> — read-only timeline query</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">11 / 15</span>
+</section>
+
+<!-- ===== 12: REVIEW PROCESS ===== -->
+<section class="slide" id="s12">
+ <div class="slide-inner">
+ <div class="slide-tag">quality assurance</div>
+ <h2>4 Rounds of <span class="accent">Review</span></h2>
+ <div class="score-timeline">
+ <div class="score-node">
+ <div class="score-val" style="color:var(--amber)">87</div>
+ <div class="score-sub">Round 1</div>
+ <div class="score-desc">Code Review</div>
+ </div>
+ <div class="score-connector"></div>
+ <div class="score-node">
+ <div class="score-val" style="color:var(--amber)">93</div>
+ <div class="score-sub">Round 2</div>
+ <div class="score-desc">Re-Review</div>
+ </div>
+ <div class="score-connector"></div>
+ <div class="score-node">
+ <div class="score-val" style="color:var(--green)">97</div>
+ <div class="score-sub">Round 3</div>
+ <div class="score-desc">Max-Effort</div>
+ </div>
+ <div class="score-connector"></div>
+ <div class="score-node">
+ <div class="score-val" style="color:var(--coral)">85</div>
+ <div class="score-sub">Round 4</div>
+ <div class="score-desc">Security Audit</div>
+ </div>
+ </div>
+
+ <table class="data-table">
+ <thead><tr><th>Round</th><th>Score</th><th>Key Findings</th></tr></thead>
+ <tbody>
+ <tr>
+ <td style="color:var(--text)">1: Code Review</td>
+ <td style="color:var(--amber);font-weight:700">87/100</td>
+ <td>Step numbering collision in orchestrator routing. Agent count wrong in seo-audit skill.</td>
+ </tr>
+ <tr>
+ <td style="color:var(--text)">2: Re-Review</td>
+ <td style="color:var(--amber);font-weight:700">93/100</td>
+ <td>install.ps1 version not bumped. AGENTS.md count off by one. Dead import in dataforseo_merchant.py.</td>
+ </tr>
+ <tr>
+ <td style="color:var(--text)">3: Max-Effort Plan</td>
+ <td style="color:var(--green);font-weight:700">97/100</td>
+ <td>CONTRIBUTING.md insertion at line 25 would have orphaned subsections. New commands in wrong README location.</td>
+ </tr>
+ <tr>
+ <td style="color:var(--text)">4: Security Audit</td>
+ <td style="color:var(--coral);font-weight:700">85/100</td>
+ <td>XSS in SVG rendering. Cost guardrail bypass chain. CI coverage gap. Concurrent write race condition in cost ledger.</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span class="slide-num">12 / 15</span>
+</section>
+
+<!-- ===== 13: SECURITY AUDIT ===== -->
+<section class="slide" id="s13">
+ <div class="slide-inner">
+ <div class="slide-tag">security audit — 8 specialist agents</div>
+ <h2>Security <span class="accent">Audit</span></h2>
+ <div class="two-col-3" style="margin-top:8px">
+ <div>
+ <p style="margin-bottom:14px">OWASP Top 10:2025, STRIDE, MITRE ATT&amp;CK. 15 findings across 3 severity tiers. 10 of 11 deferred findings were already present in v1.8.x — this audit formally documented them for the first time.</p>
+ <table class="data-table" style="margin-top:0">
+ <thead><tr><th>Finding</th><th>Sev</th><th>Status</th></tr></thead>
+ <tbody>
+ <tr>
+ <td>XSS in cluster-map.html: truncate() output inserted raw into SVG DOM</td>
+ <td class="sev-high">HIGH</td>
+ <td class="status-fixed">Fixed: escapeHtml() at render points</td>
+ </tr>
+ <tr>
+ <td>Cost guardrail bypass: unknown endpoint defaulted to $0.05, reset cleared spend without confirmation</td>
+ <td class="sev-high">HIGH</td>
+ <td class="status-fixed">Fixed: needs_approval + --confirm reset</td>
+ </tr>
+ <tr>
+ <td>CI coverage gap: 7 new scripts absent from compile check</td>
+ <td class="sev-med">MED</td>
+ <td class="status-fixed">Fixed: ci.yml 21 → 28 scripts</td>
+ </tr>
+ <tr>
+ <td>Concurrent write race condition in cost ledger</td>
+ <td class="sev-med">MED</td>
+ <td class="status-fixed">Fixed: fcntl shared/exclusive locks</td>
+ </tr>
+ </tbody>
+ </table>
+ <p style="margin-top:10px;font-size:11px;color:var(--text-muted)">11 findings deferred to v1.9.1. All documented. None CRITICAL.</p>
+ </div>
+ <div style="display:flex;flex-direction:column;align-items:center;gap:12px;justify-content:center">
+ <div style="text-align:center">
+ <div style="font-family:var(--grotesk);font-size:90px;font-weight:700;color:var(--coral);line-height:1">85</div>
+ <div style="font-size:9px;letter-spacing:2px;text-transform:uppercase;color:var(--text-muted);margin-top:3px">Security Score / 100</div>
+ </div>
+ <div style="width:100%;display:flex;flex-direction:column;gap:7px">
+ <div style="background:var(--surface);border:1px solid var(--border);padding:10px 14px;display:flex;justify-content:space-between;align-items:center">
+ <span style="font-size:11px;color:var(--text-gray)">CRITICAL</span>
+ <span style="font-family:var(--grotesk);font-size:20px;font-weight:700;color:var(--green)">0</span>
+ </div>
+ <div style="background:var(--surface);border:1px solid var(--border);padding:10px 14px;display:flex;justify-content:space-between;align-items:center">
+ <span style="font-size:11px;color:var(--text-gray)">HIGH</span>
+ <span style="font-family:var(--grotesk);font-size:20px;font-weight:700;color:var(--rose)">4</span>
+ </div>
+ <div style="background:var(--surface);border:1px solid var(--border);padding:10px 14px;display:flex;justify-content:space-between;align-items:center">
+ <span style="font-size:11px;color:var(--text-gray)">MEDIUM</span>
+ <span style="font-family:var(--grotesk);font-size:20px;font-weight:700;color:var(--amber)">6</span>
+ </div>
+ <div style="background:var(--surface);border:1px solid var(--border);padding:10px 14px;display:flex;justify-content:space-between;align-items:center">
+ <span style="font-size:11px;color:var(--text-gray)">LOW</span>
+ <span style="font-family:var(--grotesk);font-size:20px;font-weight:700;color:var(--text-muted)">5</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">13 / 15</span>
+</section>
+
+<!-- ===== 14: DATAFORSEO COST GUARDRAILS ===== -->
+<section class="slide" id="s14">
+ <div class="slide-inner">
+ <div class="slide-tag">technical deep-dive</div>
+ <h2>DataForSEO Cost <span class="accent">Guardrails</span></h2>
+ <p>DataForSEO calls accumulate cost fast when multiple subagents run in parallel. v1.9.0 adds a cost estimation and approval workflow in <code style="color:var(--coral)">scripts/dataforseo_costs.py</code>.</p>
+ <div class="two-col" style="margin-top:16px">
+ <div>
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--rose);text-transform:uppercase;margin-bottom:8px">The Bypass Chain (Closed)</div>
+ <div class="feat-list" style="margin-bottom:14px">
+ <div class="feat-item">Unknown endpoints defaulted to <strong style="color:var(--text)">$0.05 per call</strong>, bypassing the approval gate by using an undocumented endpoint name</div>
+ <div class="feat-item">The reset command cleared cumulative spend with <strong style="color:var(--text)">no confirmation</strong>, letting a misconfigured agent wipe the budget ledger and restart a spending cycle</div>
+ </div>
+ <div class="code-block"><span class="cc"># Before (bypass possible)</span>
+unit_cost = COST_TABLE.get(endpoint, <span class="cs">0.05</span>)
+
+<span class="cc"># After (fixed)</span>
+unit_cost = COST_TABLE.get(endpoint)
+<span class="ck">if</span> unit_cost <span class="ck">is</span> None:
+ <span class="ck">return</span> {<span class="cs">"status"</span>: <span class="cs">"needs_approval"</span>,
+ <span class="cs">"approval_reason"</span>: <span class="cs">"unknown_endpoint"</span>}
+
+<span class="cc"># Reset: now requires --confirm</span>
+<span class="ck">def</span> cmd_reset(args):
+ <span class="ck">if not</span> args.confirm:
+ <span class="ck">return</span> {<span class="cs">"status"</span>: <span class="cs">"blocked"</span>,
+ <span class="cs">"message"</span>: <span class="cs">"Reset requires --confirm flag."</span>}</div>
+ </div>
+ <div>
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--green);text-transform:uppercase;margin-bottom:8px">Concurrent Safety (fcntl)</div>
+ <p style="font-size:12px;margin-bottom:14px">The cost ledger is a JSON file read and written by multiple parallel subagents. v1.9.0 adds <code style="color:var(--coral)">fcntl.flock()</code>: shared lock for reads, exclusive lock for writes. Windows falls back gracefully.</p>
+ <div style="background:var(--surface);border:1px solid var(--border);padding:16px">
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--amber);text-transform:uppercase;margin-bottom:10px">Approval Workflow</div>
+ <div style="font-size:11px;color:var(--text-gray);line-height:2.1">
+ Endpoint: <code style="color:var(--text)">merchant_competitors</code><br>
+ Estimated: <span style="color:var(--amber)">$0.18</span> &nbsp;|&nbsp; Budget: $5.00<br>
+ <span style="color:var(--text)">Proceed? [y/N]</span> <span style="color:var(--green)">← new prompt</span>
+ </div>
+ </div>
+ <div class="int-note" style="margin-top:12px"><strong>Attribution:</strong> Cost guardrail concept from Matej Marjanovic. Applied globally across all DataForSEO calls during integration.</div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">14 / 15</span>
+</section>
+
+<!-- ===== 15: WHAT'S NEXT ===== -->
+<section class="slide" id="s15">
+ <div class="slide-inner">
+ <div class="slide-tag">what's next</div>
+ <h2>v1.9.1 <span class="accent">+</span> Challenge v2</h2>
+ <div class="two-col" style="margin-top:0">
+ <div>
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--text-muted);text-transform:uppercase;margin-bottom:12px">v1.9.1 Security Priorities</div>
+ <div class="ritem high">
+ <h3>H1: DNS Rebinding Gap <span style="font-size:10px;color:var(--rose);font-weight:400">HIGH</span></h3>
+ <p>validate_url() checks IPs at parse time but not at request time. Fix: re-validate resolved IPs at the socket layer.</p>
+ </div>
+ <div class="ritem high">
+ <h3>H2: Install Script Injection <span style="font-size:10px;color:var(--rose);font-weight:400">HIGH</span></h3>
+ <p>install.sh and install.ps1 use unquoted variables. A path with spaces could inject commands. Fix: quote all variable expansions.</p>
+ </div>
+ <div class="ritem med">
+ <h3>M1: OAuth File Permissions <span style="font-size:10px;color:var(--amber);font-weight:400">MEDIUM</span></h3>
+ <p>OAuth token files written world-readable on permissive umask systems. Fix: chmod 600 immediately after writing.</p>
+ </div>
+ </div>
+ <div style="display:flex;flex-direction:column;gap:14px">
+ <div style="text-align:center;margin-bottom:4px">
+ <div style="font-size:10px;letter-spacing:2px;text-transform:uppercase;color:var(--text-muted);margin-bottom:8px">One Word</div>
+ <span class="big-word" style="font-size:clamp(44px,7vw,80px)">LEADS</span>
+ </div>
+ <div style="background:var(--surface);border:1px solid rgba(74,222,128,.25);padding:18px">
+ <div style="font-size:9px;letter-spacing:1.5px;color:var(--green);text-transform:uppercase;margin-bottom:10px">Challenge v2 — Now Open</div>
+ <div class="feat-list">
+ <div class="feat-item">Build anything touching lead gen: skills, n8n workflows, MCP servers, scrapers</div>
+ <div class="feat-item"><strong style="color:var(--amber)">$400</strong> first place + <strong style="color:var(--text-gray)">$200</strong> second place in Claude Credits</div>
+ <div class="feat-item">GitHub repo or .zip + 1-2 min demo video. Solo or team.</div>
+ <div class="feat-item">Deadline: <strong style="color:var(--text)">April 28, 2026</strong></div>
+ </div>
+ </div>
+ <div style="text-align:center;margin-top:4px">
+ <div style="font-family:var(--grotesk);font-size:clamp(14px,2vw,18px);font-weight:700">AI Marketing Hub <span style="color:var(--coral)">Pro</span></div>
+ <div style="font-size:11px;color:var(--text-muted);margin-top:4px">skool.com/ai-marketing-hub-pro</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <span class="slide-num">15 / 15</span>
+</section>
+
+<script>
+const slides = document.querySelectorAll('.slide');
+const dots = document.querySelectorAll('.slide-nav a');
+const bar = document.getElementById('progress');
+
+function currentIndex() {
+ return [...slides].findIndex(s => {
+ const r = s.getBoundingClientRect();
+ return r.top >= -100 && r.top < innerHeight / 2;
+ });
+}
+
+function updateUI() {
+ const i = Math.max(0, currentIndex());
+ dots.forEach(d => d.classList.remove('active'));
+ if (dots[i]) dots[i].classList.add('active');
+ bar.style.width = (i / (slides.length - 1) * 100) + '%';
+}
+
+slides.forEach(s => {
+ new IntersectionObserver(entries => {
+ entries.forEach(e => { if (e.isIntersecting) updateUI(); });
+ }, { threshold: 0.5 }).observe(s);
+});
+
+document.addEventListener('keydown', e => {
+ const i = currentIndex();
+ if (['ArrowDown', ' ', 'ArrowRight'].includes(e.key)) {
+ e.preventDefault();
+ if (i < slides.length - 1) slides[i + 1].scrollIntoView({ behavior: 'smooth' });
+ }
+ if (['ArrowUp', 'ArrowLeft'].includes(e.key)) {
+ e.preventDefault();
+ if (i > 0) slides[i - 1].scrollIntoView({ behavior: 'smooth' });
+ }
+});
+
+updateUI();
+</script>
+</body>
+</html>
diff --git a/claude-seo-slides/youtube-description.md b/claude-seo-slides/youtube-description.md
new file mode 100644
index 0000000..9203d9b
--- /dev/null
+++ b/claude-seo-slides/youtube-description.md
@@ -0,0 +1,90 @@
+# YouTube SEO Package — Claude SEO v1.7.2
+
+## TITLE OPTIONS (A/B Test)
+
+**A:** Claude Code SEO Just Got 19 Skills — Here's What Changed
+**B:** I Built a Free AI SEO Tool With 19 Skills and Google API
+**C:** Claude Code SEO v1.7 — 19 Skills, 3 Extensions, 0 Subscriptions
+
+---
+
+## DESCRIPTION
+
+Claude SEO went from 12 skills to 19, zero extensions to three, and now pulls live data from Google's own APIs. This is the biggest update yet — Google Search Console, PageSpeed Insights, CrUX, GA4, DataForSEO integration, AI image generation, and professional PDF/Excel reports. All open source. All free.
+
+19 AI-powered sub-skills and 12 subagents run your entire SEO audit in parallel. You get a 0-100 health score, a PDF report you can send to clients, live SERP data, keyword research, backlink profiles, schema markup generation, and GEO analysis for AI search engines like ChatGPT, Gemini, and Perplexity.
+
+No subscriptions. No dashboards. One install command.
+
+---
+
+TIMESTAMPS:
+00:00 — What's New in Claude SEO v1.7.2
+00:35 — Google SEO APIs: Live PageSpeed, CrUX, Search Console, GA4
+02:15 — DataForSEO: Live SERP Data, Keywords, Backlinks
+03:30 — The Extension System: How It Works
+04:15 — Plugin Marketplace Compliance
+04:50 — What's Next: v1.8 Roadmap
+
+---
+
+INSTALL CLAUDE SEO (one command):
+curl -fsSL https://raw.githubusercontent.com/AgriciDaniel/claude-seo/main/install.sh | bash
+
+GitHub: https://github.com/AgriciDaniel/claude-seo
+Website: https://claude-seo.md/
+
+OFFICIAL RESOURCES:
+Claude Code Docs: https://code.claude.com/docs
+VS Code Download: https://code.visualstudio.com/
+
+JOIN THE COMMUNITY:
+AI Marketing Hub (free, 2,000+ members): https://www.skool.com/ai-marketing-hub
+AI Marketing Hub Pro (paid): https://www.skool.com/ai-marketing-hub-pro
+
+WEBSITE USED IN DEMO:
+Rankenstein Pro: https://rankenstein.pro — best AI article creation system
+
+ABOUT ME:
+I'm Daniel, host of AI Marketing Hub. I help 2,000+ members learn AI tools for marketing and automation. I build open-source tools because everyone deserves access to the good stuff.
+
+Website: https://agricidaniel.com
+Subscribe: https://youtube.com/@AgriciDaniel
+Past Claude SEO video: https://www.youtube.com/watch?v=COMnNlUakQk
+
+---
+
+This video covers: Claude Code SEO skill, Claude Code tutorial 2026, Claude Code skills, AI SEO tool, free SEO audit tool, AI SEO automation, technical SEO audit, DataForSEO integration, Google Search Console API, PageSpeed Insights API, CrUX API, GA4 analytics, schema markup validation, JSON-LD generation, Core Web Vitals, E-E-A-T content analysis, Generative Engine Optimization (GEO), backlink analysis, AI image generation, open source SEO, free alternative to Ahrefs, free alternative to Semrush, SEO plugin Claude Code.
+
+#ClaudeCode #SEO #AI #OpenSource #FreeSEO #AITools #ClaudeSEO
+
+---
+
+## TAGS (for YouTube Studio)
+
+claude code seo, claude code tutorial, ai seo tool, free seo audit tool, seo automation, claude code skills, open source seo, free seo audit, ai seo, claude code, seo audit tool free, claude code plugin, dataforseo, ai website audit, seo tool 2026, free alternative ahrefs, free alternative semrush, google api seo, pagespeed insights api, search console api, core web vitals, generative engine optimization, geo seo, schema markup, e-e-a-t, claude ai, seo automation ai, ai seo tool 2026, backlink analysis, technical seo audit
+
+---
+
+## KEYWORD RESEARCH DATA (for reference)
+
+| Keyword | Monthly Volume | Competition | In Title? |
+|---------|---------------|-------------|-----------|
+| ai seo tool | 2,900 | LOW | Title B |
+| seo automation | 2,900 | LOW | Tags |
+| free seo audit | 2,400 | MEDIUM | Description |
+| seo audit tool free | 1,600 | LOW | Tags |
+| open source seo tool | 320 | LOW | Description |
+| claude code seo | YouTube-native | N/A | Titles A,C |
+| dataforseo | 1,600 | LOW | Description + Tags |
+
+## COMPETITOR ANALYSIS (YouTube SERP for "claude code seo")
+
+| Video | Views | Hook Used |
+|-------|-------|-----------|
+| Greg Isenberg | 235K | "Ranked Me FIRST on Google (It's OVER for agencies)" |
+| Tim The SEO Guru | 26K | "Rank #1 in 24 hours ($1,600/mo)" |
+| Ryan Doser | 9.7K | "Ranked Me #1 on Google" |
+| Your past video | 31K | "Replaced Your Entire SEO Stack" |
+
+**Our differentiation:** We're the ONLY tool video (not just a workflow). 19 skills, extensions, Google API — no competitor has this depth.
diff --git a/install.ps1 b/install.ps1
index 0e40b95..c1f6b7a 100644
--- a/install.ps1
+++ b/install.ps1
@@ -87,7 +87,7 @@ $AgentDir = "$env:USERPROFILE\.claude\agents"
$RepoUrl = "https://github.com/AgriciDaniel/claude-seo"
# Pin to a specific release tag to prevent silent updates from main.
# Override: $env:CLAUDE_SEO_TAG = 'main'; .\install.ps1
-$RepoTag = if ($env:CLAUDE_SEO_TAG) { $env:CLAUDE_SEO_TAG } else { 'v1.8.2' }
+$RepoTag = if ($env:CLAUDE_SEO_TAG) { $env:CLAUDE_SEO_TAG } else { 'v1.9.0' }
# Create directories
New-Item -ItemType Directory -Force -Path $SkillDir | Out-Null
diff --git a/install.sh b/install.sh
index 96eb2a4..c715f5e 100755
--- a/install.sh
+++ b/install.sh
@@ -10,7 +10,7 @@ main() {
REPO_URL="https://github.com/AgriciDaniel/claude-seo"
# Pin to a specific release tag to prevent silent updates from main.
# Override: CLAUDE_SEO_TAG=main bash install.sh
- REPO_TAG="${CLAUDE_SEO_TAG:-v1.8.2}"
+ REPO_TAG="${CLAUDE_SEO_TAG:-v1.9.0}"
echo "════════════════════════════════════════"
echo "║ Claude SEO - Installer ║"
diff --git a/pyproject.toml b/pyproject.toml
index 4bcae4e..d9bfed1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "claude-seo"
-version = "1.8.2"
+version = "1.9.0"
description = "Comprehensive SEO analysis skill for Claude Code"
requires-python = ">=3.10"
license = "MIT"
diff --git a/schema/templates.json b/schema/templates.json
index b866cb6..c2d4123 100644
--- a/schema/templates.json
+++ b/schema/templates.json
@@ -208,6 +208,67 @@
}
}
}
+ },
+ {
+ "type": "Product (Full E-commerce)",
+ "description": "Complete e-commerce product page with pricing, availability, reviews, brand, and offers. Enables product rich results in Google Search. Added in v1.9.0 for seo-ecommerce.",
+ "template": {
+ "@context": "https://schema.org",
+ "@type": "Product",
+ "name": "[Product Name]",
+ "description": "[Product Description]",
+ "image": "[Product Image URL]",
+ "sku": "[SKU]",
+ "brand": {
+ "@type": "Brand",
+ "name": "[Brand Name]"
+ },
+ "offers": {
+ "@type": "Offer",
+ "price": "[Price]",
+ "priceCurrency": "[Currency Code, e.g. USD]",
+ "availability": "https://schema.org/InStock",
+ "url": "[Product Page URL]",
+ "priceValidUntil": "[YYYY-MM-DD]",
+ "hasMerchantReturnPolicy": {
+ "@type": "MerchantReturnPolicy",
+ "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
+ "merchantReturnDays": 30
+ },
+ "shippingDetails": {
+ "@type": "OfferShippingDetails",
+ "shippingRate": {
+ "@type": "MonetaryAmount",
+ "value": "[Shipping Cost]",
+ "currency": "[Currency Code]"
+ }
+ }
+ },
+ "aggregateRating": {
+ "@type": "AggregateRating",
+ "ratingValue": "[Average Rating]",
+ "reviewCount": "[Number of Reviews]"
+ }
+ }
+ },
+ {
+ "type": "ItemList",
+ "description": "Hub/pillar pages listing related content items. Used for content cluster landing pages, resource directories, and top-N lists. Added in v1.9.0 for seo-cluster.",
+ "template": {
+ "@context": "https://schema.org",
+ "@type": "ItemList",
+ "name": "[Hub Page Title]",
+ "description": "[Hub Page Description]",
+ "numberOfItems": "[Count]",
+ "itemListElement": [
+ {
+ "@type": "ListItem",
+ "position": 1,
+ "url": "[Spoke Page URL]",
+ "name": "[Spoke Page Title]"
+ }
+ ]
+ }
}
]
}
diff --git a/scripts/dataforseo_costs.py b/scripts/dataforseo_costs.py
new file mode 100644
index 0000000..51559ae
--- /dev/null
+++ b/scripts/dataforseo_costs.py
@@ -0,0 +1,500 @@
+#!/usr/bin/env python3
+"""
+DataForSEO API cost estimation, approval, and budget tracking.
+
+Provides cost-aware guardrails for DataForSEO API usage:
+- Estimate costs before API calls
+- Threshold-based approval workflow
+- Session and daily budget tracking
+- Spending history and summaries
+
+Config: ~/.config/claude-seo/dataforseo-costs.json
+Ledger: ~/.config/claude-seo/dataforseo-ledger.json
+
+Usage:
+ python dataforseo_costs.py estimate <endpoint> [--count N]
+ python dataforseo_costs.py check <endpoint> [--count N]
+ python dataforseo_costs.py log <endpoint> <cost> [--note TEXT]
+ python dataforseo_costs.py summary [--days N]
+ python dataforseo_costs.py today
+ python dataforseo_costs.py config [--mode always|threshold|none] [--threshold AMOUNT] [--daily-limit AMOUNT]
+ python dataforseo_costs.py reset
+
+Original concept: Matej Marjanovic (Pro Hub Challenge)
+Security fixes: config path corrected to ~/.config/claude-seo/
+"""
+
+import argparse
+import json
+import os
+import sys
+from datetime import datetime, timedelta
+from pathlib import Path
+
+try:
+ import fcntl
+except ImportError:
+ fcntl = None # Windows fallback: no locking
+
+# ----- paths -----
+CONFIG_DIR = Path.home() / ".config" / "claude-seo"
+CONFIG_FILE = CONFIG_DIR / "dataforseo-costs.json"
+LEDGER_FILE = CONFIG_DIR / "dataforseo-ledger.json"
+
+# ----- cost table (USD per call, standard queue) -----
+# Source: https://dataforseo.com/pricing
+# Prices are approximate; actual costs may vary by parameters.
+COST_TABLE = {
+ # SERP
+ "serp_organic_live_advanced": 0.002,
+ "serp_organic_live_regular": 0.001,
+ "serp_google_images_live_advanced": 0.002,
+ "serp_google_images_live_regular": 0.001,
+ "serp_youtube_organic_live_advanced": 0.002,
+ "serp_youtube_video_info_live_advanced": 0.002,
+ "serp_youtube_video_comments_live_advanced": 0.002,
+ "serp_youtube_video_subtitles_live_advanced": 0.002,
+ # Keywords Data
+ "kw_data_google_ads_search_volume": 0.05,
+ "kw_data_google_trends_explore": 0.01,
+ # DataForSEO Labs
+ "dataforseo_labs_google_keyword_ideas": 0.05,
+ "dataforseo_labs_google_keyword_suggestions": 0.05,
+ "dataforseo_labs_google_related_keywords": 0.05,
+ "dataforseo_labs_bulk_keyword_difficulty": 0.01,
+ "dataforseo_labs_search_intent": 0.01,
+ "dataforseo_labs_google_competitors_domain": 0.05,
+ "dataforseo_labs_google_domain_rank_overview": 0.01,
+ "dataforseo_labs_bulk_traffic_estimation": 0.01,
+ "dataforseo_labs_google_ranked_keywords": 0.05,
+ "dataforseo_labs_google_relevant_pages": 0.05,
+ "dataforseo_labs_google_domain_intersection": 0.05,
+ "dataforseo_labs_google_subdomains": 0.05,
+ "dataforseo_labs_google_top_searches": 0.05,
+ # On-Page
+ "on_page_instant_pages": 0.01,
+ "on_page_content_parsing": 0.01,
+ "on_page_lighthouse": 0.02,
+ # Backlinks
+ "backlinks_summary": 0.02,
+ "backlinks_backlinks": 0.02,
+ "backlinks_anchors": 0.02,
+ "backlinks_referring_domains": 0.02,
+ "backlinks_bulk_spam_score": 0.01,
+ "backlinks_timeseries_summary": 0.02,
+ "backlinks_domain_intersection": 0.05,
+ # Domain Analytics
+ "domain_analytics_technologies_domain_technologies": 0.01,
+ "domain_analytics_whois_overview": 0.005,
+ # Content Analysis
+ "content_analysis_search": 0.02,
+ "content_analysis_summary": 0.02,
+ "content_analysis_phrase_trends": 0.02,
+ # Business Data
+ "business_data_business_listings_search": 0.05,
+ # AI / GEO
+ "ai_optimization_chat_gpt_scraper": 0.05,
+ "ai_opt_llm_ment_search": 0.05,
+ "ai_opt_llm_ment_top_domains": 0.05,
+ "ai_opt_llm_ment_top_pages": 0.05,
+ "ai_opt_llm_ment_agg_metrics": 0.05,
+ "ai_opt_llm_ment_cross_agg_metrics": 0.05,
+ # Merchant (e-commerce)
+ "merchant_google_products_search": 0.02,
+ "merchant_amazon_products_search": 0.02,
+ "merchant_google_sellers_search": 0.02,
+}
+
+# Endpoints that always require confirmation regardless of mode
+WARN_ENDPOINTS = {
+ "backlinks_backlinks",
+ "backlinks_domain_intersection",
+ "ai_optimization_chat_gpt_scraper",
+ "ai_opt_llm_ment_search",
+ "merchant_amazon_products_search",
+}
+
+DEFAULT_CONFIG = {
+ "mode": "threshold",
+ "threshold": 0.50,
+ "daily_limit": 10.00,
+ "warn_endpoints": list(WARN_ENDPOINTS),
+}
+
+
+def _load_config():
+ """Load or create configuration."""
+ if CONFIG_FILE.exists():
+ with open(CONFIG_FILE) as f:
+ cfg = json.load(f)
+ # Merge defaults for missing keys
+ for k, v in DEFAULT_CONFIG.items():
+ cfg.setdefault(k, v)
+ return cfg
+ return dict(DEFAULT_CONFIG)
+
+
+def _save_config(cfg):
+ """Save configuration."""
+ CONFIG_DIR.mkdir(parents=True, exist_ok=True)
+ with open(CONFIG_FILE, "w") as f:
+ json.dump(cfg, f, indent=2)
+
+
+def _load_ledger():
+ """Load spending ledger with file locking."""
+ if not LEDGER_FILE.exists():
+ return {"entries": []}
+ if fcntl:
+ lock_path = LEDGER_FILE.with_suffix(".lock")
+ with open(lock_path, "w") as lock_file:
+ fcntl.flock(lock_file, fcntl.LOCK_SH)
+ try:
+ with open(LEDGER_FILE) as f:
+ return json.load(f)
+ except (json.JSONDecodeError, IOError):
+ return {"entries": []}
+ finally:
+ fcntl.flock(lock_file, fcntl.LOCK_UN)
+ else:
+ with open(LEDGER_FILE) as f:
+ return json.load(f)
+
+
+def _save_ledger(ledger):
+ """Save spending ledger with file locking."""
+ CONFIG_DIR.mkdir(parents=True, exist_ok=True)
+ if fcntl:
+ lock_path = LEDGER_FILE.with_suffix(".lock")
+ with open(lock_path, "w") as lock_file:
+ fcntl.flock(lock_file, fcntl.LOCK_EX)
+ try:
+ with open(LEDGER_FILE, "w") as f:
+ json.dump(ledger, f, indent=2)
+ finally:
+ fcntl.flock(lock_file, fcntl.LOCK_UN)
+ else:
+ with open(LEDGER_FILE, "w") as f:
+ json.dump(ledger, f, indent=2)
+
+
+def _today_str():
+ return datetime.now().strftime("%Y-%m-%d")
+
+
+def _today_spend(ledger):
+ """Calculate today's total spend."""
+ today = _today_str()
+ return sum(
+ e["cost"] for e in ledger["entries"]
+ if e["timestamp"].startswith(today)
+ )
+
+
+def cmd_estimate(args):
+ """Estimate cost for an API call."""
+ endpoint = args.endpoint
+ count = args.count or 1
+ unit_cost = COST_TABLE.get(endpoint)
+
+ if unit_cost is None:
+ # Try fuzzy match
+ matches = [k for k in COST_TABLE if endpoint in k]
+ if matches:
+ result = {
+ "status": "unknown_endpoint",
+ "endpoint": endpoint,
+ "suggestions": matches,
+ "message": f"Unknown endpoint '{endpoint}'. Did you mean: {', '.join(matches)}?"
+ }
+ else:
+ result = {
+ "status": "unknown_endpoint",
+ "endpoint": endpoint,
+ "message": f"Unknown endpoint '{endpoint}'. Cost not in database."
+ }
+ json.dump(result, sys.stdout, indent=2)
+ return
+
+ total = unit_cost * count
+ result = {
+ "status": "estimated",
+ "endpoint": endpoint,
+ "unit_cost_usd": unit_cost,
+ "count": count,
+ "total_cost_usd": round(total, 4),
+ }
+ json.dump(result, sys.stdout, indent=2)
+
+
+def cmd_check(args):
+ """Check if an API call should proceed (cost + approval logic)."""
+ cfg = _load_config()
+ ledger = _load_ledger()
+ endpoint = args.endpoint
+ count = args.count or 1
+ unit_cost = COST_TABLE.get(endpoint)
+ if unit_cost is None:
+ result = {
+ "status": "needs_approval",
+ "endpoint": endpoint,
+ "approval_reason": "unknown_endpoint",
+ "message": f"Unknown endpoint '{endpoint}' — cost not in database. Requires explicit approval.",
+ "estimated_cost_usd": 0.05,
+ }
+ json.dump(result, sys.stdout, indent=2)
+ return
+ total = unit_cost * count
+ today_total = _today_spend(ledger)
+ daily_limit = cfg.get("daily_limit", 10.00)
+ mode = cfg.get("mode", "threshold")
+ threshold = cfg.get("threshold", 0.50)
+
+ # Check daily limit
+ if today_total + total > daily_limit:
+ result = {
+ "status": "blocked",
+ "reason": "daily_limit_exceeded",
+ "today_spend_usd": round(today_total, 4),
+ "this_call_usd": round(total, 4),
+ "daily_limit_usd": daily_limit,
+ "message": f"Daily limit ${daily_limit:.2f} would be exceeded. Today's spend: ${today_total:.2f}, this call: ${total:.2f}."
+ }
+ json.dump(result, sys.stdout, indent=2)
+ return
+
+ # Check approval mode
+ needs_approval = False
+ approval_reason = None
+
+ if endpoint in cfg.get("warn_endpoints", WARN_ENDPOINTS):
+ needs_approval = True
+ approval_reason = "warn_endpoint"
+ elif mode == "always":
+ needs_approval = True
+ approval_reason = "mode_always"
+ elif mode == "threshold" and total >= threshold:
+ needs_approval = True
+ approval_reason = "above_threshold"
+ # mode == "none" -> never needs approval
+
+ result = {
+ "status": "needs_approval" if needs_approval else "approved",
+ "endpoint": endpoint,
+ "unit_cost_usd": unit_cost,
+ "count": count,
+ "total_cost_usd": round(total, 4),
+ "today_spend_usd": round(today_total, 4),
+ "daily_remaining_usd": round(daily_limit - today_total, 4),
+ }
+ if needs_approval:
+ result["approval_reason"] = approval_reason
+ result["message"] = (
+ f"This call costs ~${total:.2f}. "
+ f"Today's spend: ${today_total:.2f}/${daily_limit:.2f}. "
+ f"Reason: {approval_reason}. Proceed?"
+ )
+ json.dump(result, sys.stdout, indent=2)
+
+
+def cmd_log(args):
+ """Log a completed API call cost."""
+ ledger = _load_ledger()
+ entry = {
+ "timestamp": datetime.now().isoformat(),
+ "endpoint": args.endpoint,
+ "cost": args.cost,
+ }
+ if args.note:
+ entry["note"] = args.note
+ ledger["entries"].append(entry)
+ _save_ledger(ledger)
+
+ result = {
+ "status": "logged",
+ "entry": entry,
+ "today_total_usd": round(_today_spend(ledger), 4),
+ }
+ json.dump(result, sys.stdout, indent=2)
+
+
+def cmd_summary(args):
+ """Show spending summary for recent days."""
+ ledger = _load_ledger()
+ days = args.days or 7
+ cutoff = (datetime.now() - timedelta(days=days)).isoformat()
+
+ recent = [e for e in ledger["entries"] if e["timestamp"] >= cutoff]
+
+ # Group by day
+ by_day = {}
+ for e in recent:
+ day = e["timestamp"][:10]
+ by_day.setdefault(day, []).append(e)
+
+ daily_totals = {}
+ for day, entries in sorted(by_day.items()):
+ daily_totals[day] = {
+ "total_usd": round(sum(e["cost"] for e in entries), 4),
+ "calls": len(entries),
+ }
+
+ result = {
+ "status": "summary",
+ "period_days": days,
+ "daily_totals": daily_totals,
+ "grand_total_usd": round(sum(e["cost"] for e in recent), 4),
+ "total_calls": len(recent),
+ }
+ json.dump(result, sys.stdout, indent=2)
+
+
+def cmd_today(args):
+ """Show today's spending."""
+ ledger = _load_ledger()
+ cfg = _load_config()
+ today = _today_str()
+ today_entries = [e for e in ledger["entries"] if e["timestamp"].startswith(today)]
+
+ # Group by endpoint
+ by_endpoint = {}
+ for e in today_entries:
+ ep = e["endpoint"]
+ by_endpoint.setdefault(ep, {"cost": 0, "calls": 0})
+ by_endpoint[ep]["cost"] += e["cost"]
+ by_endpoint[ep]["calls"] += 1
+
+ total = sum(e["cost"] for e in today_entries)
+ daily_limit = cfg.get("daily_limit", 10.00)
+
+ result = {
+ "status": "today",
+ "date": today,
+ "total_usd": round(total, 4),
+ "daily_limit_usd": daily_limit,
+ "remaining_usd": round(daily_limit - total, 4),
+ "calls": len(today_entries),
+ "by_endpoint": {k: {"cost_usd": round(v["cost"], 4), "calls": v["calls"]} for k, v in by_endpoint.items()},
+ }
+ json.dump(result, sys.stdout, indent=2)
+
+
+def cmd_config(args):
+ """View or update configuration."""
+ cfg = _load_config()
+
+ changed = False
+ if args.mode:
+ if args.mode not in ("always", "threshold", "none"):
+ print(json.dumps({"status": "error", "message": "Mode must be: always, threshold, or none"}))
+ sys.exit(1)
+ cfg["mode"] = args.mode
+ changed = True
+ if args.threshold is not None:
+ cfg["threshold"] = args.threshold
+ changed = True
+ if args.daily_limit is not None:
+ cfg["daily_limit"] = args.daily_limit
+ changed = True
+
+ if changed:
+ _save_config(cfg)
+
+ result = {
+ "status": "updated" if changed else "current",
+ "config": cfg,
+ }
+ json.dump(result, sys.stdout, indent=2)
+
+
+def cmd_reset(args):
+ """Reset today's ledger entries (requires --confirm)."""
+ if not args.confirm:
+ result = {
+ "status": "blocked",
+ "message": "Reset requires --confirm flag. This clears today's cost entries.",
+ }
+ json.dump(result, sys.stdout, indent=2)
+ return
+
+ ledger = _load_ledger()
+ today = _today_str()
+ today_entries = [e for e in ledger["entries"] if e["timestamp"].startswith(today)]
+ removed_total = sum(e["cost"] for e in today_entries)
+ removed_count = len(today_entries)
+
+ ledger["entries"] = [e for e in ledger["entries"] if not e["timestamp"].startswith(today)]
+
+ # Immutable audit entry for the reset itself
+ ledger["entries"].append({
+ "timestamp": datetime.now().isoformat(),
+ "endpoint": "_audit_reset",
+ "cost": 0,
+ "note": f"Reset cleared {removed_count} entries totaling ${removed_total:.4f}",
+ })
+
+ _save_ledger(ledger)
+
+ result = {
+ "status": "reset",
+ "date": today,
+ "entries_removed": removed_count,
+ "amount_cleared_usd": round(removed_total, 4),
+ }
+ json.dump(result, sys.stdout, indent=2)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="DataForSEO API cost estimation and budget tracking"
+ )
+ sub = parser.add_subparsers(dest="command", required=True)
+
+ # estimate
+ p_est = sub.add_parser("estimate", help="Estimate cost for an API call")
+ p_est.add_argument("endpoint", help="DataForSEO MCP tool name")
+ p_est.add_argument("--count", type=int, default=1, help="Number of calls")
+
+ # check
+ p_chk = sub.add_parser("check", help="Check if call should proceed")
+ p_chk.add_argument("endpoint", help="DataForSEO MCP tool name")
+ p_chk.add_argument("--count", type=int, default=1, help="Number of calls")
+
+ # log
+ p_log = sub.add_parser("log", help="Log a completed API call cost")
+ p_log.add_argument("endpoint", help="DataForSEO MCP tool name")
+ p_log.add_argument("cost", type=float, help="Actual cost in USD")
+ p_log.add_argument("--note", help="Optional note")
+
+ # summary
+ p_sum = sub.add_parser("summary", help="Show spending summary")
+ p_sum.add_argument("--days", type=int, default=7, help="Number of days")
+
+ # today
+ sub.add_parser("today", help="Show today's spending")
+
+ # config
+ p_cfg = sub.add_parser("config", help="View or update configuration")
+ p_cfg.add_argument("--mode", choices=["always", "threshold", "none"])
+ p_cfg.add_argument("--threshold", type=float)
+ p_cfg.add_argument("--daily-limit", type=float, dest="daily_limit")
+
+ # reset
+ p_reset = sub.add_parser("reset", help="Reset today's ledger entries")
+ p_reset.add_argument("--confirm", action="store_true", help="Confirm reset (required)")
+
+ args = parser.parse_args()
+ dispatch = {
+ "estimate": cmd_estimate,
+ "check": cmd_check,
+ "log": cmd_log,
+ "summary": cmd_summary,
+ "today": cmd_today,
+ "config": cmd_config,
+ "reset": cmd_reset,
+ }
+ dispatch[args.command](args)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/dataforseo_merchant.py b/scripts/dataforseo_merchant.py
new file mode 100755
index 0000000..5ccb33d
--- /dev/null
+++ b/scripts/dataforseo_merchant.py
@@ -0,0 +1,509 @@
+#!/usr/bin/env python3
+"""
+Fetch Google Shopping and Amazon marketplace data via DataForSEO API.
+
+Supports product search, seller analysis, and cross-marketplace comparison.
+Uses task/poll pattern for standard queue (60-80% cost savings vs live).
+
+Usage:
+ python dataforseo_merchant.py search <keyword> [--marketplace google|amazon] [--location 2840]
+ python dataforseo_merchant.py sellers <keyword> [--location 2840]
+ python dataforseo_merchant.py compare <keyword> [--location 2840]
+
+Environment: DATAFORSEO_USERNAME, DATAFORSEO_PASSWORD
+Output: JSON with normalized product data.
+
+Original concept: Matej Marjanovic (Pro Hub Challenge)
+"""
+
+import argparse
+import base64
+import json
+import os
+import sys
+import time
+from typing import Any, Optional
+from urllib.parse import urlparse
+
+# Add scripts directory to path for sibling imports
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+if SCRIPT_DIR not in sys.path:
+ sys.path.insert(0, SCRIPT_DIR)
+
+try:
+ import requests
+except ImportError:
+ print(
+ json.dumps({"error": "requests library required. Install with: pip install requests"}),
+ file=sys.stdout,
+ )
+ sys.exit(1)
+
+
+# ---------------------------------------------------------------------------
+# Constants
+# ---------------------------------------------------------------------------
+
+API_BASE = "https://api.dataforseo.com/v3"
+
+ENDPOINTS = {
+ "google_products": "/merchant/google/products/task_post",
+ "google_products_get": "/merchant/google/products/task_get/advanced",
+ "google_sellers": "/merchant/google/sellers/task_post",
+ "google_sellers_get": "/merchant/google/sellers/task_get/advanced",
+ "amazon_products": "/merchant/amazon/products/task_post",
+ "amazon_products_get": "/merchant/amazon/products/task_get/advanced",
+}
+
+COST_ENDPOINTS = {
+ "google_products": "merchant_google_products_search",
+ "google_sellers": "merchant_google_sellers_search",
+ "amazon_products": "merchant_amazon_products_search",
+}
+
+# Default polling configuration
+POLL_INITIAL_DELAY = 2.0
+POLL_MAX_DELAY = 60.0
+POLL_MULTIPLIER = 2.0
+POLL_MAX_ATTEMPTS = 15
+
+
+# ---------------------------------------------------------------------------
+# Authentication
+# ---------------------------------------------------------------------------
+
+def _get_credentials() -> tuple[str, str]:
+ """Read DataForSEO credentials from environment variables."""
+ username = os.environ.get("DATAFORSEO_USERNAME", "")
+ password = os.environ.get("DATAFORSEO_PASSWORD", "")
+ if not username or not password:
+ print(
+ "Error: DATAFORSEO_USERNAME and DATAFORSEO_PASSWORD environment "
+ "variables must be set.",
+ file=sys.stderr,
+ )
+ result = {
+ "error": "missing_credentials",
+ "message": (
+ "DataForSEO credentials not found. Set DATAFORSEO_USERNAME and "
+ "DATAFORSEO_PASSWORD environment variables."
+ ),
+ }
+ json.dump(result, sys.stdout, indent=2)
+ sys.exit(1)
+ return username, password
+
+
+def _auth_header(username: str, password: str) -> dict[str, str]:
+ """Build HTTP Basic Auth header."""
+ token = base64.b64encode(f"{username}:{password}".encode()).decode()
+ return {
+ "Authorization": f"Basic {token}",
+ "Content-Type": "application/json",
+ }
+
+
+# ---------------------------------------------------------------------------
+# API helpers
+# ---------------------------------------------------------------------------
+
+def _post_task(
+ endpoint_key: str,
+ payload: list[dict[str, Any]],
+ headers: dict[str, str],
+) -> dict[str, Any]:
+ """POST a task to DataForSEO and return the response."""
+ url = f"{API_BASE}{ENDPOINTS[endpoint_key]}"
+ print(f"Posting task to {endpoint_key}...", file=sys.stderr)
+
+ resp = requests.post(url, json=payload, headers=headers, timeout=30, verify=True)
+ resp.raise_for_status()
+ data = resp.json()
+
+ if data.get("status_code") != 20000:
+ return {
+ "error": "api_error",
+ "status_code": data.get("status_code"),
+ "message": data.get("status_message", "Unknown API error"),
+ }
+ return data
+
+
+def _poll_results(
+ endpoint_key: str,
+ task_id: str,
+ headers: dict[str, str],
+) -> dict[str, Any]:
+ """Poll for task results with exponential backoff."""
+ get_key = f"{endpoint_key}_get"
+ url = f"{API_BASE}{ENDPOINTS[get_key]}/{task_id}"
+
+ delay = POLL_INITIAL_DELAY
+ for attempt in range(1, POLL_MAX_ATTEMPTS + 1):
+ print(
+ f"Polling attempt {attempt}/{POLL_MAX_ATTEMPTS} "
+ f"(waiting {delay:.1f}s)...",
+ file=sys.stderr,
+ )
+ time.sleep(delay)
+
+ resp = requests.get(url, headers=headers, timeout=30, verify=True)
+ resp.raise_for_status()
+ data = resp.json()
+
+ status = data.get("status_code")
+ if status == 20000:
+ tasks = data.get("tasks", [])
+ if tasks and tasks[0].get("status_code") == 20000:
+ return data
+ # Task not ready yet
+ task_status = tasks[0].get("status_code") if tasks else None
+ if task_status and task_status != 40601:
+ # 40601 = "Task In Queue" -- keep polling
+ # Other errors: return the error
+ return data
+
+ delay = min(delay * POLL_MULTIPLIER, POLL_MAX_DELAY)
+
+ return {
+ "error": "poll_timeout",
+ "message": f"Task {task_id} did not complete after {POLL_MAX_ATTEMPTS} attempts.",
+ }
+
+
+def _extract_task_id(response: dict[str, Any]) -> Optional[str]:
+ """Extract task ID from POST response."""
+ tasks = response.get("tasks", [])
+ if tasks and "id" in tasks[0]:
+ return tasks[0]["id"]
+ return None
+
+
+def _extract_items(response: dict[str, Any]) -> list[dict[str, Any]]:
+ """Extract result items from DataForSEO response envelope."""
+ items = []
+ for task in response.get("tasks", []):
+ for result in task.get("result", []):
+ task_items = result.get("items")
+ if task_items:
+ items.extend(task_items)
+ return items
+
+
+# ---------------------------------------------------------------------------
+# Normalization
+# ---------------------------------------------------------------------------
+
+def _normalize_price(raw_price: Any) -> Optional[float]:
+ """Normalize price to float."""
+ if raw_price is None:
+ return None
+ if isinstance(raw_price, (int, float)):
+ return round(float(raw_price), 2)
+ if isinstance(raw_price, str):
+ cleaned = raw_price.replace("$", "").replace(",", "").replace(" ", "").strip()
+ try:
+ return round(float(cleaned), 2)
+ except ValueError:
+ return None
+ return None
+
+
+def _normalize_availability(raw: Any) -> str:
+ """Normalize availability to enum."""
+ if not raw:
+ return "unknown"
+ text = str(raw).lower().strip()
+ if "in_stock" in text or "in stock" in text:
+ return "in_stock"
+ if "out_of_stock" in text or "out of stock" in text:
+ return "out_of_stock"
+ if "preorder" in text or "pre-order" in text or "pre_order" in text:
+ return "preorder"
+ return "unknown"
+
+
+def _normalize_product(item: dict[str, Any], marketplace: str) -> dict[str, Any]:
+ """Normalize a single product item."""
+ return {
+ "marketplace": marketplace,
+ "title": item.get("title", ""),
+ "price": _normalize_price(item.get("price")),
+ "currency": item.get("currency", "USD"),
+ "seller": item.get("seller", item.get("seller_name", "")),
+ "rating": round(float(item.get("rating", {}).get("value", 0) or 0), 1)
+ if isinstance(item.get("rating"), dict)
+ else round(float(item.get("rating", 0) or 0), 1),
+ "reviews_count": int(item.get("reviews_count", 0) or 0),
+ "url": item.get("url", ""),
+ "image_url": item.get("image_url", item.get("marketplace_url", "")),
+ "availability": _normalize_availability(item.get("availability")),
+ }
+
+
+def _normalize_seller(item: dict[str, Any]) -> dict[str, Any]:
+ """Normalize a single seller item."""
+ return {
+ "seller_name": item.get("seller_name", item.get("title", "")),
+ "seller_rating": round(float(item.get("seller_rating", 0) or 0), 1),
+ "seller_reviews_count": int(item.get("seller_reviews_count", 0) or 0),
+ "price": _normalize_price(item.get("price")),
+ "delivery_info": item.get("delivery_info", ""),
+ "url": item.get("url", ""),
+ }
+
+
+# ---------------------------------------------------------------------------
+# Commands
+# ---------------------------------------------------------------------------
+
+def cmd_search(args):
+ """Search for products on Google Shopping or Amazon."""
+ username, password = _get_credentials()
+ headers = _auth_header(username, password)
+ marketplace = args.marketplace
+
+ endpoint_key = (
+ "google_products" if marketplace == "google" else "amazon_products"
+ )
+
+ payload = [
+ {
+ "keyword": args.keyword,
+ "location_code": args.location,
+ "language_code": args.language,
+ "depth": args.depth,
+ }
+ ]
+ if args.sort_by:
+ payload[0]["sort_by"] = args.sort_by
+ if args.price_min is not None:
+ payload[0]["price_min"] = args.price_min
+ if args.price_max is not None:
+ payload[0]["price_max"] = args.price_max
+
+ # Post task
+ post_resp = _post_task(endpoint_key, payload, headers)
+ if "error" in post_resp:
+ json.dump(post_resp, sys.stdout, indent=2)
+ return
+
+ task_id = _extract_task_id(post_resp)
+ if not task_id:
+ json.dump(
+ {"error": "no_task_id", "message": "No task ID in response."},
+ sys.stdout,
+ indent=2,
+ )
+ return
+
+ # Poll for results
+ result_resp = _poll_results(endpoint_key, task_id, headers)
+ if "error" in result_resp:
+ json.dump(result_resp, sys.stdout, indent=2)
+ return
+
+ # Extract and normalize
+ items = _extract_items(result_resp)
+ normalized = [_normalize_product(item, marketplace) for item in items]
+
+ # Compute summary statistics
+ prices = [p["price"] for p in normalized if p["price"] is not None]
+ ratings = [p["rating"] for p in normalized if p["rating"] > 0]
+
+ output = {
+ "status": "success",
+ "marketplace": marketplace,
+ "keyword": args.keyword,
+ "location_code": args.location,
+ "total_results": len(normalized),
+ "summary": {
+ "price_min": min(prices) if prices else None,
+ "price_max": max(prices) if prices else None,
+ "price_median": sorted(prices)[len(prices) // 2] if prices else None,
+ "avg_rating": round(sum(ratings) / len(ratings), 2) if ratings else None,
+ "avg_reviews": (
+ round(
+ sum(p["reviews_count"] for p in normalized) / len(normalized), 1
+ )
+ if normalized
+ else None
+ ),
+ },
+ "products": normalized,
+ }
+ json.dump(output, sys.stdout, indent=2)
+
+
+def cmd_sellers(args):
+ """Search for sellers on Google Shopping."""
+ username, password = _get_credentials()
+ headers = _auth_header(username, password)
+
+ payload = [
+ {
+ "keyword": args.keyword,
+ "location_code": args.location,
+ "language_code": args.language,
+ }
+ ]
+
+ post_resp = _post_task("google_sellers", payload, headers)
+ if "error" in post_resp:
+ json.dump(post_resp, sys.stdout, indent=2)
+ return
+
+ task_id = _extract_task_id(post_resp)
+ if not task_id:
+ json.dump(
+ {"error": "no_task_id", "message": "No task ID in response."},
+ sys.stdout,
+ indent=2,
+ )
+ return
+
+ result_resp = _poll_results("google_sellers", task_id, headers)
+ if "error" in result_resp:
+ json.dump(result_resp, sys.stdout, indent=2)
+ return
+
+ items = _extract_items(result_resp)
+ normalized = [_normalize_seller(item) for item in items]
+
+ # Seller dominance analysis
+ seller_counts: dict[str, int] = {}
+ for s in normalized:
+ name = s["seller_name"]
+ seller_counts[name] = seller_counts.get(name, 0) + 1
+
+ top_sellers = sorted(seller_counts.items(), key=lambda x: x[1], reverse=True)[:10]
+
+ output = {
+ "status": "success",
+ "keyword": args.keyword,
+ "location_code": args.location,
+ "total_sellers": len(normalized),
+ "top_sellers": [{"name": n, "listings": c} for n, c in top_sellers],
+ "sellers": normalized,
+ }
+ json.dump(output, sys.stdout, indent=2)
+
+
+def cmd_compare(args):
+ """Cross-marketplace comparison: Google Shopping vs Amazon."""
+ username, password = _get_credentials()
+ headers = _auth_header(username, password)
+
+ results = {}
+
+ for marketplace, endpoint_key in [("google", "google_products"), ("amazon", "amazon_products")]:
+ print(f"Fetching {marketplace} data...", file=sys.stderr)
+ payload = [
+ {
+ "keyword": args.keyword,
+ "location_code": args.location,
+ "language_code": args.language,
+ "depth": args.depth,
+ }
+ ]
+
+ post_resp = _post_task(endpoint_key, payload, headers)
+ if "error" in post_resp:
+ results[marketplace] = {"error": post_resp.get("message", "API error")}
+ continue
+
+ task_id = _extract_task_id(post_resp)
+ if not task_id:
+ results[marketplace] = {"error": "No task ID returned"}
+ continue
+
+ result_resp = _poll_results(endpoint_key, task_id, headers)
+ if "error" in result_resp:
+ results[marketplace] = {"error": result_resp.get("message", "Poll error")}
+ continue
+
+ items = _extract_items(result_resp)
+ normalized = [_normalize_product(item, marketplace) for item in items]
+ prices = [p["price"] for p in normalized if p["price"] is not None]
+ ratings = [p["rating"] for p in normalized if p["rating"] > 0]
+
+ results[marketplace] = {
+ "total_results": len(normalized),
+ "price_min": min(prices) if prices else None,
+ "price_max": max(prices) if prices else None,
+ "price_median": sorted(prices)[len(prices) // 2] if prices else None,
+ "avg_rating": round(sum(ratings) / len(ratings), 2) if ratings else None,
+ "avg_reviews": (
+ round(sum(p["reviews_count"] for p in normalized) / len(normalized), 1)
+ if normalized
+ else None
+ ),
+ "products": normalized[:20], # Top 20 per marketplace for context size
+ }
+
+ output = {
+ "status": "success",
+ "keyword": args.keyword,
+ "location_code": args.location,
+ "comparison": results,
+ }
+ json.dump(output, sys.stdout, indent=2)
+
+
+# ---------------------------------------------------------------------------
+# CLI
+# ---------------------------------------------------------------------------
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Fetch marketplace data via DataForSEO Merchant API"
+ )
+ sub = parser.add_subparsers(dest="command", required=True)
+
+ # Shared arguments
+ def add_common(p):
+ p.add_argument("keyword", help="Product search keyword")
+ p.add_argument(
+ "--location", type=int, default=2840, help="Location code (default: 2840 = US)"
+ )
+ p.add_argument(
+ "--language", default="en", help="Language code (default: en)"
+ )
+
+ # search
+ p_search = sub.add_parser("search", help="Search products on a marketplace")
+ add_common(p_search)
+ p_search.add_argument(
+ "--marketplace",
+ choices=["google", "amazon"],
+ default="google",
+ help="Marketplace to search (default: google)",
+ )
+ p_search.add_argument("--depth", type=int, default=100, help="Number of results")
+ p_search.add_argument("--sort-by", dest="sort_by", help="Sort order")
+ p_search.add_argument("--price-min", dest="price_min", type=float, help="Minimum price filter")
+ p_search.add_argument("--price-max", dest="price_max", type=float, help="Maximum price filter")
+
+ # sellers
+ p_sellers = sub.add_parser("sellers", help="Search sellers on Google Shopping")
+ add_common(p_sellers)
+
+ # compare
+ p_compare = sub.add_parser(
+ "compare", help="Cross-marketplace comparison (Google vs Amazon)"
+ )
+ add_common(p_compare)
+ p_compare.add_argument("--depth", type=int, default=100, help="Number of results")
+
+ args = parser.parse_args()
+
+ dispatch = {
+ "search": cmd_search,
+ "sellers": cmd_sellers,
+ "compare": cmd_compare,
+ }
+ dispatch[args.command](args)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/dataforseo_normalize.py b/scripts/dataforseo_normalize.py
new file mode 100755
index 0000000..c6398d4
--- /dev/null
+++ b/scripts/dataforseo_normalize.py
@@ -0,0 +1,469 @@
+#!/usr/bin/env python3
+"""
+Normalize DataForSEO API responses for consistent consumption by claude-seo skills.
+
+Provides generic helpers (extract_items, truncate_for_context, format_table) and
+per-module normalizers (merchant, social, reviews, etc.).
+
+Usage:
+ python dataforseo_normalize.py <input.json> [--module merchant|social|reviews]
+
+Can also be imported as a library:
+ from dataforseo_normalize import extract_items, normalize_merchant, truncate_for_context
+
+Original concept: Matej Marjanovic (Pro Hub Challenge)
+"""
+
+import argparse
+import json
+import math
+import sys
+from typing import Any, Optional
+
+
+# ---------------------------------------------------------------------------
+# Generic helpers
+# ---------------------------------------------------------------------------
+
+def extract_items(response: dict[str, Any]) -> list[dict[str, Any]]:
+ """
+ Extract data items from a DataForSEO response envelope.
+
+ DataForSEO responses follow a consistent structure:
+ { "tasks": [ { "result": [ { "items": [...] } ] } ] }
+
+ This function walks the envelope and collects all items into a flat list.
+
+ Args:
+ response: Raw DataForSEO JSON response.
+
+ Returns:
+ Flat list of item dicts.
+ """
+ items: list[dict[str, Any]] = []
+ for task in response.get("tasks", []):
+ if task.get("status_code") != 20000:
+ continue
+ for result in task.get("result", []) or []:
+ result_items = result.get("items")
+ if result_items and isinstance(result_items, list):
+ items.extend(result_items)
+ return items
+
+
+def truncate_for_context(
+ data: list[dict[str, Any]],
+ max_tokens: int = 4000,
+ chars_per_token: float = 3.5,
+) -> list[dict[str, Any]]:
+ """
+ Truncate a list of result items to fit within an LLM context budget.
+
+ Uses a simple character-based estimation (avg ~3.5 chars/token for JSON).
+ Items are kept in order; the list is sliced when the budget is exceeded.
+
+ Args:
+ data: List of normalized item dicts.
+ max_tokens: Approximate token budget.
+ chars_per_token: Average characters per token for estimation.
+
+ Returns:
+ Truncated list that fits within the budget.
+ """
+ max_chars = int(max_tokens * chars_per_token)
+ total_chars = 0
+ truncated: list[dict[str, Any]] = []
+
+ for item in data:
+ item_str = json.dumps(item, ensure_ascii=False)
+ item_chars = len(item_str)
+ if total_chars + item_chars > max_chars:
+ break
+ truncated.append(item)
+ total_chars += item_chars
+
+ return truncated
+
+
+def format_markdown_table(
+ items: list[dict[str, Any]],
+ columns: list[str],
+ headers: Optional[list[str]] = None,
+ max_rows: int = 50,
+) -> str:
+ """
+ Format a list of dicts as a Markdown table.
+
+ Args:
+ items: List of dicts to tabulate.
+ columns: Dict keys to include as columns.
+ headers: Human-readable column headers (defaults to column keys).
+ max_rows: Maximum number of rows to include.
+
+ Returns:
+ Markdown-formatted table string.
+ """
+ if not items:
+ return "_No data available._"
+
+ display_headers = headers or [col.replace("_", " ").title() for col in columns]
+
+ # Header row
+ lines = [
+ "| " + " | ".join(display_headers) + " |",
+ "| " + " | ".join(["---"] * len(columns)) + " |",
+ ]
+
+ # Data rows
+ for item in items[:max_rows]:
+ row_values = []
+ for col in columns:
+ val = item.get(col, "")
+ if val is None:
+ val = "--"
+ elif isinstance(val, float):
+ val = f"{val:.2f}" if not val.is_integer() else f"{int(val)}"
+ else:
+ val = str(val)
+ row_values.append(val)
+ lines.append("| " + " | ".join(row_values) + " |")
+
+ if len(items) > max_rows:
+ lines.append(f"\n_...and {len(items) - max_rows} more rows (truncated)._")
+
+ return "\n".join(lines)
+
+
+def compute_statistics(values: list[float]) -> dict[str, Optional[float]]:
+ """
+ Compute basic descriptive statistics for a list of numeric values.
+
+ Args:
+ values: List of floats.
+
+ Returns:
+ Dict with min, max, mean, median, p25, p75, std_dev.
+ """
+ if not values:
+ return {
+ "min": None,
+ "max": None,
+ "mean": None,
+ "median": None,
+ "p25": None,
+ "p75": None,
+ "std_dev": None,
+ "count": 0,
+ }
+
+ sorted_vals = sorted(values)
+ n = len(sorted_vals)
+ mean = sum(sorted_vals) / n
+
+ def _percentile(data: list[float], p: float) -> float:
+ idx = (p / 100) * (len(data) - 1)
+ lower = int(math.floor(idx))
+ upper = int(math.ceil(idx))
+ if lower == upper:
+ return data[lower]
+ frac = idx - lower
+ return data[lower] * (1 - frac) + data[upper] * frac
+
+ variance = sum((x - mean) ** 2 for x in sorted_vals) / n
+ std_dev = math.sqrt(variance)
+
+ return {
+ "min": round(sorted_vals[0], 2),
+ "max": round(sorted_vals[-1], 2),
+ "mean": round(mean, 2),
+ "median": round(_percentile(sorted_vals, 50), 2),
+ "p25": round(_percentile(sorted_vals, 25), 2),
+ "p75": round(_percentile(sorted_vals, 75), 2),
+ "std_dev": round(std_dev, 2),
+ "count": n,
+ }
+
+
+# ---------------------------------------------------------------------------
+# Merchant normalizer
+# ---------------------------------------------------------------------------
+
+def _normalize_price(raw: Any) -> Optional[float]:
+ """Convert various price formats to float."""
+ if raw is None:
+ return None
+ if isinstance(raw, (int, float)):
+ return round(float(raw), 2)
+ if isinstance(raw, str):
+ cleaned = raw.replace("$", "").replace(",", "").replace(" ", "").strip()
+ try:
+ return round(float(cleaned), 2)
+ except ValueError:
+ return None
+ return None
+
+
+def _normalize_currency(raw: Any) -> str:
+ """Normalize currency to ISO 4217 code."""
+ if not raw:
+ return "USD"
+ text = str(raw).upper().strip()
+ # Handle common symbols
+ symbol_map = {"$": "USD", "EUR": "EUR", "GBP": "GBP", "JPY": "JPY"}
+ return symbol_map.get(text, text[:3] if len(text) >= 3 else "USD")
+
+
+def _normalize_availability(raw: Any) -> str:
+ """Normalize availability to enum string."""
+ if not raw:
+ return "unknown"
+ text = str(raw).lower().strip()
+ if "in_stock" in text or "in stock" in text:
+ return "in_stock"
+ if "out_of_stock" in text or "out of stock" in text:
+ return "out_of_stock"
+ if "preorder" in text or "pre-order" in text or "pre_order" in text:
+ return "preorder"
+ return "unknown"
+
+
+def _safe_float(val: Any, default: float = 0.0) -> float:
+ """Safely convert a value to float."""
+ if val is None:
+ return default
+ try:
+ return float(val)
+ except (ValueError, TypeError):
+ return default
+
+
+def _safe_int(val: Any, default: int = 0) -> int:
+ """Safely convert a value to int."""
+ if val is None:
+ return default
+ try:
+ return int(val)
+ except (ValueError, TypeError):
+ return default
+
+
+def normalize_merchant(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
+ """
+ Normalize Google Shopping and Amazon product data.
+
+ Handles variations in DataForSEO response format:
+ - Price as string or number
+ - Rating as nested dict or flat float
+ - Availability as various string formats
+
+ Args:
+ items: Raw item dicts from DataForSEO Merchant API.
+
+ Returns:
+ List of normalized product dicts.
+ """
+ normalized = []
+ for item in items:
+ # Handle rating as dict or scalar
+ rating_raw = item.get("rating")
+ if isinstance(rating_raw, dict):
+ rating_val = _safe_float(rating_raw.get("value") or rating_raw.get("rating_value"))
+ else:
+ rating_val = _safe_float(rating_raw)
+
+ product = {
+ "title": str(item.get("title", "")),
+ "price": _normalize_price(item.get("price")),
+ "currency": _normalize_currency(item.get("currency")),
+ "seller": str(item.get("seller", item.get("seller_name", ""))),
+ "rating": round(rating_val, 1),
+ "reviews_count": _safe_int(item.get("reviews_count")),
+ "url": str(item.get("url", "")),
+ "image_url": str(item.get("image_url", item.get("marketplace_url", ""))),
+ "availability": _normalize_availability(item.get("availability")),
+ }
+
+ # Amazon-specific fields
+ if "asin" in item:
+ product["asin"] = item["asin"]
+ if "is_prime" in item:
+ product["is_prime"] = bool(item["is_prime"])
+ if "is_best_seller" in item:
+ product["is_best_seller"] = bool(item["is_best_seller"])
+
+ # Google-specific fields
+ if "product_id" in item:
+ product["product_id"] = item["product_id"]
+ if "delivery_info" in item:
+ product["delivery_info"] = str(item["delivery_info"])
+
+ normalized.append(product)
+ return normalized
+
+
+# ---------------------------------------------------------------------------
+# Social normalizer (placeholder for future seo-social skill)
+# ---------------------------------------------------------------------------
+
+def normalize_social(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
+ """
+ Normalize social signal data from DataForSEO.
+
+ Placeholder for future seo-social skill integration. Handles social
+ media engagement metrics, share counts, and platform-specific data.
+
+ Args:
+ items: Raw item dicts from DataForSEO social endpoints.
+
+ Returns:
+ List of normalized social signal dicts.
+ """
+ normalized = []
+ for item in items:
+ signal = {
+ "url": str(item.get("url", "")),
+ "title": str(item.get("title", "")),
+ "platform": str(item.get("platform", item.get("source", "unknown"))),
+ "engagement_count": _safe_int(
+ item.get("engagement_count", item.get("social_count", 0))
+ ),
+ "likes": _safe_int(item.get("likes")),
+ "shares": _safe_int(item.get("shares")),
+ "comments": _safe_int(item.get("comments")),
+ "date": str(item.get("date", item.get("datetime", ""))),
+ "sentiment": str(item.get("sentiment", "neutral")),
+ }
+ normalized.append(signal)
+ return normalized
+
+
+# ---------------------------------------------------------------------------
+# Reviews normalizer (placeholder for future expansion)
+# ---------------------------------------------------------------------------
+
+def normalize_reviews(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
+ """
+ Normalize review data from DataForSEO.
+
+ Handles business listing reviews, product reviews, and Google Maps reviews.
+
+ Args:
+ items: Raw item dicts from DataForSEO review endpoints.
+
+ Returns:
+ List of normalized review dicts.
+ """
+ normalized = []
+ for item in items:
+ review = {
+ "author": str(item.get("author", item.get("profile_name", "Anonymous"))),
+ "rating": round(_safe_float(item.get("rating")), 1),
+ "text": str(item.get("text", item.get("review_text", ""))),
+ "date": str(item.get("date", item.get("time_ago", ""))),
+ "source": str(item.get("source", "")),
+ "verified": bool(item.get("is_verified", False)),
+ "helpful_count": _safe_int(item.get("helpful_count", item.get("likes", 0))),
+ }
+ normalized.append(review)
+ return normalized
+
+
+# ---------------------------------------------------------------------------
+# CLI
+# ---------------------------------------------------------------------------
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Normalize DataForSEO API responses for claude-seo skills"
+ )
+ parser.add_argument("input", help="Input JSON file (use - for stdin)")
+ parser.add_argument(
+ "--module",
+ choices=["merchant", "social", "reviews"],
+ default="merchant",
+ help="Normalizer module to use (default: merchant)",
+ )
+ parser.add_argument(
+ "--max-tokens",
+ type=int,
+ default=0,
+ dest="max_tokens",
+ help="Truncate output to fit token budget (0 = no truncation)",
+ )
+ parser.add_argument(
+ "--table",
+ action="store_true",
+ help="Output as Markdown table instead of JSON",
+ )
+ parser.add_argument(
+ "--columns",
+ help="Comma-separated column names for table output",
+ )
+ parser.add_argument(
+ "--stats",
+ action="store_true",
+ help="Include price/rating statistics in output",
+ )
+
+ args = parser.parse_args()
+
+ # Read input
+ if args.input == "-":
+ data = json.load(sys.stdin)
+ else:
+ with open(args.input) as f:
+ data = json.load(f)
+
+ # Extract items from response envelope
+ items = extract_items(data) if "tasks" in data else data
+ if isinstance(items, dict):
+ items = [items]
+
+ # Normalize
+ normalizers = {
+ "merchant": normalize_merchant,
+ "social": normalize_social,
+ "reviews": normalize_reviews,
+ }
+ normalized = normalizers[args.module](items)
+
+ # Truncate if requested
+ if args.max_tokens > 0:
+ normalized = truncate_for_context(normalized, max_tokens=args.max_tokens)
+
+ # Output
+ if args.table:
+ columns = (
+ args.columns.split(",")
+ if args.columns
+ else _default_columns(args.module)
+ )
+ print(format_markdown_table(normalized, columns))
+ else:
+ output: dict[str, Any] = {
+ "module": args.module,
+ "total_items": len(normalized),
+ "items": normalized,
+ }
+
+ if args.stats and args.module == "merchant":
+ prices = [p["price"] for p in normalized if p.get("price") is not None]
+ ratings = [p["rating"] for p in normalized if p.get("rating", 0) > 0]
+ output["price_stats"] = compute_statistics(prices)
+ output["rating_stats"] = compute_statistics(ratings)
+
+ json.dump(output, sys.stdout, indent=2)
+
+
+def _default_columns(module: str) -> list[str]:
+ """Return default table columns for each module."""
+ defaults = {
+ "merchant": ["title", "price", "currency", "seller", "rating", "reviews_count", "availability"],
+ "social": ["platform", "title", "engagement_count", "likes", "shares", "date"],
+ "reviews": ["author", "rating", "text", "date", "source", "verified"],
+ }
+ return defaults.get(module, ["title"])
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/drift_baseline.py b/scripts/drift_baseline.py
new file mode 100644
index 0000000..454c534
--- /dev/null
+++ b/scripts/drift_baseline.py
@@ -0,0 +1,410 @@
+#!/usr/bin/env python3
+"""
+Capture an SEO baseline snapshot of a page's critical elements.
+
+Stores title, meta tags, canonical, headings, schema/JSON-LD, OG tags,
+and Core Web Vitals as a "known good" state in SQLite.
+
+Usage:
+ python drift_baseline.py <url> [--skip-cwv]
+
+Output: JSON with baseline ID, timestamp, and captured elements.
+Storage: ~/.cache/claude-seo/drift/baselines.db
+"""
+
+import argparse
+import hashlib
+import json
+import os
+import re
+import sqlite3
+import subprocess
+import sys
+from datetime import datetime, timezone
+from urllib.parse import parse_qs, urlparse, urlunparse, urlencode
+
+# ---------------------------------------------------------------------------
+# Path setup — resolve scripts/ directory relative to this file
+# ---------------------------------------------------------------------------
+SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, SCRIPTS_DIR)
+
+from google_auth import validate_url # noqa: E402
+
+DB_DIR = os.path.expanduser("~/.cache/claude-seo/drift")
+DB_PATH = os.path.join(DB_DIR, "baselines.db")
+
+# UTM parameters to strip during URL normalization
+UTM_PARAMS = {"utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"}
+
+
+# ---------------------------------------------------------------------------
+# URL normalization
+# ---------------------------------------------------------------------------
+
+def normalize_url(url: str) -> str:
+ """
+ Normalize a URL for consistent baseline matching.
+
+ - Lowercase scheme and host
+ - Strip default ports (80 for http, 443 for https)
+ - Sort query parameters
+ - Remove UTM parameters
+ - Strip trailing slash (except bare domain)
+ """
+ parsed = urlparse(url)
+
+ scheme = parsed.scheme.lower()
+ hostname = (parsed.hostname or "").lower()
+
+ # Strip default ports
+ port = parsed.port
+ if (scheme == "http" and port == 80) or (scheme == "https" and port == 443):
+ port = None
+
+ netloc = hostname
+ if port:
+ netloc = f"{hostname}:{port}"
+
+ # Sort query params and strip UTM
+ query_params = parse_qs(parsed.query, keep_blank_values=True)
+ filtered = {k: v for k, v in sorted(query_params.items()) if k not in UTM_PARAMS}
+ query = urlencode(filtered, doseq=True)
+
+ # Strip trailing slash (but keep "/" for bare domain)
+ path = parsed.path.rstrip("/") or "/"
+
+ return urlunparse((scheme, netloc, path, "", query, ""))
+
+
+def url_hash(url: str) -> str:
+ """SHA-256 hash of normalized URL, truncated to 16 hex chars."""
+ normalized = normalize_url(url)
+ return hashlib.sha256(normalized.encode()).hexdigest()[:16]
+
+
+# ---------------------------------------------------------------------------
+# Database setup
+# ---------------------------------------------------------------------------
+
+def init_db() -> sqlite3.Connection:
+ """Initialize the SQLite database and return a connection."""
+ os.makedirs(DB_DIR, exist_ok=True)
+ conn = sqlite3.connect(DB_PATH)
+ conn.execute("PRAGMA journal_mode=WAL")
+ conn.execute("""
+ CREATE TABLE IF NOT EXISTS baselines (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ url TEXT NOT NULL,
+ url_hash TEXT NOT NULL,
+ timestamp TEXT NOT NULL,
+ title TEXT,
+ meta_description TEXT,
+ canonical TEXT,
+ robots TEXT,
+ h1 TEXT,
+ h2_json TEXT,
+ h3_json TEXT,
+ schema_json TEXT,
+ og_json TEXT,
+ cwv_json TEXT,
+ html_hash TEXT,
+ schema_hash TEXT,
+ status_code INTEGER
+ )
+ """)
+ conn.execute("""
+ CREATE INDEX IF NOT EXISTS idx_url_hash ON baselines(url_hash)
+ """)
+ conn.execute("""
+ CREATE TABLE IF NOT EXISTS comparisons (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ url TEXT NOT NULL,
+ url_hash TEXT NOT NULL,
+ baseline_id INTEGER NOT NULL,
+ timestamp TEXT NOT NULL,
+ results_json TEXT NOT NULL,
+ critical_count INTEGER DEFAULT 0,
+ warning_count INTEGER DEFAULT 0,
+ info_count INTEGER DEFAULT 0,
+ FOREIGN KEY (baseline_id) REFERENCES baselines(id)
+ )
+ """)
+ conn.execute("""
+ CREATE INDEX IF NOT EXISTS idx_comp_url_hash ON comparisons(url_hash)
+ """)
+ conn.commit()
+ return conn
+
+
+# ---------------------------------------------------------------------------
+# Page fetching via existing scripts (SSRF-protected)
+# ---------------------------------------------------------------------------
+
+def fetch_page_data(url: str) -> dict:
+ """
+ Fetch and parse a page using the project's existing scripts.
+
+ Returns dict with keys: status_code, html, parsed, error
+ """
+ result = {"status_code": None, "html": None, "parsed": None, "error": None}
+
+ # Step 1: Fetch the page via fetch_page.py
+ fetch_script = os.path.join(SCRIPTS_DIR, "fetch_page.py")
+ try:
+ proc = subprocess.run(
+ [sys.executable, fetch_script, url, "--output", "/dev/stdout"],
+ capture_output=True,
+ text=True,
+ timeout=60,
+ )
+ except subprocess.TimeoutExpired:
+ result["error"] = "Page fetch timed out after 60 seconds"
+ return result
+
+ if proc.returncode != 0:
+ error_msg = proc.stderr.strip() if proc.stderr else "Unknown fetch error"
+ result["error"] = f"Fetch failed: {error_msg}"
+ return result
+
+ html_content = proc.stdout
+
+ # Extract status code from stderr output (fetch_page.py prints "Status: NNN")
+ status_match = re.search(r"Status:\s*(\d+)", proc.stderr or "")
+ result["status_code"] = int(status_match.group(1)) if status_match else 200
+ result["html"] = html_content
+
+ # Step 2: Parse the HTML via parse_html.py
+ parse_script = os.path.join(SCRIPTS_DIR, "parse_html.py")
+ try:
+ proc = subprocess.run(
+ [sys.executable, parse_script, "--url", url, "--json"],
+ input=html_content,
+ capture_output=True,
+ text=True,
+ timeout=30,
+ )
+ except subprocess.TimeoutExpired:
+ result["error"] = "HTML parsing timed out after 30 seconds"
+ return result
+
+ if proc.returncode != 0:
+ error_msg = proc.stderr.strip() if proc.stderr else "Unknown parse error"
+ result["error"] = f"Parse failed: {error_msg}"
+ return result
+
+ try:
+ result["parsed"] = json.loads(proc.stdout)
+ except json.JSONDecodeError as e:
+ result["error"] = f"Failed to parse JSON output: {e}"
+
+ return result
+
+
+def fetch_cwv_data(url: str) -> dict | None:
+ """
+ Fetch Core Web Vitals via pagespeed_check.py.
+
+ Returns CWV dict or None on failure.
+ """
+ psi_script = os.path.join(SCRIPTS_DIR, "pagespeed_check.py")
+ try:
+ proc = subprocess.run(
+ [sys.executable, psi_script, url, "--psi-only", "--strategy", "mobile", "--json"],
+ capture_output=True,
+ text=True,
+ timeout=180,
+ )
+ except subprocess.TimeoutExpired:
+ return None
+
+ if proc.returncode != 0:
+ return None
+
+ try:
+ data = json.loads(proc.stdout)
+ except json.JSONDecodeError:
+ return None
+
+ # Extract the key metrics
+ psi = data.get("psi", {}).get("mobile", {})
+ if psi.get("error"):
+ return None
+
+ cwv = {
+ "performance_score": psi.get("lighthouse_scores", {}).get("performance"),
+ "lab_metrics": psi.get("lab_metrics", {}),
+ "field_metrics": psi.get("field_metrics", {}),
+ }
+ return cwv
+
+
+# ---------------------------------------------------------------------------
+# Hashing
+# ---------------------------------------------------------------------------
+
+def hash_content(content: str) -> str:
+ """SHA-256 hash of content string."""
+ return hashlib.sha256(content.encode("utf-8")).hexdigest()
+
+
+# ---------------------------------------------------------------------------
+# Main baseline capture
+# ---------------------------------------------------------------------------
+
+def capture_baseline(url: str, skip_cwv: bool = False) -> dict:
+ """
+ Capture a full SEO baseline for a URL.
+
+ Args:
+ url: The URL to baseline.
+ skip_cwv: If True, skip Core Web Vitals fetch.
+
+ Returns:
+ Dict with baseline data or error.
+ """
+ # Validate URL (SSRF protection)
+ if not validate_url(url):
+ return {"error": "URL rejected: only public http/https URLs are accepted (SSRF protection)"}
+
+ # Fetch and parse the page
+ page_data = fetch_page_data(url)
+ if page_data["error"]:
+ return {"error": page_data["error"]}
+
+ parsed = page_data["parsed"]
+ if not parsed:
+ return {"error": "No parsed data returned from HTML parser"}
+
+ # Fetch CWV (optional)
+ cwv_data = None
+ if not skip_cwv:
+ cwv_data = fetch_cwv_data(url)
+
+ # Compute hashes
+ html_content_hash = hash_content(page_data["html"]) if page_data["html"] else None
+ schema_content = json.dumps(parsed.get("schema", []), sort_keys=True)
+ schema_content_hash = hash_content(schema_content) if parsed.get("schema") else None
+
+ # Prepare baseline record
+ now = datetime.now(timezone.utc).isoformat()
+ norm_url = normalize_url(url)
+ uhash = url_hash(url)
+
+ h1_list = parsed.get("h1", [])
+ h1_text = h1_list[0] if h1_list else None
+
+ baseline = {
+ "url": norm_url,
+ "url_hash": uhash,
+ "timestamp": now,
+ "title": parsed.get("title"),
+ "meta_description": parsed.get("meta_description"),
+ "canonical": parsed.get("canonical"),
+ "robots": parsed.get("meta_robots"),
+ "h1": h1_text,
+ "h2_json": json.dumps(parsed.get("h2", [])),
+ "h3_json": json.dumps(parsed.get("h3", [])),
+ "schema_json": json.dumps(parsed.get("schema", [])),
+ "og_json": json.dumps(parsed.get("open_graph", {})),
+ "cwv_json": json.dumps(cwv_data) if cwv_data else None,
+ "html_hash": html_content_hash,
+ "schema_hash": schema_content_hash,
+ "status_code": page_data["status_code"],
+ }
+
+ # Store in SQLite
+ conn = init_db()
+ try:
+ cursor = conn.execute(
+ """
+ INSERT INTO baselines (
+ url, url_hash, timestamp, title, meta_description, canonical,
+ robots, h1, h2_json, h3_json, schema_json, og_json, cwv_json,
+ html_hash, schema_hash, status_code
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+ """,
+ (
+ baseline["url"],
+ baseline["url_hash"],
+ baseline["timestamp"],
+ baseline["title"],
+ baseline["meta_description"],
+ baseline["canonical"],
+ baseline["robots"],
+ baseline["h1"],
+ baseline["h2_json"],
+ baseline["h3_json"],
+ baseline["schema_json"],
+ baseline["og_json"],
+ baseline["cwv_json"],
+ baseline["html_hash"],
+ baseline["schema_hash"],
+ baseline["status_code"],
+ ),
+ )
+ conn.commit()
+ baseline_id = cursor.lastrowid
+ finally:
+ conn.close()
+
+ # Build summary output
+ h2_count = len(parsed.get("h2", []))
+ h3_count = len(parsed.get("h3", []))
+ schema_count = len(parsed.get("schema", []))
+ og_count = len(parsed.get("open_graph", {}))
+
+ output = {
+ "status": "ok",
+ "baseline_id": baseline_id,
+ "url": norm_url,
+ "timestamp": now,
+ "summary": {
+ "title": baseline["title"],
+ "meta_description": (
+ baseline["meta_description"][:80] + "..."
+ if baseline["meta_description"] and len(baseline["meta_description"]) > 80
+ else baseline["meta_description"]
+ ),
+ "canonical": baseline["canonical"],
+ "robots": baseline["robots"],
+ "h1": baseline["h1"],
+ "h2_count": h2_count,
+ "h3_count": h3_count,
+ "schema_count": schema_count,
+ "og_tag_count": og_count,
+ "cwv_captured": cwv_data is not None,
+ "status_code": baseline["status_code"],
+ "html_hash": html_content_hash[:12] + "..." if html_content_hash else None,
+ },
+ }
+
+ return output
+
+
+# ---------------------------------------------------------------------------
+# CLI
+# ---------------------------------------------------------------------------
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Capture an SEO baseline snapshot for drift monitoring"
+ )
+ parser.add_argument("url", help="URL to baseline")
+ parser.add_argument(
+ "--skip-cwv",
+ action="store_true",
+ help="Skip Core Web Vitals fetch (faster, uses less API quota)",
+ )
+
+ args = parser.parse_args()
+ result = capture_baseline(args.url, skip_cwv=args.skip_cwv)
+
+ print(json.dumps(result, indent=2))
+
+ if result.get("error"):
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/drift_compare.py b/scripts/drift_compare.py
new file mode 100644
index 0000000..9aa4de7
--- /dev/null
+++ b/scripts/drift_compare.py
@@ -0,0 +1,544 @@
+#!/usr/bin/env python3
+"""
+Compare current page state to stored baseline and detect SEO drift.
+
+Applies 17 comparison rules across 3 severity levels (CRITICAL, WARNING, INFO).
+Fetches current page state and compares against the most recent baseline.
+
+Usage:
+ python drift_compare.py <url> [--skip-cwv] [--baseline-id ID]
+
+Output: JSON with diffs, severity levels, and recommended actions.
+"""
+
+import argparse
+import json
+import os
+import sqlite3
+import sys
+from datetime import datetime, timezone
+from difflib import SequenceMatcher
+
+# ---------------------------------------------------------------------------
+# Path setup
+# ---------------------------------------------------------------------------
+SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, SCRIPTS_DIR)
+
+from google_auth import validate_url # noqa: E402
+from drift_baseline import ( # noqa: E402
+ DB_PATH,
+ fetch_cwv_data,
+ fetch_page_data,
+ hash_content,
+ init_db,
+ normalize_url,
+ url_hash,
+)
+
+
+# ---------------------------------------------------------------------------
+# Baseline loading
+# ---------------------------------------------------------------------------
+
+def load_baseline(conn: sqlite3.Connection, uhash: str, baseline_id: int | None = None) -> dict | None:
+ """
+ Load the most recent baseline for a URL hash, or a specific baseline by ID.
+
+ All queries use parameterized placeholders.
+ """
+ if baseline_id is not None:
+ row = conn.execute(
+ "SELECT * FROM baselines WHERE id = ? AND url_hash = ?",
+ (baseline_id, uhash),
+ ).fetchone()
+ else:
+ row = conn.execute(
+ "SELECT * FROM baselines WHERE url_hash = ? ORDER BY id DESC LIMIT 1",
+ (uhash,),
+ ).fetchone()
+
+ if not row:
+ return None
+
+ columns = [desc[0] for desc in conn.execute("SELECT * FROM baselines LIMIT 0").description]
+ return dict(zip(columns, row))
+
+
+# ---------------------------------------------------------------------------
+# Comparison rules
+# ---------------------------------------------------------------------------
+
+def _make_finding(rule: str, severity: str, triggered: bool, old_value, new_value, message: str) -> dict:
+ """Create a standardized finding dict."""
+ return {
+ "rule": rule,
+ "severity": severity,
+ "triggered": triggered,
+ "old_value": old_value,
+ "new_value": new_value,
+ "message": message,
+ }
+
+
+def rule_01_schema_removed(baseline: dict, current: dict) -> dict:
+ """CRITICAL: Schema/JSON-LD completely removed."""
+ old_schema = json.loads(baseline.get("schema_json") or "[]")
+ new_schema = current.get("schema", [])
+ triggered = len(old_schema) > 0 and len(new_schema) == 0
+ return _make_finding(
+ "schema_removed", "CRITICAL", triggered,
+ f"{len(old_schema)} schema block(s)",
+ "0 schema blocks",
+ "All structured data (JSON-LD) has been removed. Rich results will be lost. Restore immediately."
+ if triggered else "Schema presence unchanged.",
+ )
+
+
+def rule_02_canonical_changed(baseline: dict, current: dict) -> dict:
+ """CRITICAL: Canonical URL changed."""
+ old = baseline.get("canonical")
+ new = current.get("canonical")
+ triggered = old is not None and new is not None and old != new
+ return _make_finding(
+ "canonical_changed", "CRITICAL", triggered,
+ old, new,
+ f"Canonical URL changed from '{old}' to '{new}'. Verify this is intentional."
+ if triggered else "Canonical URL unchanged.",
+ )
+
+
+def rule_03_canonical_removed(baseline: dict, current: dict) -> dict:
+ """CRITICAL: Canonical URL removed."""
+ old = baseline.get("canonical")
+ new = current.get("canonical")
+ triggered = old is not None and (new is None or new == "")
+ return _make_finding(
+ "canonical_removed", "CRITICAL", triggered,
+ old, None,
+ "Canonical tag has been removed. Google will guess the canonical, often incorrectly."
+ if triggered else "Canonical tag presence unchanged.",
+ )
+
+
+def rule_04_noindex_added(baseline: dict, current: dict) -> dict:
+ """CRITICAL: Noindex directive added."""
+ old_robots = (baseline.get("robots") or "").lower()
+ new_robots = (current.get("meta_robots") or "").lower()
+ triggered = "noindex" not in old_robots and "noindex" in new_robots
+ return _make_finding(
+ "noindex_added", "CRITICAL", triggered,
+ baseline.get("robots"), current.get("meta_robots"),
+ "A 'noindex' directive has been added. The page will be dropped from search results within days."
+ if triggered else "Robots directives unchanged regarding noindex.",
+ )
+
+
+def rule_05_h1_removed(baseline: dict, current: dict) -> dict:
+ """CRITICAL: H1 tag removed entirely."""
+ old_h1 = baseline.get("h1")
+ new_h1_list = current.get("h1", [])
+ triggered = old_h1 is not None and old_h1 != "" and len(new_h1_list) == 0
+ return _make_finding(
+ "h1_removed", "CRITICAL", triggered,
+ old_h1, None,
+ "H1 heading has been removed. Primary topic signal for search engines is gone."
+ if triggered else "H1 presence unchanged.",
+ )
+
+
+def rule_06_h1_changed_significantly(baseline: dict, current: dict) -> dict:
+ """CRITICAL: H1 text changed significantly (>50% different)."""
+ old_h1 = baseline.get("h1") or ""
+ new_h1_list = current.get("h1", [])
+ new_h1 = new_h1_list[0] if new_h1_list else ""
+
+ if not old_h1 or not new_h1:
+ return _make_finding("h1_changed", "CRITICAL", False, old_h1, new_h1, "H1 comparison skipped (one side empty).")
+
+ ratio = SequenceMatcher(None, old_h1, new_h1).ratio()
+ triggered = ratio < 0.5
+ return _make_finding(
+ "h1_changed", "CRITICAL", triggered,
+ old_h1, new_h1,
+ f"H1 changed significantly (similarity: {ratio:.0%}). Verify keyword targeting is preserved."
+ if triggered else f"H1 text is similar enough (similarity: {ratio:.0%}).",
+ )
+
+
+def rule_07_title_removed(baseline: dict, current: dict) -> dict:
+ """CRITICAL: Title tag removed entirely."""
+ old = baseline.get("title")
+ new = current.get("title")
+ triggered = old is not None and old != "" and (new is None or new == "")
+ return _make_finding(
+ "title_removed", "CRITICAL", triggered,
+ old, None,
+ "Title tag has been removed. Google will auto-generate one, often poorly."
+ if triggered else "Title tag presence unchanged.",
+ )
+
+
+def rule_08_status_code_error(baseline: dict, current_status: int | None) -> dict:
+ """CRITICAL: HTTP status code changed to 4xx or 5xx."""
+ old = baseline.get("status_code")
+ new = current_status
+ old_ok = old is not None and 200 <= old < 400
+ new_error = new is not None and new >= 400
+ triggered = old_ok and new_error
+ return _make_finding(
+ "status_code_error", "CRITICAL", triggered,
+ old, new,
+ f"Page now returns HTTP {new} (was {old}). Rankings will drop within days."
+ if triggered else f"Status code: {old} -> {new}.",
+ )
+
+
+def rule_09_title_changed(baseline: dict, current: dict) -> dict:
+ """WARNING: Title text changed."""
+ old = (baseline.get("title") or "").strip()
+ new = (current.get("title") or "").strip()
+ # Only trigger if both exist and differ (removal is Rule 7)
+ triggered = old != "" and new != "" and old != new
+ return _make_finding(
+ "title_changed", "WARNING", triggered,
+ old, new,
+ "Title tag text has changed. Monitor CTR in Search Console over 2 weeks."
+ if triggered else "Title text unchanged.",
+ )
+
+
+def rule_10_meta_description_changed(baseline: dict, current: dict) -> dict:
+ """WARNING: Meta description changed."""
+ old = (baseline.get("meta_description") or "").strip()
+ new = (current.get("meta_description") or "").strip()
+ triggered = old != "" and new != "" and old != new
+ return _make_finding(
+ "meta_description_changed", "WARNING", triggered,
+ old[:120] + ("..." if len(old) > 120 else ""),
+ new[:120] + ("..." if len(new) > 120 else ""),
+ "Meta description has changed. Verify it includes target keywords and CTA."
+ if triggered else "Meta description unchanged.",
+ )
+
+
+def rule_11_cwv_regressed(baseline: dict, current_cwv: dict | None) -> dict:
+ """WARNING: Core Web Vitals metric regressed >20%."""
+ old_cwv = json.loads(baseline.get("cwv_json") or "null")
+ if not old_cwv or not current_cwv:
+ return _make_finding("cwv_regressed", "WARNING", False, None, None, "CWV comparison skipped (data unavailable).")
+
+ regressions = []
+ old_lab = old_cwv.get("lab_metrics", {})
+ new_lab = current_cwv.get("lab_metrics", {})
+
+ for metric_id in ["largest-contentful-paint", "cumulative-layout-shift", "total-blocking-time"]:
+ old_val = old_lab.get(metric_id, {}).get("value")
+ new_val = new_lab.get(metric_id, {}).get("value")
+ if old_val is not None and new_val is not None and old_val > 0:
+ pct_change = (new_val - old_val) / old_val
+ if pct_change > 0.20: # >20% worse (higher is worse for all these)
+ regressions.append(f"{metric_id}: {old_val:.0f} -> {new_val:.0f} (+{pct_change:.0%})")
+
+ triggered = len(regressions) > 0
+ return _make_finding(
+ "cwv_regressed", "WARNING", triggered,
+ {k: v.get("value") for k, v in old_lab.items()} if old_lab else None,
+ {k: v.get("value") for k, v in new_lab.items()} if new_lab else None,
+ f"CWV regressions detected: {'; '.join(regressions)}"
+ if triggered else "No significant CWV regressions.",
+ )
+
+
+def rule_12_performance_score_dropped(baseline: dict, current_cwv: dict | None) -> dict:
+ """WARNING: CWV performance score dropped 10+ points."""
+ old_cwv = json.loads(baseline.get("cwv_json") or "null")
+ if not old_cwv or not current_cwv:
+ return _make_finding("perf_score_dropped", "WARNING", False, None, None, "Performance score comparison skipped.")
+
+ old_score = old_cwv.get("performance_score")
+ new_score = current_cwv.get("performance_score")
+ if old_score is None or new_score is None:
+ return _make_finding("perf_score_dropped", "WARNING", False, old_score, new_score, "Performance score unavailable.")
+
+ drop = old_score - new_score
+ triggered = drop >= 10
+ return _make_finding(
+ "perf_score_dropped", "WARNING", triggered,
+ old_score, new_score,
+ f"Performance score dropped {drop} points ({old_score} -> {new_score}). Run full PageSpeed analysis."
+ if triggered else f"Performance score: {old_score} -> {new_score} (change: {-drop:+d}).",
+ )
+
+
+def rule_13_og_tags_removed(baseline: dict, current: dict) -> dict:
+ """WARNING: OG tags removed."""
+ old_og = json.loads(baseline.get("og_json") or "{}")
+ new_og = current.get("open_graph", {})
+ triggered = len(old_og) > 0 and len(new_og) == 0
+ return _make_finding(
+ "og_tags_removed", "WARNING", triggered,
+ list(old_og.keys()),
+ [],
+ "All Open Graph tags have been removed. Social sharing will show generic previews."
+ if triggered else "OG tags presence unchanged.",
+ )
+
+
+def rule_14_schema_modified(baseline: dict, current: dict) -> dict:
+ """WARNING: Schema/JSON-LD content modified."""
+ old_hash = baseline.get("schema_hash")
+ new_schema = current.get("schema", [])
+ new_schema_str = json.dumps(new_schema, sort_keys=True)
+ new_hash = hash_content(new_schema_str) if new_schema else None
+
+ # Only trigger if schema exists in both and hash differs (removal is Rule 1)
+ triggered = (
+ old_hash is not None
+ and new_hash is not None
+ and old_hash != new_hash
+ )
+ return _make_finding(
+ "schema_modified", "WARNING", triggered,
+ old_hash[:12] + "..." if old_hash else None,
+ new_hash[:12] + "..." if new_hash else None,
+ "Schema/JSON-LD content has been modified. Validate with /seo schema."
+ if triggered else "Schema content hash unchanged.",
+ )
+
+
+def rule_15_schema_added(baseline: dict, current: dict) -> dict:
+ """INFO: New schema/JSON-LD added (positive change)."""
+ old_schema = json.loads(baseline.get("schema_json") or "[]")
+ new_schema = current.get("schema", [])
+ triggered = len(old_schema) == 0 and len(new_schema) > 0
+ return _make_finding(
+ "schema_added", "INFO", triggered,
+ "0 schema blocks",
+ f"{len(new_schema)} schema block(s)",
+ "New structured data added. Validate with /seo schema."
+ if triggered else "No new schema added.",
+ )
+
+
+def rule_16_h2_structure_changed(baseline: dict, current: dict) -> dict:
+ """INFO: H2 structure changed."""
+ old_h2 = json.loads(baseline.get("h2_json") or "[]")
+ new_h2 = current.get("h2", [])
+ triggered = old_h2 != new_h2
+ return _make_finding(
+ "h2_structure_changed", "INFO", triggered,
+ f"{len(old_h2)} H2s",
+ f"{len(new_h2)} H2s",
+ f"H2 heading structure changed ({len(old_h2)} -> {len(new_h2)} headings)."
+ if triggered else "H2 structure unchanged.",
+ )
+
+
+def rule_17_content_hash_changed(baseline: dict, current_html_hash: str | None) -> dict:
+ """INFO: Content hash changed (catch-all)."""
+ old_hash = baseline.get("html_hash")
+ triggered = (
+ old_hash is not None
+ and current_html_hash is not None
+ and old_hash != current_html_hash
+ )
+ return _make_finding(
+ "content_hash_changed", "INFO", triggered,
+ old_hash[:12] + "..." if old_hash else None,
+ current_html_hash[:12] + "..." if current_html_hash else None,
+ "Page content has changed (HTML body hash differs from baseline)."
+ if triggered else "Page content hash unchanged.",
+ )
+
+
+# ---------------------------------------------------------------------------
+# Main comparison
+# ---------------------------------------------------------------------------
+
+def run_comparison(url: str, skip_cwv: bool = False, baseline_id: int | None = None) -> dict:
+ """
+ Compare current page state to stored baseline.
+
+ Args:
+ url: The URL to compare.
+ skip_cwv: Skip Core Web Vitals fetch.
+ baseline_id: Specific baseline ID to compare against (default: most recent).
+
+ Returns:
+ Dict with comparison results or error.
+ """
+ # Validate URL (SSRF protection)
+ if not validate_url(url):
+ return {"error": "URL rejected: only public http/https URLs are accepted (SSRF protection)"}
+
+ uhash = url_hash(url)
+ norm_url = normalize_url(url)
+
+ # Load baseline
+ conn = init_db()
+ try:
+ baseline = load_baseline(conn, uhash, baseline_id)
+ except sqlite3.Error as e:
+ conn.close()
+ return {"error": f"Database error: {e}"}
+
+ if not baseline:
+ conn.close()
+ msg = f"No baseline found for {norm_url}."
+ if baseline_id:
+ msg += f" (baseline_id={baseline_id})"
+ msg += " Run `drift baseline` first."
+ return {"error": msg}
+
+ # Fetch current page state
+ page_data = fetch_page_data(url)
+ if page_data["error"]:
+ conn.close()
+ return {"error": page_data["error"]}
+
+ parsed = page_data["parsed"]
+ if not parsed:
+ conn.close()
+ return {"error": "No parsed data returned from HTML parser"}
+
+ # Fetch current CWV (optional)
+ current_cwv = None
+ if not skip_cwv:
+ current_cwv = fetch_cwv_data(url)
+
+ # Compute current hashes
+ current_html_hash = hash_content(page_data["html"]) if page_data["html"] else None
+
+ # Run all 17 comparison rules
+ findings = [
+ # CRITICAL (Rules 1-8)
+ rule_01_schema_removed(baseline, parsed),
+ rule_02_canonical_changed(baseline, parsed),
+ rule_03_canonical_removed(baseline, parsed),
+ rule_04_noindex_added(baseline, parsed),
+ rule_05_h1_removed(baseline, parsed),
+ rule_06_h1_changed_significantly(baseline, parsed),
+ rule_07_title_removed(baseline, parsed),
+ rule_08_status_code_error(baseline, page_data["status_code"]),
+ # WARNING (Rules 9-14)
+ rule_09_title_changed(baseline, parsed),
+ rule_10_meta_description_changed(baseline, parsed),
+ rule_11_cwv_regressed(baseline, current_cwv),
+ rule_12_performance_score_dropped(baseline, current_cwv),
+ rule_13_og_tags_removed(baseline, parsed),
+ rule_14_schema_modified(baseline, parsed),
+ # INFO (Rules 15-17)
+ rule_15_schema_added(baseline, parsed),
+ rule_16_h2_structure_changed(baseline, parsed),
+ rule_17_content_hash_changed(baseline, current_html_hash),
+ ]
+
+ # Separate triggered and untriggered
+ triggered = [f for f in findings if f["triggered"]]
+ untriggered = [f for f in findings if not f["triggered"]]
+
+ # Count by severity
+ critical_count = sum(1 for f in triggered if f["severity"] == "CRITICAL")
+ warning_count = sum(1 for f in triggered if f["severity"] == "WARNING")
+ info_count = sum(1 for f in triggered if f["severity"] == "INFO")
+
+ now = datetime.now(timezone.utc).isoformat()
+
+ # Build result
+ result = {
+ "status": "ok",
+ "url": norm_url,
+ "baseline_id": baseline["id"],
+ "baseline_timestamp": baseline["timestamp"],
+ "comparison_timestamp": now,
+ "summary": {
+ "total_rules": len(findings),
+ "triggered": len(triggered),
+ "critical": critical_count,
+ "warning": warning_count,
+ "info": info_count,
+ },
+ "triggered_findings": triggered,
+ "untriggered_findings": untriggered,
+ "current_status_code": page_data["status_code"],
+ "cwv_compared": current_cwv is not None,
+ }
+
+ # Store comparison in database
+ try:
+ conn.execute(
+ """
+ INSERT INTO comparisons (
+ url, url_hash, baseline_id, timestamp, results_json,
+ critical_count, warning_count, info_count
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
+ """,
+ (
+ norm_url,
+ uhash,
+ baseline["id"],
+ now,
+ json.dumps(result),
+ critical_count,
+ warning_count,
+ info_count,
+ ),
+ )
+ conn.commit()
+ except sqlite3.Error as e:
+ # Non-fatal: comparison still succeeds even if we can't persist it
+ result["db_warning"] = f"Could not save comparison: {e}"
+ finally:
+ conn.close()
+
+ return result
+
+
+# ---------------------------------------------------------------------------
+# CLI
+# ---------------------------------------------------------------------------
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Compare current page state to stored SEO baseline"
+ )
+ parser.add_argument("url", help="URL to compare against its baseline")
+ parser.add_argument(
+ "--skip-cwv",
+ action="store_true",
+ help="Skip Core Web Vitals comparison (faster, uses less API quota)",
+ )
+ parser.add_argument(
+ "--baseline-id",
+ type=int,
+ default=None,
+ help="Compare against a specific baseline ID (default: most recent)",
+ )
+
+ args = parser.parse_args()
+ result = run_comparison(args.url, skip_cwv=args.skip_cwv, baseline_id=args.baseline_id)
+
+ print(json.dumps(result, indent=2))
+
+ if result.get("error"):
+ sys.exit(1)
+
+ # Also print a human-readable summary to stderr
+ summary = result.get("summary", {})
+ critical = summary.get("critical", 0)
+ warning = summary.get("warning", 0)
+ info = summary.get("info", 0)
+
+ if critical > 0:
+ print(f"\n*** {critical} CRITICAL finding(s) ***", file=sys.stderr)
+ if warning > 0:
+ print(f" {warning} WARNING finding(s)", file=sys.stderr)
+ if info > 0:
+ print(f" {info} INFO finding(s)", file=sys.stderr)
+ if critical == 0 and warning == 0 and info == 0:
+ print("\n No drift detected. Page matches baseline.", file=sys.stderr)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/drift_history.py b/scripts/drift_history.py
new file mode 100644
index 0000000..50f622a
--- /dev/null
+++ b/scripts/drift_history.py
@@ -0,0 +1,127 @@
+#!/usr/bin/env python3
+"""
+Query drift history for a URL from the SQLite database.
+
+Usage:
+ python drift_history.py <url> [--limit N]
+
+Output: JSON array of baselines and comparisons for the URL.
+"""
+
+import argparse
+import json
+import os
+import sys
+
+SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, SCRIPTS_DIR)
+
+from drift_baseline import DB_PATH, init_db, normalize_url, url_hash # noqa: E402
+
+
+def get_history(url: str, limit: int = 20) -> dict:
+ """
+ Retrieve baselines and comparisons for a URL.
+
+ Args:
+ url: The URL to query history for.
+ limit: Maximum number of baselines to return.
+
+ Returns:
+ Dict with baselines and comparisons arrays.
+ """
+ norm_url = normalize_url(url)
+ uhash = url_hash(url)
+
+ if not os.path.exists(DB_PATH):
+ return {"url": norm_url, "baselines": [], "comparisons": [], "note": "No database found. Run `drift baseline` first."}
+
+ conn = init_db()
+ try:
+ # Fetch baselines (all queries parameterized)
+ rows = conn.execute(
+ """
+ SELECT id, url, timestamp, title, canonical, robots, h1,
+ status_code, html_hash, schema_hash,
+ CASE WHEN cwv_json IS NOT NULL THEN 1 ELSE 0 END as has_cwv
+ FROM baselines
+ WHERE url_hash = ?
+ ORDER BY id DESC
+ LIMIT ?
+ """,
+ (uhash, limit),
+ ).fetchall()
+
+ baselines = []
+ for row in rows:
+ baselines.append({
+ "id": row[0],
+ "url": row[1],
+ "timestamp": row[2],
+ "title": row[3],
+ "canonical": row[4],
+ "robots": row[5],
+ "h1": row[6],
+ "status_code": row[7],
+ "html_hash": row[8][:12] + "..." if row[8] else None,
+ "schema_hash": row[9][:12] + "..." if row[9] else None,
+ "has_cwv": bool(row[10]),
+ })
+
+ # Fetch comparisons
+ comp_rows = conn.execute(
+ """
+ SELECT id, baseline_id, timestamp, critical_count, warning_count, info_count
+ FROM comparisons
+ WHERE url_hash = ?
+ ORDER BY id DESC
+ LIMIT ?
+ """,
+ (uhash, limit),
+ ).fetchall()
+
+ comparisons = []
+ for row in comp_rows:
+ comparisons.append({
+ "id": row[0],
+ "baseline_id": row[1],
+ "timestamp": row[2],
+ "critical": row[3],
+ "warning": row[4],
+ "info": row[5],
+ })
+
+ finally:
+ conn.close()
+
+ return {
+ "url": norm_url,
+ "baselines": baselines,
+ "comparisons": comparisons,
+ }
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Query SEO drift history for a URL"
+ )
+ parser.add_argument("url", help="URL to query history for")
+ parser.add_argument(
+ "--limit", "-n",
+ type=int,
+ default=20,
+ help="Maximum number of entries to return (default: 20)",
+ )
+
+ args = parser.parse_args()
+ result = get_history(args.url, limit=args.limit)
+
+ print(json.dumps(result, indent=2))
+
+ if not result["baselines"]:
+ print(f"\nNo baselines found for {result['url']}.", file=sys.stderr)
+ print("Run `python scripts/drift_baseline.py <url>` to capture the first baseline.", file=sys.stderr)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/drift_report.py b/scripts/drift_report.py
new file mode 100644
index 0000000..a6a1353
--- /dev/null
+++ b/scripts/drift_report.py
@@ -0,0 +1,376 @@
+#!/usr/bin/env python3
+"""
+Generate an HTML report for SEO drift comparison results.
+
+Uses the claude-seo color palette for severity-coded cards.
+
+Usage:
+ python drift_report.py <comparison_json_file> [--output report.html]
+ echo '{"status":"ok",...}' | python drift_report.py --stdin [--output report.html]
+
+Output: Self-contained HTML file with severity-coded diff cards.
+"""
+
+import argparse
+import html
+import json
+import os
+import sys
+from datetime import datetime, timezone
+
+
+# ---------------------------------------------------------------------------
+# Claude-SEO color palette
+# ---------------------------------------------------------------------------
+COLORS = {
+ "navy": "#1e3a5f",
+ "gold": "#b8860b",
+ "green": "#2d6a4f",
+ "amber": "#d4740e",
+ "red": "#c53030",
+ "cream": "#faf9f7",
+ "white": "#ffffff",
+ "light_gray": "#f3f4f6",
+ "mid_gray": "#6b7280",
+ "dark_gray": "#374151",
+}
+
+SEVERITY_COLORS = {
+ "CRITICAL": COLORS["red"],
+ "WARNING": COLORS["amber"],
+ "INFO": COLORS["navy"],
+}
+
+SEVERITY_BG = {
+ "CRITICAL": "#fef2f2",
+ "WARNING": "#fffbeb",
+ "INFO": "#eff6ff",
+}
+
+
+# ---------------------------------------------------------------------------
+# HTML generation
+# ---------------------------------------------------------------------------
+
+def _escape(text) -> str:
+ """HTML-escape a value, handling None."""
+ if text is None:
+ return "<em>none</em>"
+ return html.escape(str(text))
+
+
+def generate_html(comparison: dict) -> str:
+ """Generate a self-contained HTML report from comparison data."""
+ url = comparison.get("url", "Unknown URL")
+ baseline_ts = comparison.get("baseline_timestamp", "")
+ compare_ts = comparison.get("comparison_timestamp", "")
+ summary = comparison.get("summary", {})
+ triggered = comparison.get("triggered_findings", [])
+ untriggered = comparison.get("untriggered_findings", [])
+
+ critical = summary.get("critical", 0)
+ warning = summary.get("warning", 0)
+ info = summary.get("info", 0)
+ total_triggered = summary.get("triggered", 0)
+
+ # Overall status badge
+ if critical > 0:
+ status_text = "DRIFT DETECTED"
+ status_color = COLORS["red"]
+ elif warning > 0:
+ status_text = "CHANGES DETECTED"
+ status_color = COLORS["amber"]
+ elif info > 0:
+ status_text = "MINOR CHANGES"
+ status_color = COLORS["navy"]
+ else:
+ status_text = "NO DRIFT"
+ status_color = COLORS["green"]
+
+ # Build finding cards
+ finding_cards = ""
+ for finding in triggered:
+ sev = finding.get("severity", "INFO")
+ color = SEVERITY_COLORS.get(sev, COLORS["navy"])
+ bg = SEVERITY_BG.get(sev, COLORS["light_gray"])
+ finding_cards += f"""
+ <div class="finding-card" style="border-left: 4px solid {color}; background: {bg};">
+ <div class="finding-header">
+ <span class="severity-badge" style="background: {color}; color: {COLORS['white']};">{sev}</span>
+ <span class="rule-name">{_escape(finding.get('rule', ''))}</span>
+ </div>
+ <p class="finding-message">{_escape(finding.get('message', ''))}</p>
+ <div class="finding-diff">
+ <div class="diff-old">
+ <strong>Before:</strong> {_escape(finding.get('old_value'))}
+ </div>
+ <div class="diff-new">
+ <strong>After:</strong> {_escape(finding.get('new_value'))}
+ </div>
+ </div>
+ </div>
+ """
+
+ # Passed rules summary
+ passed_list = ""
+ for finding in untriggered:
+ passed_list += f"<li>{_escape(finding.get('rule', ''))}: {_escape(finding.get('message', ''))}</li>\n"
+
+ report_time = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
+
+ return f"""<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>SEO Drift Report - {_escape(url)}</title>
+ <style>
+ * {{ margin: 0; padding: 0; box-sizing: border-box; }}
+ body {{
+ font-family: 'Times New Roman', Georgia, serif;
+ background: {COLORS['cream']};
+ color: {COLORS['dark_gray']};
+ line-height: 1.6;
+ padding: 2rem;
+ max-width: 900px;
+ margin: 0 auto;
+ }}
+ .header {{
+ text-align: center;
+ padding: 2rem;
+ background: {COLORS['navy']};
+ color: {COLORS['white']};
+ border-radius: 8px;
+ margin-bottom: 2rem;
+ }}
+ .header h1 {{
+ font-size: 1.8rem;
+ margin-bottom: 0.5rem;
+ }}
+ .header .url {{
+ font-family: monospace;
+ font-size: 0.95rem;
+ opacity: 0.9;
+ word-break: break-all;
+ }}
+ .header .timestamps {{
+ font-size: 0.85rem;
+ opacity: 0.7;
+ margin-top: 0.5rem;
+ }}
+ .status-banner {{
+ text-align: center;
+ padding: 1rem;
+ border-radius: 8px;
+ font-size: 1.4rem;
+ font-weight: bold;
+ margin-bottom: 2rem;
+ color: {COLORS['white']};
+ }}
+ .summary-grid {{
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 1rem;
+ margin-bottom: 2rem;
+ }}
+ .summary-card {{
+ text-align: center;
+ padding: 1rem;
+ border-radius: 8px;
+ background: {COLORS['white']};
+ border: 1px solid #e5e7eb;
+ }}
+ .summary-card .count {{
+ font-size: 2rem;
+ font-weight: bold;
+ }}
+ .summary-card .label {{
+ font-size: 0.85rem;
+ color: {COLORS['mid_gray']};
+ }}
+ .section-title {{
+ font-size: 1.3rem;
+ color: {COLORS['navy']};
+ border-bottom: 2px solid {COLORS['gold']};
+ padding-bottom: 0.5rem;
+ margin: 2rem 0 1rem;
+ }}
+ .finding-card {{
+ padding: 1rem;
+ border-radius: 6px;
+ margin-bottom: 1rem;
+ }}
+ .finding-header {{
+ display: flex;
+ align-items: center;
+ gap: 0.75rem;
+ margin-bottom: 0.5rem;
+ }}
+ .severity-badge {{
+ display: inline-block;
+ padding: 0.15rem 0.6rem;
+ border-radius: 4px;
+ font-size: 0.75rem;
+ font-weight: bold;
+ font-family: sans-serif;
+ letter-spacing: 0.05em;
+ }}
+ .rule-name {{
+ font-family: monospace;
+ font-size: 0.9rem;
+ color: {COLORS['mid_gray']};
+ }}
+ .finding-message {{
+ margin-bottom: 0.75rem;
+ }}
+ .finding-diff {{
+ font-family: monospace;
+ font-size: 0.85rem;
+ background: {COLORS['white']};
+ padding: 0.75rem;
+ border-radius: 4px;
+ border: 1px solid #e5e7eb;
+ }}
+ .diff-old {{
+ color: {COLORS['red']};
+ margin-bottom: 0.3rem;
+ }}
+ .diff-new {{
+ color: {COLORS['green']};
+ }}
+ .passed-section {{
+ background: {COLORS['white']};
+ padding: 1rem;
+ border-radius: 8px;
+ border: 1px solid #e5e7eb;
+ }}
+ .passed-section ul {{
+ list-style: none;
+ padding: 0;
+ }}
+ .passed-section li {{
+ padding: 0.3rem 0;
+ font-size: 0.9rem;
+ color: {COLORS['mid_gray']};
+ }}
+ .passed-section li::before {{
+ content: "\\2713 ";
+ color: {COLORS['green']};
+ font-weight: bold;
+ }}
+ .footer {{
+ text-align: center;
+ margin-top: 2rem;
+ padding: 1rem;
+ font-size: 0.8rem;
+ color: {COLORS['mid_gray']};
+ border-top: 1px solid #e5e7eb;
+ }}
+ </style>
+</head>
+<body>
+ <div class="header">
+ <h1>SEO Drift Report</h1>
+ <div class="url">{_escape(url)}</div>
+ <div class="timestamps">
+ Baseline: {_escape(baseline_ts)} | Compared: {_escape(compare_ts)}
+ </div>
+ </div>
+
+ <div class="status-banner" style="background: {status_color};">
+ {status_text}
+ </div>
+
+ <div class="summary-grid">
+ <div class="summary-card">
+ <div class="count" style="color: {COLORS['red']};">{critical}</div>
+ <div class="label">Critical</div>
+ </div>
+ <div class="summary-card">
+ <div class="count" style="color: {COLORS['amber']};">{warning}</div>
+ <div class="label">Warning</div>
+ </div>
+ <div class="summary-card">
+ <div class="count" style="color: {COLORS['navy']};">{info}</div>
+ <div class="label">Info</div>
+ </div>
+ </div>
+
+ {"<h2 class='section-title'>Findings (" + str(total_triggered) + " triggered)</h2>" + finding_cards if total_triggered > 0 else ""}
+
+ <h2 class="section-title">Passed Checks ({len(untriggered)})</h2>
+ <div class="passed-section">
+ <ul>
+ {passed_list}
+ </ul>
+ </div>
+
+ <div class="footer">
+ Generated by Claude SEO Drift Monitor | {report_time}
+ </div>
+</body>
+</html>"""
+
+
+# ---------------------------------------------------------------------------
+# CLI
+# ---------------------------------------------------------------------------
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Generate an HTML report from SEO drift comparison results"
+ )
+ parser.add_argument(
+ "file",
+ nargs="?",
+ help="Path to comparison JSON file (or use --stdin)",
+ )
+ parser.add_argument(
+ "--stdin",
+ action="store_true",
+ help="Read comparison JSON from stdin",
+ )
+ parser.add_argument(
+ "--output", "-o",
+ default=None,
+ help="Output HTML file path (default: stdout)",
+ )
+
+ args = parser.parse_args()
+
+ # Load comparison data
+ if args.stdin:
+ raw = sys.stdin.read()
+ elif args.file:
+ real_path = os.path.realpath(args.file)
+ if not os.path.isfile(real_path):
+ print(f"Error: File not found: {args.file}", file=sys.stderr)
+ sys.exit(1)
+ with open(real_path, "r", encoding="utf-8") as f:
+ raw = f.read()
+ else:
+ print("Error: Provide a JSON file path or use --stdin", file=sys.stderr)
+ sys.exit(1)
+
+ try:
+ comparison = json.loads(raw)
+ except json.JSONDecodeError as e:
+ print(f"Error: Invalid JSON: {e}", file=sys.stderr)
+ sys.exit(1)
+
+ if comparison.get("error"):
+ print(f"Error: Comparison has error: {comparison['error']}", file=sys.stderr)
+ sys.exit(1)
+
+ html_content = generate_html(comparison)
+
+ if args.output:
+ with open(args.output, "w", encoding="utf-8") as f:
+ f.write(html_content)
+ print(f"Report saved to {args.output}", file=sys.stderr)
+ else:
+ print(html_content)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/release_report.py b/scripts/release_report.py
new file mode 100644
index 0000000..7bf9732
--- /dev/null
+++ b/scripts/release_report.py
@@ -0,0 +1,1171 @@
+#!/usr/bin/env python3
+"""
+release_report.py — Claude SEO v1.9.0 Pro Hub Challenge Release Report
+
+Usage:
+ python scripts/release_report.py --output ~/Desktop/
+ python scripts/release_report.py --output ~/Desktop/ --screenshots /path/
+
+Dependencies: matplotlib>=3.8.0, weasyprint>=61.0
+"""
+
+import argparse
+import json
+import re
+import sys
+from datetime import datetime
+from pathlib import Path
+from urllib.parse import quote
+
+import matplotlib
+matplotlib.use("Agg")
+import matplotlib.pyplot as plt
+import matplotlib.patches as mpatches
+import numpy as np
+
+
+# --- Brand ---
+
+BRAND = {
+ "bg": "#0A0A0A",
+ "card": "#111111",
+ "card_inner":"#1A1A1A",
+ "border": "#2D2D2D",
+ "text": "#F5F5F0",
+ "text_sec": "#888888",
+ "accent": "#E07850",
+ "green": "#4ADE80",
+ "amber": "#f59e0b",
+ "blue": "#60A5FA",
+ "muted": "#888888",
+}
+
+SCREENSHOTS_DIR = str(Path.home() / "Downloads" / "pro-hub-challenge-march-screenshots")
+
+
+def _setup_matplotlib():
+ plt.rcParams.update({
+ "font.family": "sans-serif",
+ "font.sans-serif": ["Space Grotesk", "DejaVu Sans", "Arial", "Helvetica"],
+ "font.size": 11,
+ "axes.titlesize": 14,
+ "axes.titleweight": "bold",
+ "axes.facecolor": BRAND["card"],
+ "figure.facecolor": BRAND["bg"],
+ "text.color": BRAND["text"],
+ "axes.labelcolor": BRAND["text"],
+ "axes.titlecolor": BRAND["text"],
+ "xtick.color": BRAND["text_sec"],
+ "ytick.color": BRAND["text_sec"],
+ "axes.edgecolor": BRAND["border"],
+ "axes.grid": True,
+ "axes.spines.top": False,
+ "axes.spines.right": False,
+ })
+
+
+_setup_matplotlib()
+
+
+# --- Chart Functions ---
+
+def chart_contribution_flow(charts_dir: Path) -> str:
+ entries = [
+ ("Lutfiya Miller", "/seo cluster", "new", "New Skill"),
+ ("Florian Schmitz", "/seo sxo", "new", "New Skill"),
+ ("Dan Colta", "/seo drift", "new", "New Skill"),
+ ("Matej Marjanovic", "/seo ecommerce", "new", "New Skill"),
+ ("Chris Muller", "/seo hreflang", "enhanced", "Enhancement"),
+ ("Benjamin", "claude-blog", "deferred", "Out of Scope"),
+ ]
+ status_colors = {
+ "new": BRAND["green"],
+ "enhanced": BRAND["accent"],
+ "deferred": BRAND["muted"],
+ }
+
+ fig, ax = plt.subplots(figsize=(12, 8))
+ ax.set_facecolor(BRAND["card"])
+ fig.patch.set_facecolor(BRAND["bg"])
+ ax.set_xlim(-0.2, 10.5)
+ ax.set_ylim(-0.8, len(entries) - 0.2)
+ ax.axis("off")
+ ax.set_title("Pro Hub Challenge: Contribution Pipeline", fontsize=14,
+ fontweight="bold", color=BRAND["text"], pad=12)
+
+ for i, (name, skill, status, label) in enumerate(entries):
+ y = len(entries) - 1 - i
+ color = status_colors[status]
+
+ left = mpatches.FancyBboxPatch(
+ (0.05, y - 0.33), 2.9, 0.66,
+ boxstyle="round,pad=0.04",
+ linewidth=1.2, edgecolor=BRAND["border"], facecolor=BRAND["card_inner"]
+ )
+ ax.add_patch(left)
+ ax.text(1.5, y, name, ha="center", va="center", fontsize=9.5,
+ color=BRAND["text"], fontweight="bold")
+
+ ax.annotate("", xy=(3.15, y), xytext=(2.95, y),
+ arrowprops=dict(arrowstyle="-|>", color=color, lw=2.0, mutation_scale=14))
+
+ right = mpatches.FancyBboxPatch(
+ (3.2, y - 0.33), 5.6, 0.66,
+ boxstyle="round,pad=0.04",
+ linewidth=1.2, edgecolor=BRAND["border"], facecolor=BRAND["card_inner"]
+ )
+ ax.add_patch(right)
+ ax.text(3.45, y, skill, ha="left", va="center", fontsize=9, color=BRAND["text"])
+
+ badge = mpatches.FancyBboxPatch(
+ (7.2, y - 0.23), 1.85, 0.46,
+ boxstyle="round,pad=0.03",
+ linewidth=0, facecolor=color
+ )
+ ax.add_patch(badge)
+ txt_color = BRAND["bg"] if color != BRAND["muted"] else BRAND["text"]
+ ax.text(8.12, y, label, ha="center", va="center", fontsize=8,
+ color=txt_color, fontweight="bold")
+
+ legend_elements = [
+ mpatches.Patch(facecolor=BRAND["green"], label="New Skill"),
+ mpatches.Patch(facecolor=BRAND["accent"], label="Enhancement"),
+ mpatches.Patch(facecolor=BRAND["muted"], label="Out of Scope"),
+ ]
+ legend = ax.legend(handles=legend_elements, loc="lower right", fontsize=9,
+ framealpha=0.9, edgecolor=BRAND["border"])
+ legend.get_frame().set_facecolor(BRAND["card"])
+ for t in legend.get_texts():
+ t.set_color(BRAND["text"])
+
+ plt.tight_layout()
+ path = charts_dir / "contribution_flow.png"
+ plt.savefig(path, dpi=200, bbox_inches="tight", facecolor=BRAND["bg"])
+ plt.close()
+ return str(path)
+
+
+def chart_skill_architecture(charts_dir: Path) -> str:
+ categories = [
+ "Orchestrator",
+ "Technical Audit",
+ "Content & Schema",
+ "Local & Maps",
+ "Planning & Strategy",
+ "Intelligence (v1.9.0)",
+ "E-commerce (v1.9.0)",
+ "International",
+ "Extensions",
+ ]
+ existing = [1, 4, 4, 2, 5, 0, 0, 2, 2]
+ new_v190 = [0, 0, 0, 0, 0, 3, 1, 0, 0]
+
+ y = np.arange(len(categories))
+ h = 0.32
+
+ fig, ax = plt.subplots(figsize=(12, 4.5))
+ ax.set_facecolor(BRAND["card"])
+ fig.patch.set_facecolor(BRAND["bg"])
+
+ bars_e = ax.barh(y + h / 2, existing, h, label="Existing (v1.8.x)",
+ color=BRAND["blue"], alpha=0.85)
+ bars_n = ax.barh(y - h / 2, new_v190, h, label="New in v1.9.0",
+ color=BRAND["accent"], alpha=0.95)
+
+ ax.set_yticks(y)
+ ax.set_yticklabels(categories, fontsize=10, color=BRAND["text"])
+ ax.set_xlabel("Number of Skills", fontsize=10)
+ ax.set_title("Claude SEO Skill Architecture: v1.9.0 (23 Total Skills)",
+ fontsize=14, fontweight="bold", color=BRAND["text"], pad=12)
+ ax.set_xlim(0, 7.5)
+ ax.xaxis.set_major_locator(plt.MaxNLocator(integer=True))
+ ax.tick_params(colors=BRAND["text_sec"])
+ ax.spines["left"].set_color(BRAND["border"])
+ ax.spines["bottom"].set_color(BRAND["border"])
+ ax.set_axisbelow(True)
+ ax.yaxis.grid(False)
+ ax.xaxis.grid(True, color=BRAND["border"], linewidth=0.5)
+
+ for bar in list(bars_e) + list(bars_n):
+ w = bar.get_width()
+ if w > 0:
+ c = BRAND["blue"] if bar in bars_e else BRAND["accent"]
+ ax.text(w + 0.08, bar.get_y() + bar.get_height() / 2,
+ str(int(w)), va="center", fontsize=9, color=c)
+
+ legend = ax.legend(fontsize=10, framealpha=0.9, edgecolor=BRAND["border"])
+ legend.get_frame().set_facecolor(BRAND["card"])
+ for t in legend.get_texts():
+ t.set_color(BRAND["text"])
+
+ plt.tight_layout()
+ path = charts_dir / "skill_architecture.png"
+ plt.savefig(path, dpi=200, bbox_inches="tight", facecolor=BRAND["bg"])
+ plt.close()
+ return str(path)
+
+
+def chart_review_scores(charts_dir: Path) -> str:
+ labels = ["Round 1\nCode Review", "Round 2\nRe-Review",
+ "Round 3\nMax-Effort", "Round 4\nSecurity Audit"]
+ scores = [87, 93, 97, 85]
+ dot_colors = [BRAND["amber"], BRAND["amber"], BRAND["green"], BRAND["amber"]]
+
+ fig, ax = plt.subplots(figsize=(10, 5))
+ ax.set_facecolor(BRAND["card"])
+ fig.patch.set_facecolor(BRAND["bg"])
+
+ x = np.arange(len(labels))
+ ax.plot(x, scores, color=BRAND["accent"], linewidth=2.5, zorder=2)
+ for xi, (yi, ci) in enumerate(zip(scores, dot_colors)):
+ ax.scatter([xi], [yi], color=ci, s=130, zorder=3,
+ edgecolors=BRAND["accent"], linewidth=1.5)
+ ax.annotate(f"{yi}/100", (xi, yi),
+ textcoords="offset points", xytext=(0, 13),
+ ha="center", fontsize=11, fontweight="bold", color=BRAND["text"])
+
+ ax.axhline(y=90, color=BRAND["green"], linestyle="--", alpha=0.4, linewidth=1)
+ ax.axhline(y=80, color=BRAND["amber"], linestyle="--", alpha=0.4, linewidth=1)
+ ax.text(3.55, 90.8, "Excellent (90+)", fontsize=8, color=BRAND["green"], alpha=0.8)
+ ax.text(3.55, 80.8, "Good (80+)", fontsize=8, color=BRAND["amber"], alpha=0.8)
+
+ ax.set_xticks(x)
+ ax.set_xticklabels(labels, fontsize=9.5, color=BRAND["text"])
+ ax.set_xlim(-0.4, 3.8)
+ ax.set_ylim(76, 107)
+ ax.set_ylabel("Score / 100", fontsize=10)
+ ax.set_title("v1.9.0 Review Score Progression: 4 Rounds",
+ fontsize=14, fontweight="bold", color=BRAND["text"], pad=12)
+ ax.tick_params(colors=BRAND["text_sec"])
+ ax.spines["left"].set_color(BRAND["border"])
+ ax.spines["bottom"].set_color(BRAND["border"])
+ ax.set_axisbelow(True)
+ ax.yaxis.grid(True, color=BRAND["border"], linewidth=0.5)
+
+ plt.tight_layout()
+ path = charts_dir / "review_scores.png"
+ plt.savefig(path, dpi=200, bbox_inches="tight", facecolor=BRAND["bg"])
+ plt.close()
+ return str(path)
+
+
+def chart_security_matrix(charts_dir: Path) -> str:
+ severities = ["HIGH", "MEDIUM", "LOW"]
+ fixed = [2, 2, 0]
+ deferred = [2, 4, 5]
+
+ x = np.arange(len(severities))
+ w = 0.35
+
+ fig, ax = plt.subplots(figsize=(9, 5))
+ ax.set_facecolor(BRAND["card"])
+ fig.patch.set_facecolor(BRAND["bg"])
+
+ b1 = ax.bar(x - w / 2, fixed, w, label="Fixed in v1.9.0",
+ color=BRAND["green"], alpha=0.9, edgecolor=BRAND["bg"])
+ b2 = ax.bar(x + w / 2, deferred, w, label="Deferred to v1.9.1",
+ color=BRAND["amber"], alpha=0.9, edgecolor=BRAND["bg"])
+
+ for bar in list(b1) + list(b2):
+ h = bar.get_height()
+ if h > 0:
+ ax.text(bar.get_x() + bar.get_width() / 2, h + 0.1,
+ str(int(h)), ha="center", va="bottom",
+ fontsize=11, fontweight="bold", color=BRAND["text"])
+
+ ax.set_xticks(x)
+ ax.set_xticklabels(severities, fontsize=12, color=BRAND["text"])
+ ax.set_ylabel("Number of Findings", fontsize=10)
+ ax.set_title("Security Audit: 15 Findings, Score 85/100",
+ fontsize=14, fontweight="bold", color=BRAND["text"], pad=12)
+ ax.set_ylim(0, 8.5)
+ ax.yaxis.set_major_locator(plt.MaxNLocator(integer=True))
+ ax.tick_params(colors=BRAND["text_sec"])
+ legend = ax.legend(fontsize=10, framealpha=0.9, edgecolor=BRAND["border"])
+ legend.get_frame().set_facecolor(BRAND["card"])
+ for t in legend.get_texts():
+ t.set_color(BRAND["text"])
+ ax.spines["left"].set_color(BRAND["border"])
+ ax.spines["bottom"].set_color(BRAND["border"])
+ ax.set_axisbelow(True)
+ ax.yaxis.grid(True, color=BRAND["border"], linewidth=0.5)
+ ax.text(0.98, 0.96, "0 CRITICAL | 4 Fixed | 11 Deferred",
+ transform=ax.transAxes, ha="right", va="top",
+ fontsize=9, color=BRAND["text_sec"], style="italic")
+
+ plt.tight_layout()
+ path = charts_dir / "security_matrix.png"
+ plt.savefig(path, dpi=200, bbox_inches="tight", facecolor=BRAND["bg"])
+ plt.close()
+ return str(path)
+
+
+# --- CSS ---
+
+def _build_css() -> str:
+ return """<style>
+ @page {
+ size: A4;
+ background: #0A0A0A;
+ margin: 20mm 16mm 22mm 16mm;
+ @bottom-center {
+ content: "Page " counter(page) " of " counter(pages);
+ font-size: 9pt; color: #888888;
+ font-family: 'Space Grotesk', 'DejaVu Sans', system-ui, sans-serif;
+ }
+ @bottom-right {
+ content: "Claude SEO v1.9.0";
+ font-size: 8pt; color: #2D2D2D;
+ font-family: 'Space Grotesk', 'DejaVu Sans', system-ui, sans-serif;
+ }
+ }
+
+ @page :first {
+ margin: 0;
+ background: #0A0A0A;
+ @bottom-left { content: none; }
+ @bottom-center { content: none; }
+ @bottom-right { content: none; }
+ }
+
+ @page toc {
+ background: #0A0A0A;
+ @bottom-center { content: counter(page); font-size: 9pt; color: #888888; }
+ }
+
+ * { box-sizing: border-box; margin: 0; padding: 0; }
+
+ body {
+ font-family: 'Space Grotesk', 'Inter', 'DejaVu Sans', system-ui, sans-serif;
+ font-size: 10pt; line-height: 1.55;
+ color: #F5F5F0; background: #0A0A0A;
+ }
+
+ /* Title Page */
+ .title-page {
+ page: first;
+ width: 210mm;
+ background: #0A0A0A;
+ text-align: center; color: #F5F5F0;
+ padding: 32mm 28mm 28mm 28mm;
+ border-top: 5mm solid #E07850;
+ }
+
+ .title-page .badge {
+ background: #111111; border: 1px solid #2D2D2D;
+ border-radius: 20px; padding: 4px 16px;
+ font-size: 8.5pt; letter-spacing: 2px;
+ text-transform: uppercase; margin-bottom: 8mm;
+ display: inline-block; color: #888888;
+ }
+
+ .title-page h1 {
+ font-size: 28pt; font-weight: 700;
+ margin-bottom: 4mm; line-height: 1.15; color: #F5F5F0;
+ }
+
+ .title-page .subtitle {
+ font-size: 12pt; color: #888888;
+ margin-bottom: 10mm; font-weight: 400;
+ }
+
+ .title-metrics { display: table; width: 100%; table-layout: fixed; margin: 8mm auto; }
+ .title-metrics .mc {
+ display: table-cell; text-align: center; padding: 4mm 2mm;
+ border: 1px solid #2D2D2D; background: #111111;
+ }
+ .title-metrics .mc:first-child { border-radius: 6px 0 0 6px; }
+ .title-metrics .mc:last-child { border-radius: 0 6px 6px 0; }
+ .title-metrics .big { font-size: 22pt; font-weight: 700; color: #E07850; line-height: 1; }
+ .title-metrics .small { font-size: 7pt; color: #888888; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1mm; }
+
+ .title-page .meta {
+ font-size: 8.5pt; color: #888888;
+ margin-top: 10mm; padding-top: 4mm;
+ border-top: 1px solid #2D2D2D;
+ }
+
+ /* TOC */
+ .toc-page { page: toc; page-break-before: always; padding: 16mm; }
+ .toc-page h2 {
+ font-size: 17pt; color: #F5F5F0;
+ margin-bottom: 6mm; padding-bottom: 3mm;
+ border-bottom: 2px solid #E07850;
+ }
+ .toc-list { list-style: none; padding: 0; }
+ .toc-list li {
+ padding: 2.5mm 0; border-bottom: 1px solid #1A1A1A;
+ overflow: hidden; font-size: 10.5pt; color: #F5F5F0;
+ }
+ .toc-badge {
+ float: right; padding: 1px 7px; border-radius: 10px;
+ font-size: 8pt; font-weight: bold;
+ color: #0A0A0A; background: #E07850;
+ }
+ .toc-badge.green { background: #4ADE80; color: #0A0A0A; }
+ .toc-badge.muted { background: #2D2D2D; color: #888888; }
+
+ /* Sections */
+ div.section { page-break-before: always; }
+
+ .section-header {
+ background: #111111; border-left: 4px solid #E07850;
+ padding: 4mm 5mm; margin-bottom: 5mm;
+ page-break-after: avoid;
+ }
+ .section-header h2 { font-size: 15pt; color: #F5F5F0; margin-bottom: 1mm; }
+ .section-header .smeta { font-size: 8.5pt; color: #888888; }
+
+ h3 {
+ font-size: 11.5pt; color: #E07850;
+ margin-top: 5mm; margin-bottom: 3mm;
+ padding-bottom: 1mm; border-bottom: 1px solid #2D2D2D;
+ page-break-after: avoid;
+ }
+
+ h4 {
+ font-size: 10.5pt; color: #F5F5F0;
+ margin-top: 3mm; margin-bottom: 2mm;
+ page-break-after: avoid;
+ }
+
+ p { margin-bottom: 2.5mm; color: #D0CFC8; }
+
+ /* Boxes */
+ .highlight { background: #1A1200; border-left: 3px solid #E07850; padding: 3mm 4mm; margin: 3mm 0; font-size: 9.5pt; color: #D0CFC8; }
+ .success-box { background: #0D1F0D; border-left: 3px solid #4ADE80; padding: 3mm 4mm; margin: 3mm 0; font-size: 9.5pt; color: #D0CFC8; }
+ .info-box { background: #0D1020; border-left: 3px solid #60A5FA; padding: 3mm 4mm; margin: 3mm 0; font-size: 9.5pt; color: #D0CFC8; }
+
+ /* Tables */
+ table { width: 100%; border-collapse: collapse; margin: 3mm 0 5mm 0; font-size: 9pt; }
+ thead th {
+ background: #1A1A1A; color: #F5F5F0;
+ font-weight: 600; padding: 3mm 4mm;
+ text-align: left; border-bottom: 1px solid #2D2D2D;
+ }
+ tbody td { padding: 2mm 3mm; border-bottom: 1px solid #1A1A1A; vertical-align: top; color: #D0CFC8; }
+ tbody tr:nth-child(even) { background: #0F0F0F; }
+
+ .st-fixed { color: #4ADE80; font-weight: bold; }
+ .st-deferred { color: #f59e0b; font-weight: bold; }
+ .st-new { color: #60A5FA; font-weight: bold; }
+ .sev-high { color: #f59e0b; font-weight: bold; }
+ .sev-medium { color: #60A5FA; }
+ .sev-low { color: #888888; }
+
+ /* Charts */
+ .chart-container { text-align: center; margin: 4mm 0; }
+ .chart-container img { max-width: 100%; max-height: 165mm; height: auto; }
+ .chart-caption { font-size: 8pt; color: #888888; font-style: italic; margin-top: 2mm; text-align: center; }
+
+ /* Two-column */
+ .two-col { display: table; width: 100%; table-layout: fixed; margin: 3mm 0; }
+ .two-col .col { display: table-cell; vertical-align: top; padding: 0 2mm; }
+
+ /* Four metric cards */
+ .four-col { display: table; width: 100%; table-layout: fixed; margin: 3mm 0; }
+ .four-col .col { display: table-cell; vertical-align: top; padding: 0 1.5mm; }
+
+ .metric-card { background: #111111; border: 1px solid #2D2D2D; border-radius: 6px; padding: 3mm; text-align: center; margin: 2mm 0; }
+ .metric-card .value { font-size: 16pt; font-weight: 700; line-height: 1.2; color: #E07850; }
+ .metric-card .label { font-size: 7pt; color: #888888; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1mm; }
+ .metric-card .delta { font-size: 8pt; color: #4ADE80; margin-top: 0.5mm; }
+
+ /* Contributor Cards */
+ .ccard { background: #111111; border: 1px solid #2D2D2D; border-radius: 6px; padding: 3mm 4mm; margin: 4mm 0; border-left: 4px solid #E07850; }
+ .ccard h4 { margin-top: 0; border-bottom: none; padding-bottom: 0; color: #F5F5F0; }
+ .ccard .cmeta { font-size: 8.5pt; color: #888888; margin-bottom: 2mm; font-style: italic; }
+
+ /* Screenshots */
+ .sshot { text-align: center; margin: 3mm 0; border: 1px solid #2D2D2D; border-radius: 4px; padding: 2mm; background: #111111; }
+ .sshot img { max-width: 100%; height: auto; }
+ .sshot-cap { font-size: 8pt; color: #888888; font-style: italic; margin-top: 1.5mm; }
+
+ /* Code blocks */
+ .code-block {
+ background: #111111; color: #E07850;
+ padding: 3mm 4mm; border-radius: 4px; border: 1px solid #2D2D2D;
+ font-family: 'DejaVu Sans Mono', 'Courier New', monospace;
+ font-size: 8pt; line-height: 1.6; margin: 3mm 0;
+ white-space: pre-wrap; word-break: break-all;
+ }
+
+ /* Roadmap items */
+ .ritem { background: #111111; border-radius: 4px; padding: 3mm 4mm; margin: 3mm 0; border-left: 3px solid #2D2D2D; }
+ .ritem.high { border-left-color: #f59e0b; background: #1A1000; }
+ .ritem.medium { border-left-color: #60A5FA; background: #0D1020; }
+
+ /* Misc */
+ ul { margin-left: 5mm; margin-bottom: 3mm; }
+ li { margin-bottom: 1.5mm; color: #D0CFC8; }
+ hr.divider { border: none; border-top: 1px solid #2D2D2D; margin: 5mm 0; }
+ ol { margin-left: 5mm; margin-bottom: 3mm; }
+ code { font-family: 'DejaVu Sans Mono', monospace; font-size: 8.5pt; color: #E07850; background: #1A1A1A; padding: 0 2px; border-radius: 2px; }
+</style>
+"""
+
+
+# --- HTML Helpers ---
+
+def _chart_html(path: str, caption: str, fig_num: int) -> str:
+ if not path:
+ return ""
+ return (
+ f'<div class="chart-container">\n'
+ f' <img src="{_file_url(path)}" style="width:90%;" alt="{caption}">\n'
+ f' <div class="chart-caption">Figure {fig_num}: {caption}</div>\n'
+ f'</div>\n'
+ )
+
+
+def _mc(value: str, label: str, delta: str = "") -> str:
+ delta_html = f'<div class="delta">{delta}</div>' if delta else ""
+ return (
+ f'<div class="metric-card">'
+ f'<div class="value">{value}</div>'
+ f'<div class="label">{label}</div>'
+ f'{delta_html}'
+ f'</div>'
+ )
+
+
+def _file_url(path: str) -> str:
+ """Return a properly URL-encoded file:// URI (handles spaces in paths)."""
+ return "file://" + quote(str(path), safe="/:@")
+
+
+def _screenshot_html(abs_path: str, caption: str, max_h: str = "72mm") -> str:
+ if not abs_path or not Path(abs_path).exists():
+ return ""
+ return (
+ f'<div class="sshot">\n'
+ f' <img src="{_file_url(abs_path)}" style="max-height:{max_h}; max-width:100%; height:auto;" alt="{caption}">\n'
+ f' <div class="sshot-cap">{caption}</div>\n'
+ f'</div>\n'
+ )
+
+
+# --- Section Builders ---
+
+def _build_title_page(logo_path: str = "") -> str:
+ date = datetime.now().strftime("%B %Y")
+ logo_html = ""
+ if logo_path and Path(logo_path).exists():
+ logo_html = (
+ f'<div style="margin-bottom:8mm;">'
+ f'<img src="{_file_url(logo_path)}" style="max-height:28mm; max-width:160mm;" alt="AI Marketing Hub Pro">'
+ f'</div>\n'
+ )
+ return f"""
+<div class="title-page">
+ {logo_html}<div class="badge">Claude Code &nbsp;&#183;&nbsp; Agent Skills Standard</div>
+ <h1>Claude SEO v1.9.0<br>Release Report</h1>
+ <div class="subtitle">Pro Hub Challenge: Community-Driven Extension</div>
+ <div class="title-metrics">
+ <div class="mc"><div class="big">4</div><div class="small">New Skills</div></div>
+ <div class="mc"><div class="big">5</div><div class="small">Contributors</div></div>
+ <div class="mc"><div class="big">61</div><div class="small">Files Changed</div></div>
+ <div class="mc"><div class="big">85</div><div class="small">Security Score</div></div>
+ </div>
+ <div class="meta">
+ Version 1.9.0 &nbsp;&#183;&nbsp; {date} &nbsp;&#183;&nbsp; github.com/AgriciDaniel/claude-seo
+ </div>
+
+ <div style="margin-top:14mm; padding:5mm 6mm; background:#111111; border:1px solid #2D2D2D; border-radius:6px; text-align:left;">
+ <div style="font-size:8pt; color:#888888; text-transform:uppercase; letter-spacing:1px; margin-bottom:3mm;">In This Report</div>
+ <div style="display:table; width:100%;">
+ <div style="display:table-cell; width:50%; padding-right:3mm; vertical-align:top;">
+ <ul style="list-style:none; padding:0; margin:0; font-size:9pt; color:#D0CFC8;">
+ <li style="margin-bottom:2mm;">5 community submissions, 4 new skills shipped</li>
+ <li style="margin-bottom:2mm;">$600 Claude Credits prize pool distributed</li>
+ <li style="margin-bottom:2mm;">4 review rounds, peak score 97/100</li>
+ <li style="margin-bottom:2mm;">85/100 cybersecurity audit (8 specialist agents)</li>
+ </ul>
+ </div>
+ <div style="display:table-cell; width:50%; vertical-align:top;">
+ <ul style="list-style:none; padding:0; margin:0; font-size:9pt; color:#D0CFC8;">
+ <li style="margin-bottom:2mm;">XSS vulnerability in cluster-map.html fixed</li>
+ <li style="margin-bottom:2mm;">DataForSEO cost guardrail bypass closed</li>
+ <li style="margin-bottom:2mm;">fcntl locking added for concurrent agents</li>
+ <li style="margin-bottom:2mm;">CI coverage expanded from 21 to 28 scripts</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</div>
+"""
+
+
+def _build_toc() -> str:
+ rows = [
+ ("1", "Executive Summary", "", ""),
+ ("2", "Pro Hub Challenge", "Community, $600 Prize Pool", ""),
+ ("3", "Community Contributions", "5 Integrations, 4 New Skills", ""),
+ ("4", "Architecture Evolution", "19 to 23 Skills", ""),
+ ("5", "Review Process", "4 Rounds, Peak 97/100", "green"),
+ ("6", "Security Audit", "85/100, 4 Fixes Applied", ""),
+ ("7", "DataForSEO Cost Guardrails", "Technical Deep-Dive", "muted"),
+ ("8", "What's Next", "v1.9.1 Priorities", "muted"),
+ ]
+ items = ""
+ for num, title, desc, badge_cls in rows:
+ badge = f'<span class="toc-badge {badge_cls}">{num}</span>'
+ sub = f'<span style="color:#888888; font-size:8.5pt;"> &ndash; {desc}</span>' if desc else ""
+ items += f'<li>{badge} <strong>{title}</strong>{sub}</li>\n'
+
+ return f"""
+<div class="toc-page">
+ <h2>Table of Contents</h2>
+ <ul class="toc-list">
+{items} </ul>
+ <div style="margin-top:10mm; padding:4mm 5mm; background:#111111; border-left:3px solid #E07850; border-radius:0 4px 4px 0; font-size:9pt; color:#D0CFC8;">
+ v1.9.0 is the first community-driven Claude SEO release. Six members submitted skills for the inaugural Pro Hub Challenge. Five shipped. This report covers the contributions, architecture changes, review process, and security findings in full.
+ </div>
+</div>"""
+
+
+def _build_executive_summary() -> str:
+ return f"""
+<div class="section">
+ <div class="section-header">
+ <h2>1. Executive Summary</h2>
+ <div class="smeta">Claude SEO v1.9.0, April 2026</div>
+ </div>
+
+ <p>v1.9.0 is the first community-driven release. Six members submitted skills for the inaugural Pro Hub Challenge. Five shipped. Four are entirely new Tier-4 skills. The release also adds DataForSEO cost guardrails and passed a four-round quality review including a dedicated cybersecurity audit.</p>
+
+ <div class="four-col">
+ <div class="col">{_mc("23", "Total Skills", "+4 new")}</div>
+ <div class="col">{_mc("17", "Subagents", "+4 new")}</div>
+ <div class="col">{_mc("30", "Scripts", "+7 new")}</div>
+ <div class="col">{_mc("61", "Files Changed", "31 mod, 30 new")}</div>
+ </div>
+
+ <div class="four-col">
+ <div class="col">{_mc("6", "Submissions", "Pro Hub Challenge")}</div>
+ <div class="col">{_mc("5", "Integrated", "4 new, 1 enhanced")}</div>
+ <div class="col">{_mc("85/100", "Security", "4 fixes applied")}</div>
+ <div class="col">{_mc("4", "Review Rounds", "Peak: 97/100")}</div>
+ </div>
+
+ <div class="two-col" style="margin-top:4mm;">
+ <div class="col">
+ <div class="success-box">
+ <h4 style="margin-top:0; border:none; padding:0; color:#4ADE80;">Community</h4>
+ <ul>
+ <li>First Pro Hub Challenge, $600 Claude Credits prize pool</li>
+ <li>5 of 6 submissions integrated into the official release</li>
+ <li>4 new skills added to the ecosystem</li>
+ <li>All contributors credited in CONTRIBUTORS.md and skill frontmatter</li>
+ </ul>
+ </div>
+ </div>
+ <div class="col">
+ <div class="info-box">
+ <h4 style="margin-top:0; border:none; padding:0; color:#60A5FA;">Technical</h4>
+ <ul>
+ <li>XSS in cluster-map.html fixed with escapeHtml() wrapping</li>
+ <li>Cost guardrail bypass chain discovered and closed</li>
+ <li>fcntl file locking for concurrent agent safety</li>
+ <li>CI expanded from 21 to 28 tracked scripts</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</div>
+"""
+
+
+def _build_challenge_section(chart_path: str, fig_num: int, ss: Path = None) -> tuple:
+ chart = _chart_html(chart_path,
+ "Pro Hub Challenge: 6 submissions through review to integration outcomes",
+ fig_num)
+ ss = ss or Path(SCREENSHOTS_DIR)
+ post_img = _screenshot_html(str(ss / "Pro hub challenge post.png"),
+ "Original challenge announcement post", max_h="62mm")
+ winner_img = _screenshot_html(str(ss / "Pro hub challenge post winner.png"),
+ "Winner announcement in AI Marketing Hub Pro", max_h="62mm")
+ html = f"""
+<div class="section">
+ <div class="section-header">
+ <h2>2. Pro Hub Challenge</h2>
+ <div class="smeta">Community, $600 Claude Credits Prize Pool, 6 Submissions</div>
+ </div>
+
+ <p>The Pro Hub Challenge is a community extension program in AI Marketing Hub Pro. Members submit Claude Code skills for claude-seo or related tools. Winning submissions get integrated into the official release. The inaugural challenge offered $600 in Claude Credits across prize tiers.</p>
+
+ {chart}
+
+ <h3>Timeline</h3>
+ <table>
+ <thead><tr><th>Stage</th><th>Outcome</th></tr></thead>
+ <tbody>
+ <tr><td>Challenge announced</td><td>$600 prize pool declared</td></tr>
+ <tr><td>Submissions closed</td><td>6 entries received</td></tr>
+ <tr><td>Round 1: code review</td><td>87/100</td></tr>
+ <tr><td>Round 2: re-review</td><td>93/100</td></tr>
+ <tr><td>Round 3: max-effort plan</td><td>97/100</td></tr>
+ <tr><td>Round 4: cybersecurity audit</td><td>85/100</td></tr>
+ <tr><td>Security fixes applied</td><td>4 vulnerabilities resolved</td></tr>
+ <tr><td>v1.9.0 shipped</td><td>5 of 6 integrated</td></tr>
+ </tbody>
+ </table>
+
+ <h3>Announcement &amp; Winners</h3>
+ {post_img}
+ {winner_img}
+</div>
+"""
+ return html, fig_num + 1
+
+
+def _build_contributions_section(ss: Path = None) -> str:
+ ss = ss or Path(SCREENSHOTS_DIR)
+ contributors = [
+ {
+ "name": "Lutfiya Miller",
+ "skill": "/seo cluster",
+ "type": "New Skill",
+ "img": str(ss / "Lutfiya.png"),
+ "desc": "SERP-based semantic topic clustering. Groups keywords by Google result overlap: 7-10 shared results is the same post, 4-6 is a hub cluster, 2-3 are interlink candidates.",
+ "points": [
+ "Interactive SVG cluster-map.html visualization (hub-spoke layout)",
+ "No paid API required: uses SERP overlap algorithm",
+ "XSS in SVG rendering fixed during integration (escapeHtml wrapping)",
+ "De-branded from original submission",
+ ],
+ },
+ {
+ "name": "Florian Schmitz",
+ "skill": "/seo sxo",
+ "type": "New Skill",
+ "img": str(ss / "florian.png"),
+ "desc": "Search Experience Optimization. Analyzes page-type mismatch between what Google serves and what the page delivers. Surfaces intent gaps that kill rankings despite strong technical SEO.",
+ "points": [
+ "Page-type taxonomy: informational, transactional, navigational, commercial",
+ "Persona scoring: visitor intent vs. page intent alignment",
+ "Consolidated from four original SKILL.md files that each exceeded 500 lines",
+ ],
+ },
+ {
+ "name": "Dan Colta",
+ "skill": "/seo drift",
+ "type": "New Skill",
+ "img": str(ss / "dan.png"),
+ "desc": "Git for SEO. Captures baselines of SEO-critical page elements, then diffs against current state to catch regressions before they impact rankings.",
+ "points": [
+ "17 comparison rules across 3 severity levels (CRITICAL, WARNING, INFO)",
+ "SQLite persistence at ~/.cache/claude-seo/drift/baselines.db",
+ "Parameterized SQL throughout, html.escape() on all report output",
+ ],
+ },
+ {
+ "name": "Matej Marjanovic",
+ "skill": "/seo ecommerce",
+ "type": "New Skill",
+ "img": str(ss / "Matej.png"),
+ "desc": "E-commerce SEO covering product schema, marketplace intelligence via DataForSEO Merchant API (Google Shopping and Amazon), and category page optimization.",
+ "points": [
+ "Product and ItemList schema templates added to schema/templates.json",
+ "DataForSEO Merchant API integration for live competitive pricing",
+ "Category hierarchy and breadcrumb analysis",
+ ],
+ },
+ {
+ "name": "Chris Muller",
+ "skill": "/seo hreflang",
+ "type": "Enhancement",
+ "img": str(ss / "chris.png"),
+ "desc": "Extended seo-hreflang with Cultural Adaptation Profiles for DACH, French, Spanish, and Japanese markets. Covers number formats, date conventions, currency display, and content parity.",
+ "points": [
+ "4 cultural profiles: DACH (de-AT/CH/DE), fr-FR, es-ES/MX, ja-JP",
+ "Locale format reference: number, date, currency conventions per region",
+ "3 new reference files in skills/seo-hreflang/references/",
+ ],
+ },
+ ]
+
+ cards = ""
+ for c in contributors:
+ points = "".join(f"<li>{p}</li>" for p in c["points"])
+ type_color = "#E07850" if c["type"] == "New Skill" else "#4ADE80"
+ sshot = _screenshot_html(c["img"], f"{c['name']}'s submission post", max_h="52mm")
+ cards += f"""<div class="ccard">
+ <h4>{c["name"]} &ndash; <span style="color:#60A5FA;">{c["skill"]}</span>
+ <span style="float:right; font-size:8pt; color:{type_color}; font-weight:bold;">{c["type"]}</span>
+ </h4>
+ <div class="cmeta">Pro Hub Challenge submission, integrated in v1.9.0</div>
+ <p>{c["desc"]}</p>
+ <ul>{points}</ul>
+ {sshot}
+</div>
+"""
+
+ return f"""
+<div class="section">
+ <div class="section-header">
+ <h2>3. Community Contributions</h2>
+ <div class="smeta">5 Integrations, 4 New Skills, 1 Enhancement</div>
+ </div>
+
+ <p>Each submission passed code review, security audit, de-branding check, and line-limit check (SKILL.md at 500 lines max, reference files at 200 lines max). Security fixes were applied to three submissions during integration.</p>
+
+{cards}
+</div>
+"""
+
+
+def _build_architecture_section(chart_path: str, fig_num: int) -> tuple:
+ chart = _chart_html(chart_path,
+ "Claude SEO skill architecture: 23 skills by category (orange = v1.9.0 additions)",
+ fig_num)
+ html = f"""
+<div class="section">
+ <div class="section-header">
+ <h2>4. Architecture Evolution</h2>
+ <div class="smeta">Skills 19 to 23, Agents 13 to 17, Scripts 23 to 30</div>
+ </div>
+
+ <h3>Skill Architecture Map</h3>
+ {chart}
+
+ <h3>Before / After</h3>
+ <table>
+ <thead><tr><th>Component</th><th>v1.8.2</th><th>v1.9.0</th><th>Delta</th></tr></thead>
+ <tbody>
+ <tr><td>Skills (SKILL.md directories)</td><td>19</td><td>23</td><td class="st-new">+4</td></tr>
+ <tr><td>Subagents (agents/*.md)</td><td>13</td><td>17</td><td class="st-new">+4</td></tr>
+ <tr><td>Python scripts (CI-tracked)</td><td>23</td><td>30</td><td class="st-new">+7</td></tr>
+ <tr><td>Reference files</td><td>~25</td><td>~38</td><td class="st-new">+13</td></tr>
+ <tr><td>Schema templates</td><td>8</td><td>10</td><td class="st-new">+2</td></tr>
+ <tr><td>Orchestrator routing commands</td><td>18</td><td>23</td><td class="st-new">+5</td></tr>
+ </tbody>
+ </table>
+
+ <h3>New Scripts (7)</h3>
+ <p>Seven new Python scripts shipped with v1.9.0. DataForSEO additions: <code>dataforseo_costs.py</code> (cost estimation, approval workflow, fcntl budget locking), <code>dataforseo_merchant.py</code> (Google Shopping + Amazon via Merchant API), <code>dataforseo_normalize.py</code> (shared response normalization). SEO drift additions: <code>drift_baseline.py</code> (SQLite baseline capture, SSRF-protected), <code>drift_compare.py</code> (17-rule comparison engine, parameterized SQL), <code>drift_report.py</code> (HTML reporting with html.escape() throughout), <code>drift_history.py</code> (read-only timeline query).</p>
+</div>
+"""
+ return html, fig_num + 1
+
+
+def _build_review_section(chart_path: str, fig_num: int) -> tuple:
+ chart = _chart_html(chart_path,
+ "Review score progression across 4 rounds: peak 97/100, security audit 85/100",
+ fig_num)
+ html = f"""
+<div class="section">
+ <div class="section-header">
+ <h2>5. Review Process</h2>
+ <div class="smeta">4 Rounds, Peak 97/100, 8+ Issues Caught</div>
+ </div>
+
+ <h3>Score Progression</h3>
+ {chart}
+
+ <h3>What Each Round Caught</h3>
+ <table>
+ <thead>
+ <tr><th>Round</th><th>Score</th><th>Key Findings</th></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>1: Code Review</td><td>87/100</td>
+ <td>Step numbering collision in orchestrator. Agent count wrong in seo-audit skill.</td>
+ </tr>
+ <tr>
+ <td>2: Re-Review</td><td>93/100</td>
+ <td>install.ps1 version not bumped. AGENTS.md count off by one. Dead import in dataforseo_merchant.py.</td>
+ </tr>
+ <tr>
+ <td>3: Max-Effort Plan</td><td>97/100</td>
+ <td>CONTRIBUTING.md insertion at line 25 would have orphaned subsections. New commands placed in wrong location in README.</td>
+ </tr>
+ <tr>
+ <td>4: Security Audit</td><td>85/100</td>
+ <td>XSS in SVG rendering. Cost guardrail bypass chain. CI coverage gap. Concurrent write race condition in cost ledger.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+"""
+ return html, fig_num + 1
+
+
+def _build_security_section(chart_path: str, fig_num: int) -> tuple:
+ chart = _chart_html(chart_path,
+ "Security findings by severity: 4 fixed in v1.9.0, 11 deferred to v1.9.1",
+ fig_num)
+ html = f"""
+<div class="section">
+ <div class="section-header">
+ <h2>6. Security Audit</h2>
+ <div class="smeta">85/100, OWASP Top 10:2025, STRIDE, MITRE ATT&amp;CK, 8 Specialist Agents</div>
+ </div>
+
+ <p>The /cybersecurity skill ran an 8-agent parallel audit: vulnerability scanning, authentication, secrets detection, dependency analysis, infrastructure-as-code, threat intelligence, AI-generated code patterns, and business logic. 15 findings total across 3 severity tiers. 10 of the 11 deferred findings were already present in v1.8.x. The audit formally documented them for the first time. All deferred items target v1.9.1.</p>
+
+ <h3>Findings Distribution</h3>
+ {chart}
+
+ <h3>Fixes Applied in v1.9.0</h3>
+ <table>
+ <thead><tr><th>Finding</th><th>Severity</th><th>Resolution</th></tr></thead>
+ <tbody>
+ <tr>
+ <td>XSS in cluster-map.html: truncate() output inserted raw into SVG DOM</td>
+ <td class="sev-high">HIGH</td>
+ <td class="st-fixed">Fixed: escapeHtml() added at render points</td>
+ </tr>
+ <tr>
+ <td>Cost guardrail bypass: unknown endpoint defaulted to $0.05, reset cleared spend without confirmation</td>
+ <td class="sev-high">HIGH</td>
+ <td class="st-fixed">Fixed: unknown endpoint returns needs_approval, reset requires --confirm with audit trail</td>
+ </tr>
+ <tr>
+ <td>CI coverage gap: 7 new scripts absent from compile check</td>
+ <td class="sev-medium">MEDIUM</td>
+ <td class="st-fixed">Fixed: ci.yml expanded from 21 to 28 tracked scripts</td>
+ </tr>
+ <tr>
+ <td>Concurrent write race condition in cost ledger</td>
+ <td class="sev-medium">MEDIUM</td>
+ <td class="st-fixed">Fixed: fcntl shared lock for reads, exclusive for writes</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+"""
+ return html, fig_num + 1
+
+
+def _build_guardrails_section() -> str:
+ return """
+<div class="section">
+ <div class="section-header">
+ <h2>7. DataForSEO Cost Guardrails</h2>
+ <div class="smeta">Technical Deep-Dive, Approval Workflow, fcntl Locking</div>
+ </div>
+
+ <p>DataForSEO calls accumulate cost fast when multiple subagents run in parallel. v1.9.0 adds a cost estimation and approval workflow in <code>scripts/dataforseo_costs.py</code>.</p>
+
+ <h3>The Bypass Chain (Closed)</h3>
+ <ol>
+ <li>Unknown endpoints defaulted to $0.05 per call, bypassing the approval gate by using an undocumented endpoint name.</li>
+ <li>The reset command cleared cumulative spend with no confirmation, letting a misconfigured agent wipe the budget ledger and restart a spending cycle.</li>
+ </ol>
+
+ <div class="code-block"># Unknown endpoint: explicit approval required
+unit_cost = COST_TABLE.get(endpoint)
+if unit_cost is None:
+ return {"status": "needs_approval", "approval_reason": "unknown_endpoint", ...}
+
+# Reset requires --confirm and logs a tamper-evident audit entry
+def cmd_reset(args):
+ if not args.confirm:
+ return {"status": "blocked", "message": "Reset requires --confirm flag."}</div>
+
+ <h3>Concurrent Safety</h3>
+ <p>The cost ledger is a JSON file read and written by multiple parallel subagents. v1.9.0 adds <code>fcntl.flock()</code>: shared lock for reads, exclusive lock for writes. Windows falls back to an unguarded write with a warning.</p>
+</div>
+"""
+
+
+def _build_next_section() -> str:
+ return """
+<div class="section">
+ <div class="section-header">
+ <h2>8. What's Next</h2>
+ <div class="smeta">v1.9.1 Security Priorities, Community Growth</div>
+ </div>
+
+ <div class="ritem high">
+ <h4>H1: validate_url() DNS Rebinding Gap
+ <span style="float:right; color:#f59e0b; font-size:8.5pt;">HIGH, Deferred</span>
+ </h4>
+ <p>validate_url() checks IPs at parse time but not at request time. A DNS rebinding attack can serve a public IP at validation, then switch to a private address at request. Fix: re-validate resolved IPs at the socket layer.</p>
+ </div>
+
+ <div class="ritem high">
+ <h4>H2: Install Script Shell Injection
+ <span style="float:right; color:#f59e0b; font-size:8.5pt;">HIGH, Deferred</span>
+ </h4>
+ <p>install.sh and install.ps1 use unquoted variables. A path with spaces or shell metacharacters could inject commands. Fix: quote all variable expansions.</p>
+ </div>
+
+ <div class="ritem medium">
+ <h4>M1: OAuth Token File Permissions (0644)
+ <span style="float:right; color:#60A5FA; font-size:8.5pt;">MEDIUM, Deferred</span>
+ </h4>
+ <p>OAuth token files are written with default permissions, making them world-readable on systems with permissive umask. Fix: chmod 600 immediately after writing.</p>
+ </div>
+
+ <div class="success-box" style="margin-top:5mm;">
+ <h4 style="margin-top:0; border:none; padding:0; color:#4ADE80;">April Challenge. $600. One Word.</h4>
+ <p>Challenge v2 is live in AI Marketing Hub Pro. The keyword is <strong style="color:#4ADE80;">LEADS</strong>. Build anything that touches lead generation: Claude Code skills, n8n workflows, MCP servers, dashboards, scrapers, pipelines. If it helps someone capture, qualify, nurture, or convert leads, it counts.</p>
+ <div style="display:table; width:100%; margin-top:3mm;">
+ <div style="display:table-cell; width:50%; vertical-align:top;">
+ <p style="margin-bottom:1mm;"><strong>Prizes</strong></p>
+ <ul style="margin-bottom:0;">
+ <li>1st Place: $400 in Claude Credits</li>
+ <li>2nd Place: $200 in Claude Credits</li>
+ </ul>
+ </div>
+ <div style="display:table-cell; width:50%; vertical-align:top;">
+ <p style="margin-bottom:1mm;"><strong>Rules</strong></p>
+ <ul style="margin-bottom:0;">
+ <li>GitHub repo or .zip + 1-2 min demo video</li>
+ <li>Must be functional, solo or team welcome</li>
+ <li>Deadline: April 28</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <hr class="divider">
+ <p style="font-size:8.5pt; color:#888888; text-align:center; margin-top:4mm;">
+ Claude SEO is open-source (Agent Skills standard) &nbsp;&#183;&nbsp;
+ github.com/AgriciDaniel/claude-seo &nbsp;&#183;&nbsp;
+ AI Marketing Hub: skool.com/ai-marketing-hub-pro
+ </p>
+</div>
+"""
+
+
+# --- PDF Review ---
+
+def _review_pdf(pdf_path: Path, html_content: str) -> dict:
+ issues = []
+ result: dict = {"status": "PASS", "issues": []}
+
+ if not pdf_path.exists():
+ return {"status": "FAIL", "issues": ["PDF not created"]}
+
+ size_kb = pdf_path.stat().st_size / 1024
+ result["file_size_kb"] = round(size_kb, 1)
+
+ if size_kb < 30:
+ issues.append(f"PDF suspiciously small: {size_kb:.1f} KB")
+
+ section_count = html_content.count('class="section"')
+ if section_count < 6:
+ issues.append(f"Only {section_count} sections (expected >= 6)")
+
+ chart_count = html_content.count("chart-container")
+ if chart_count < 4:
+ issues.append(f"Only {chart_count} charts (expected 4)")
+
+ from urllib.parse import unquote
+ for img_path_raw in re.findall(r'src="file://([^"]+)"', html_content):
+ img_path = unquote(img_path_raw)
+ if not Path(img_path).exists():
+ issues.append(f"Missing image: {img_path}")
+
+ try:
+ import pypdf
+ reader = pypdf.PdfReader(str(pdf_path))
+ result["page_count"] = len(reader.pages)
+ if len(reader.pages) < 10:
+ issues.append(f"Only {len(reader.pages)} pages (expected >= 10)")
+ except ImportError:
+ result["page_count"] = "unknown (install pypdf)"
+
+ if issues:
+ result["status"] = f"WARN ({len(issues)} issues)"
+ result["issues"] = issues
+ return result
+
+
+# --- Report Generation ---
+
+def generate_report(output_dir: str, screenshots_dir: str = SCREENSHOTS_DIR) -> str:
+ out = Path(output_dir).expanduser().resolve()
+ charts_dir = out / "claude-seo-v190-charts"
+ charts_dir.mkdir(parents=True, exist_ok=True)
+
+ ss = Path(screenshots_dir)
+ # Use white-text logo for dark background (note: double space in filename)
+ logo_path = str(ss / "AI MArketing hub pro logo with white text.png")
+ if not Path(logo_path).exists():
+ logo_path = str(ss / "AI MArketing hub pro logo with black text.png")
+
+ pdf_path = out / "Claude-SEO-v1.9.0-Release-Report.pdf"
+
+ print("Generating charts...")
+ flow_path = chart_contribution_flow(charts_dir)
+ arch_path = chart_skill_architecture(charts_dir)
+ review_path = chart_review_scores(charts_dir)
+ sec_path = chart_security_matrix(charts_dir)
+ print(f" 4 charts saved to {charts_dir}")
+
+ fig_n = [1]
+
+ def nf() -> int:
+ n = fig_n[0]; fig_n[0] += 1; return n
+
+ print("Building HTML sections...")
+ challenge_html, _ = _build_challenge_section(flow_path, nf(), ss)
+ arch_html, _ = _build_architecture_section(arch_path, nf())
+ review_html, _ = _build_review_section(review_path, nf())
+ sec_html, _ = _build_security_section(sec_path, nf())
+
+ sections = [
+ _build_title_page(logo_path),
+ _build_toc(),
+ _build_executive_summary(),
+ challenge_html,
+ _build_contributions_section(ss),
+ arch_html,
+ review_html,
+ sec_html,
+ _build_guardrails_section(),
+ _build_next_section(),
+ ]
+
+ full_html = _build_css() + "\n".join(sections)
+
+ print("Rendering PDF via WeasyPrint...")
+ try:
+ from weasyprint import HTML
+ HTML(string=full_html).write_pdf(str(pdf_path))
+ except ImportError:
+ html_out = out / "Claude-SEO-v1.9.0-Release-Report.html"
+ html_out.write_text(full_html, encoding="utf-8")
+ print(f"WeasyPrint not installed. HTML saved: {html_out}")
+ return str(html_out)
+
+ print("Running quality check...")
+ review = _review_pdf(pdf_path, full_html)
+ print(f" Status : {review['status']}")
+ print(f" Pages : {review.get('page_count', '?')}")
+ print(f" Size : {review.get('file_size_kb', '?')} KB")
+ for issue in review.get("issues", []):
+ print(f" WARNING : {issue}")
+
+ print(f"\nReport saved: {pdf_path}")
+ return str(pdf_path)
+
+
+# --- CLI ---
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Generate Claude SEO v1.9.0 Pro Hub Challenge Release Report"
+ )
+ parser.add_argument("--output", "-o", default="~/Desktop",
+ help="Output directory (default: ~/Desktop)")
+ parser.add_argument("--screenshots", default=SCREENSHOTS_DIR,
+ help=f"Screenshots directory (default: {SCREENSHOTS_DIR})")
+ args = parser.parse_args()
+
+ try:
+ path = generate_report(args.output, args.screenshots)
+ print(json.dumps({"status": "success", "path": path}, indent=2))
+ except Exception as exc:
+ print(json.dumps({"status": "error", "message": str(exc)}, indent=2),
+ file=sys.stderr)
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/skills/seo-audit/SKILL.md b/skills/seo-audit/SKILL.md
index e6d9d4e..a88ccb7 100644
--- a/skills/seo-audit/SKILL.md
+++ b/skills/seo-audit/SKILL.md
@@ -1,12 +1,12 @@
---
name: seo-audit
-description: "Full website SEO audit with parallel subagent delegation. Crawls up to 500 pages, detects business type, delegates to 10 specialists (7 core + 3 conditional), generates health score. Use when user says audit, full SEO check, analyze my site, or website health check."
+description: "Full website SEO audit with parallel subagent delegation. Crawls up to 500 pages, detects business type, delegates to up to 15 specialists (8 always + 7 conditional), generates health score. Use when user says audit, full SEO check, analyze my site, or website health check."
user-invokable: true
argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "1.8.2"
+ version: "1.9.0"
category: seo
---
@@ -29,6 +29,10 @@ metadata:
- `seo-maps` -- Geo-grid rank tracking, GBP audit, review intelligence, competitor radius mapping (spawn when Local Service detected AND DataForSEO MCP available)
- `seo-google` -- CWV field data (CrUX), URL indexation (GSC), organic traffic (GA4) (spawn when Google API credentials detected via `python scripts/google_auth.py --check`)
- `seo-backlinks` -- Backlink profile data: DA/PA, referring domains, anchor text, toxic links (spawn when Moz or Bing API credentials detected via `python scripts/backlinks_auth.py --check`, or always include Common Crawl domain-level metrics)
+ - `seo-cluster` -- Semantic clustering analysis (spawn when content strategy signals detected: blog, pillar pages, topic clusters)
+ - `seo-sxo` -- Search experience analysis: page-type mismatch, user stories, persona scoring (always include in full audits)
+ - `seo-drift` -- Drift analysis: compare against stored baseline (spawn when drift baseline exists for the URL via `python scripts/drift_history.py <url>`)
+ - `seo-ecommerce` -- Product schema, marketplace intelligence (spawn when E-commerce industry detected)
5. **Score** -- aggregate into SEO Health Score (0-100)
6. **Report** -- generate prioritized action plan
diff --git a/skills/seo-backlinks/SKILL.md b/skills/seo-backlinks/SKILL.md
index 7241c06..c09448f 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-cluster/SKILL.md b/skills/seo-cluster/SKILL.md
new file mode 100644
index 0000000..79797c6
--- /dev/null
+++ b/skills/seo-cluster/SKILL.md
@@ -0,0 +1,318 @@
+---
+name: seo-cluster
+description: >
+ SERP-based semantic topic clustering for content architecture planning. Groups
+ keywords by actual Google SERP overlap (not text similarity), designs hub-and-spoke
+ content clusters with internal link matrices, and generates interactive
+ visualizations. Optionally executes content creation if claude-blog is installed.
+ Use when user says "topic cluster", "content cluster", "semantic clustering",
+ "pillar page", "hub and spoke", "content architecture", "keyword grouping",
+ or "cluster plan".
+user-invokable: true
+argument-hint: "<seed-keyword or url>"
+license: MIT
+metadata:
+ author: AgriciDaniel
+ original_author: "Lutfiya Miller (Pro Hub Challenge Winner)"
+ version: "1.9.0"
+ category: seo
+---
+
+# Semantic Topic Clustering (v1.9.0)
+
+SERP-overlap-driven keyword clustering for content architecture. Groups keywords
+by how Google actually ranks them (shared top-10 results), not by text similarity.
+Designs hub-and-spoke content clusters with internal link matrices and generates
+interactive cluster map visualizations.
+
+**Scripts:** Located at the plugin root `scripts/` directory.
+
+---
+
+## Quick Reference
+
+| Command | What it does |
+|---------|-------------|
+| `/seo cluster plan <seed-keyword>` | Full planning workflow: expand, cluster, architect, visualize |
+| `/seo cluster plan --from strategy` | Import from existing `/seo plan` output |
+| `/seo cluster execute` | Execute plan: create content via claude-blog or output briefs |
+| `/seo cluster map` | Regenerate the interactive cluster visualization |
+
+---
+
+## Planning Workflow
+
+### Step 1: Seed Keyword Expansion
+
+Expand the seed keyword into 30-50 variants using WebSearch:
+
+1. **Related searches** — Search the seed, extract "related searches" and "people also search for"
+2. **People Also Ask (PAA)** — Extract all PAA questions from SERP results
+3. **Long-tail modifiers** — Append common modifiers: "best", "how to", "vs", "for beginners", "tools", "examples", "guide", "template", "mistakes", "checklist"
+4. **Question mining** — Generate who/what/when/where/why/how variants
+5. **Intent modifiers** — Add commercial modifiers: "pricing", "review", "alternative", "comparison", "free", "top"
+
+**Deduplication:** Normalize variants (lowercase, strip articles), remove exact duplicates.
+Target: 30-50 unique keyword variants. If under 30, run a second expansion pass
+with the top PAA questions as seeds.
+
+### Step 2: SERP Overlap Clustering
+
+This is the core differentiator. Load `references/serp-overlap-methodology.md` for
+the full algorithm.
+
+**Process:**
+1. Group keywords by initial intent guess (reduces pairwise comparisons)
+2. For each candidate pair within a group, WebSearch both keywords
+3. Count shared URLs in the top 10 organic results (ignore ads, featured snippets, PAA)
+4. Apply thresholds:
+
+| Shared Results | Relationship | Action |
+|---------------|-------------|--------|
+| 7-10 | Same post | Merge into single target page |
+| 4-6 | Same cluster | Group under same spoke cluster |
+| 2-3 | Interlink | Place in adjacent clusters, add cross-links |
+| 0-1 | Separate | Assign to different clusters or exclude |
+
+**Optimization:** With 40 keywords, full pairwise = 780 comparisons. Instead:
+- Pre-group by intent (4 groups of ~10 = 4 x 45 = 180 comparisons)
+- Only cross-check group boundary keywords
+- Skip pairs where both are long-tail variants of the same head term (assume same cluster)
+
+**DataForSEO integration:** If DataForSEO MCP is available, use `serp_organic_live_advanced`
+instead of WebSearch for SERP data. Run `python scripts/dataforseo_costs.py check serp_organic_live_advanced --count N`
+before each batch. If `"status": "needs_approval"`, show cost estimate and ask user.
+If `"status": "blocked"`, fall back to WebSearch.
+
+### Step 3: Intent Classification
+
+Classify each keyword into one of four intent categories:
+
+| Intent | Signals | Include in Clusters? |
+|--------|---------|---------------------|
+| Informational | how, what, why, guide, tutorial, learn | Yes |
+| Commercial | best, top, review, comparison, vs, alternative | Yes |
+| Transactional | buy, price, discount, coupon, order, sign up | Yes |
+| Navigational | brand names, specific product names, login | No (exclude) |
+
+Remove navigational keywords from clustering. Flag borderline cases for
+manual review. Keywords can have mixed intent (e.g., "best CRM software" is
+both commercial and informational) -- classify by dominant intent.
+
+### Step 4: Hub-and-Spoke Architecture
+
+Load `references/hub-spoke-architecture.md` for full specifications.
+
+**Design the cluster structure:**
+
+1. **Select the pillar keyword** — Highest volume, broadest intent, most SERP overlap with other keywords
+2. **Group spokes into clusters** — Each cluster is a subtopic area (2-5 clusters per pillar)
+3. **Assign posts to clusters** — Each cluster gets 2-4 spoke posts
+4. **Select templates per post** — Based on intent classification:
+
+| Intent Pattern | Template Options |
+|---------------|-----------------|
+| Informational (broad) | ultimate-guide |
+| Informational (how) | how-to |
+| Informational (list) | listicle |
+| Informational (concept) | explainer |
+| Commercial (compare) | comparison |
+| Commercial (evaluate) | review |
+| Commercial (rank) | best-of |
+| Transactional | landing-page |
+
+5. **Set word count targets:**
+ - Pillar page: 2500-4000 words
+ - Spoke posts: 1200-1800 words
+
+6. **Cannibalization check** — No two posts share the same primary keyword. If SERP
+ overlap is 7+, merge those keywords into a single post targeting both.
+
+### Step 5: Internal Link Matrix
+
+Design the bidirectional linking structure:
+
+| Link Type | Direction | Requirement |
+|-----------|-----------|-------------|
+| Spoke to pillar | spoke -> pillar | Mandatory (every spoke) |
+| Pillar to spoke | pillar -> spoke | Mandatory (every spoke) |
+| Spoke to spoke (within cluster) | spoke <-> spoke | 2-3 links per post |
+| Cross-cluster | spoke -> spoke (other cluster) | 0-1 links per post |
+
+**Rules:**
+- Every post must have minimum 3 incoming internal links
+- No orphan pages (every post reachable from pillar in 2 clicks)
+- Anchor text must use target keyword or close variant (no "click here")
+- Link placement: within body content, not just navigation/sidebar
+
+Generate the link matrix as a JSON adjacency list:
+```json
+{
+ "links": [
+ { "from": "pillar", "to": "cluster-0-post-0", "type": "mandatory", "anchor": "keyword" },
+ { "from": "cluster-0-post-0", "to": "pillar", "type": "mandatory", "anchor": "keyword" }
+ ]
+}
+```
+
+### Step 6: Interactive Cluster Map
+
+Generate `cluster-map.html` using the template at `templates/cluster-map.html`.
+
+1. Read the template file
+2. Build the `CLUSTER_DATA` JSON object from the cluster plan:
+ ```javascript
+ {
+ pillar: { title, keyword, volume, template, wordCount, url },
+ clusters: [{ name, color, posts: [{ title, keyword, volume, template, wordCount, url, status }] }],
+ links: [{ from, to, type }],
+ meta: { totalPosts, totalClusters, totalLinks, estimatedWords }
+ }
+ ```
+3. Replace the `CLUSTER_DATA` placeholder in the template with the actual JSON
+4. Write the completed HTML file to the output directory
+5. Inform user: "Open `cluster-map.html` in a browser to explore the interactive cluster map."
+
+---
+
+## Strategy Import
+
+When invoked with `--from strategy`:
+
+1. Look for the most recent `/seo plan` output in the current directory (search for
+ files matching `*SEO*Plan*`, `*strategy*`, `*content-strategy*`)
+2. Parse markdown tables for: keywords, page types, content pillars, URL structures
+3. Validate extracted data: check for duplicates, missing keywords, incomplete entries
+4. Enrich with SERP data: run SERP overlap analysis on extracted keywords
+5. Build cluster plan using the imported keywords as the starting set (skip Step 1)
+
+If no strategy file is found, prompt the user: "No existing SEO plan found in the
+current directory. Run `/seo plan` first, or provide a seed keyword for fresh clustering."
+
+---
+
+## Execution Workflow
+
+When `/seo cluster execute` is invoked:
+
+### Check for claude-blog
+
+```
+Test: Does ~/.claude/skills/blog/SKILL.md exist?
+```
+
+**If claude-blog IS installed:**
+
+1. Load `references/execution-workflow.md` for the full algorithm
+2. Read `cluster-plan.json` from the current directory
+3. Check for resume state: scan output directory for already-written posts
+4. Execute in priority order: pillar first, then spokes by volume (highest first)
+5. For each post, invoke the `blog-write` skill with cluster context:
+ - Cluster role (pillar or spoke)
+ - Position in cluster (cluster index, post index)
+ - Target keyword and secondary keywords
+ - Template type and word count target
+ - Internal links to include (with anchors)
+ - Links to receive from future posts (placeholder markers)
+6. After each post is written, scan previous posts for backward link placeholders
+ and inject the new post's URL
+7. After all posts are written, generate the cluster scorecard
+
+**If claude-blog is NOT installed:**
+
+1. Generate detailed content briefs for each post in the cluster plan
+2. Each brief includes:
+ - Title and meta description
+ - Primary keyword and secondary keywords
+ - Template type and suggested structure (H2/H3 outline)
+ - Word count target
+ - Internal links to include (with anchor text)
+ - Key points to cover
+ - Competing pages to differentiate from
+3. Write briefs to `cluster-briefs/` directory as individual markdown files
+4. Inform user: "Install [claude-blog](https://github.com/AgriciDaniel/claude-blog)
+ to auto-create content. Briefs saved to `cluster-briefs/`."
+
+---
+
+## Cluster Scorecard
+
+Post-execution quality report. Run automatically after `/seo cluster execute` or
+on demand via analysis of the output directory.
+
+| Metric | Target | How Measured |
+|--------|--------|-------------|
+| Coverage | 100% | Posts written / posts planned |
+| Link Density | 3+ per post | Count internal links per post |
+| Orphan Pages | 0 | Posts with < 1 incoming link |
+| Cannibalization | 0 conflicts | Check for duplicate primary keywords |
+| Image Count | 1+ per post | Posts with at least one image |
+| Pillar Links | 100% | All spokes link to pillar and vice versa |
+| Cross-Links | 80%+ | Recommended spoke-to-spoke links implemented |
+| Content Gaps | 0 | Planned posts that were skipped or incomplete |
+
+---
+
+## Map Regeneration
+
+When `/seo cluster map` is invoked:
+
+1. Read `cluster-plan.json` from the current directory
+2. Scan output directory and update post statuses (planned vs written)
+3. Regenerate `cluster-map.html` with updated statuses
+4. Report: posts written vs planned, link completion percentage
+
+---
+
+## Output Files
+
+All outputs are written to the current working directory:
+
+| File | Description |
+|------|-------------|
+| `cluster-plan.json` | Machine-readable cluster plan (full data) |
+| `cluster-plan.md` | Human-readable cluster plan summary |
+| `cluster-map.html` | Interactive SVG visualization |
+| `cluster-briefs/` | Content briefs (if no claude-blog) |
+| `cluster-scorecard.md` | Post-execution quality report |
+
+---
+
+## Cross-Skill Integration
+
+| Skill | Relationship |
+|-------|-------------|
+| `seo-plan` | Import source: strategy import reads seo-plan output |
+| `seo-content` | Quality check: E-E-A-T validation of generated content |
+| `seo-schema` | Schema markup: Article, BreadcrumbList, ItemList for cluster pages |
+| `seo-dataforseo` | Data source: SERP data when DataForSEO MCP is available |
+| `seo-google` | Reporting: generate PDF report of cluster plan and scorecard |
+
+After cluster planning or execution completes, offer:
+"Generate a PDF report? Use `/seo google report`"
+
+---
+
+## Error Handling
+
+| Error | Cause | Resolution |
+|-------|-------|------------|
+| "No seed keyword provided" | Missing argument | Prompt user for seed keyword or URL |
+| "Insufficient keyword variants" | Expansion yielded < 15 keywords | Run second expansion pass with PAA questions |
+| "SERP data unavailable" | WebSearch and DataForSEO both failing | Retry after 30s; if persistent, use intent-only clustering with warning |
+| "No strategy file found" | `--from strategy` but no plan exists | Prompt user to run `/seo plan` first |
+| "cluster-plan.json not found" | Execute without planning | Prompt user to run `/seo cluster plan` first |
+| "claude-blog not installed" | Execute attempted without blog skill | Generate content briefs instead; suggest installation |
+| "DataForSEO budget exceeded" | Cost check returned "blocked" | Fall back to WebSearch; inform user |
+| "Duplicate primary keywords" | Cannibalization detected | Merge affected posts or reassign keywords |
+| "Orphan page detected" | Post missing incoming links | Add links from nearest cluster siblings |
+| "Resume state corrupted" | Mismatch between plan and output | Rebuild state from output directory scan |
+
+---
+
+## Security
+
+- All URLs fetched via `python scripts/fetch_page.py` (SSRF protection via `validate_url()`)
+- No credentials stored or transmitted
+- Output files contain no PII or API keys
+- DataForSEO cost checks run before every API call
diff --git a/skills/seo-cluster/references/execution-workflow.md b/skills/seo-cluster/references/execution-workflow.md
new file mode 100644
index 0000000..c98382f
--- /dev/null
+++ b/skills/seo-cluster/references/execution-workflow.md
@@ -0,0 +1,180 @@
+# Execution Workflow
+
+## Overview
+
+The execution phase transforms a `cluster-plan.json` into actual content. It handles
+priority ordering, context injection for the blog writer, backward link updates,
+resume capability, and post-execution quality scoring.
+
+## Priority Algorithm
+
+Content is created in this strict order:
+
+1. **Pillar page first** -- The hub must exist before any spokes can link to it
+2. **Spokes by search volume (descending)** -- Highest-volume spokes first for
+ maximum early impact
+3. **Within same volume, by cluster index** -- Process Cluster 0 before Cluster 1
+4. **Within same cluster, by post index** -- Process Post 0 before Post 1
+
+Rationale: The pillar establishes the topical authority foundation. High-volume
+spokes generate the most organic traffic, so they should be published earliest
+for faster compounding returns.
+
+## Cluster Context Injection
+
+When invoking `blog-write` for each post, pass a structured context block:
+
+```json
+{
+ "cluster_context": {
+ "role": "pillar|spoke",
+ "pillar_title": "The Complete Guide to ...",
+ "pillar_url": "/guide/...",
+ "cluster_name": "Cluster Name",
+ "cluster_index": 0,
+ "post_index": 0,
+ "primary_keyword": "target keyword",
+ "secondary_keywords": ["variant 1", "variant 2"],
+ "template": "how-to",
+ "word_count_target": 1500,
+ "outgoing_links": [
+ { "url": "/pillar-url", "anchor": "main topic guide", "type": "mandatory" },
+ { "url": "/sibling-post", "anchor": "related subtopic", "type": "recommended" }
+ ],
+ "incoming_link_placeholder": "<!-- cluster-link:cluster-0-post-1 -->",
+ "differentiation_note": "This post should focus on X, while sibling post covers Y"
+ }
+}
+```
+
+### Context Fields Explained
+
+| Field | Purpose |
+|-------|---------|
+| `role` | Whether this is the pillar or a spoke (affects depth and breadth) |
+| `pillar_title` / `pillar_url` | So spokes can link back to the pillar |
+| `cluster_name` / `cluster_index` | For organizing and labeling |
+| `post_index` | Position within the cluster |
+| `primary_keyword` | The main target keyword for this post |
+| `secondary_keywords` | Additional keywords to naturally incorporate |
+| `template` | Content template to follow (how-to, listicle, comparison, etc.) |
+| `word_count_target` | Target word count (not a hard limit, a guideline) |
+| `outgoing_links` | Links this post MUST include, with suggested anchor text |
+| `incoming_link_placeholder` | HTML comment marker for future backward link injection |
+| `differentiation_note` | How this post differs from siblings targeting similar topics |
+
+## Backward Link Injection
+
+After each new post is written, update previously written posts to link to it:
+
+### Process
+
+1. Read the link matrix from `cluster-plan.json`
+2. Identify all posts that should link TO the newly written post
+3. For each of those posts (that is already written):
+ a. Open the post file
+ b. Search for the placeholder comment: `<!-- cluster-link:POST_ID -->`
+ c. Replace the placeholder with an actual contextual link
+ d. If no placeholder found, append a contextual link in the most relevant section
+4. Log all backward links added
+
+### Placeholder Format
+
+```html
+<!-- cluster-link:cluster-0-post-1 -->
+```
+
+This is inserted during content creation at a contextually appropriate location.
+When the target post is later written, the placeholder is replaced with:
+
+```html
+For a deeper dive, see our guide on <a href="/target-url">anchor text</a>.
+```
+
+## Resume Capability
+
+Execution can be interrupted and resumed. The resume algorithm:
+
+### Detection
+
+1. Read `cluster-plan.json` from the current directory
+2. Scan the output directory for existing post files
+3. Match found files against the plan using:
+ - Filename patterns (slug derived from title or keyword)
+ - Content inspection (check for `primary_keyword` in frontmatter or first H1)
+4. Mark matched posts as `"status": "written"` in the plan
+
+### Resume Logic
+
+1. Load the plan with updated statuses
+2. Filter to `"status": "planned"` posts only
+3. Apply the priority algorithm to the remaining posts
+4. Continue execution from the next unwritten post
+5. Run backward link injection for any links between newly written and
+ previously written posts
+
+### Edge Cases
+
+- If the pillar is missing but spokes exist, write the pillar first and then
+ inject backward links into existing spokes
+- If a spoke file exists but is incomplete (under 50% of target word count),
+ treat it as unwritten and recreate
+- If `cluster-plan.json` has been modified since last execution, re-validate
+ the plan before resuming
+
+## Scorecard Metrics
+
+After execution completes (or on demand), generate `cluster-scorecard.md`:
+
+### Metric Definitions
+
+| Metric | Formula | Target |
+|--------|---------|--------|
+| Coverage | `written_posts / planned_posts * 100` | 100% |
+| Link Density | `total_internal_links / total_posts` | >= 3.0 per post |
+| Orphan Pages | Count of posts with 0 incoming internal links | 0 |
+| Pillar Connectivity | `spokes_linking_to_pillar / total_spokes * 100` | 100% |
+| Reverse Pillar Links | `spokes_linked_from_pillar / total_spokes * 100` | 100% |
+| Cross-Links | `implemented_cross_links / recommended_cross_links * 100` | >= 80% |
+| Cannibalization | Count of posts sharing a primary keyword | 0 |
+| Image Count | Posts with at least one image / total posts | >= 90% |
+| Content Gaps | Planned posts not yet written | 0 |
+| Avg Word Count | Mean word count across all written posts | Within 10% of targets |
+
+### Scorecard Output Format
+
+```markdown
+# Cluster Scorecard: [Seed Keyword]
+
+## Summary
+- Posts: X/Y written (Z%)
+- Total words: N (estimated: M)
+- Internal links: L (density: L/Y per post)
+
+## Metrics
+| Metric | Score | Status |
+|--------|-------|--------|
+| Coverage | 100% | PASS |
+| Link Density | 3.2/post | PASS |
+| ...
+
+## Issues Found
+- [List any FAIL or WARN metrics with remediation steps]
+
+## Next Steps
+- [Actionable items to reach 100% on all metrics]
+```
+
+## Quality Gates
+
+Before marking execution as complete, verify:
+
+1. Every spoke links to the pillar (mandatory)
+2. The pillar links to every spoke (mandatory)
+3. No post has fewer than 3 incoming internal links
+4. No two posts share the same primary keyword
+5. No orphan pages exist
+6. All posts meet minimum word count (80% of target)
+
+If any gate fails, flag it in the scorecard and provide specific remediation
+instructions. Do NOT silently pass a failing cluster.
diff --git a/skills/seo-cluster/references/hub-spoke-architecture.md b/skills/seo-cluster/references/hub-spoke-architecture.md
new file mode 100644
index 0000000..56986ac
--- /dev/null
+++ b/skills/seo-cluster/references/hub-spoke-architecture.md
@@ -0,0 +1,181 @@
+# Hub-and-Spoke Content Architecture
+
+## Structure Overview
+
+A hub-and-spoke cluster consists of one pillar page (the hub) connected to multiple
+spoke clusters, each containing 2-4 individual posts. The pillar provides broad
+coverage; spokes provide deep dives into subtopics.
+
+```
+ [Spoke 1a] --- [Spoke 1b]
+ \ /
+ [Cluster 1]
+ |
+[Spoke 2a] -- [Cluster 2] -- [PILLAR] -- [Cluster 3] -- [Spoke 3a]
+[Spoke 2b] / \ [Spoke 3b]
+ |
+ [Cluster 4]
+ / \
+ [Spoke 4a] --- [Spoke 4b]
+```
+
+## Pillar Page Specifications
+
+| Attribute | Requirement |
+|-----------|-------------|
+| Word count | 2,500-4,000 words |
+| Keyword | Broadest, highest-volume keyword in the set |
+| Content type | Comprehensive overview covering all cluster subtopics |
+| Template | `ultimate-guide` (default) |
+| Internal links | Link to EVERY spoke post in every cluster (mandatory) |
+| Structure | Table of contents, section per cluster, summary per subtopic |
+| Schema | Article + BreadcrumbList + ItemList (listing all cluster pages) |
+| Update frequency | Refresh quarterly or when new spokes are added |
+
+## Spoke Page Specifications
+
+| Attribute | Requirement |
+|-----------|-------------|
+| Word count | 1,200-1,800 words |
+| Keyword | Specific subtopic keyword (unique per post) |
+| Content type | Deep-dive into a single subtopic |
+| Template | Selected by intent (see template mapping below) |
+| Internal links | Link to pillar (mandatory) + 2-3 sibling spokes |
+| Schema | Article + BreadcrumbList |
+| Depth | More detailed than the pillar's coverage of the same subtopic |
+
+## Cluster Constraints
+
+| Constraint | Value |
+|-----------|-------|
+| Clusters per pillar | 2-5 |
+| Posts per cluster | 2-4 |
+| Total posts (including pillar) | 5-21 |
+| Max total estimated words | ~50,000 (pillar + 20 spokes at max) |
+
+## Template Auto-Selection by Intent
+
+| Intent Pattern | Template | Description |
+|---------------|----------|-------------|
+| Informational (broad) | `ultimate-guide` | Comprehensive topic overview |
+| Informational (how) | `how-to` | Step-by-step instructions |
+| Informational (list) | `listicle` | Numbered list of items/tips |
+| Informational (concept) | `explainer` | Deep explanation of a concept |
+| Commercial (compare) | `comparison` | Side-by-side product/service comparison |
+| Commercial (evaluate) | `review` | In-depth review of a single product/service |
+| Commercial (rank) | `best-of` | Ranked list of top options |
+| Transactional | `landing-page` | Conversion-focused page |
+
+**Selection logic:**
+1. Match the keyword's classified intent to the table above
+2. If multiple templates match, prefer the one whose SERP results show the most
+ similar content format (e.g., if top results are all listicles, use `listicle`)
+3. Avoid duplicate templates within the same cluster unless justified by intent
+
+## Internal Link Rules
+
+### Mandatory Links
+- Every spoke MUST link to the pillar (at least once in body content)
+- The pillar MUST link to every spoke (in its relevant section)
+- These are non-negotiable -- a cluster without these links is structurally broken
+
+### Recommended Links
+- Spoke-to-spoke within the same cluster: 2-3 links per post
+- Use contextual anchor text (target keyword or close variant)
+- Place links within body paragraphs, not just in "related posts" sections
+
+### Optional Links
+- Cross-cluster spoke-to-spoke: 0-1 links per post
+- Only when there is a genuine topical bridge between clusters
+- Avoid forcing cross-links that do not add reader value
+
+### Minimum Link Requirements
+- Every post must have at least 3 incoming internal links
+- No orphan pages (every page reachable from pillar within 2 clicks)
+- Anchor text diversity: no single anchor text used for more than 40% of links to a page
+
+## Cannibalization Prevention
+
+1. **No two posts share the same primary keyword.** Period.
+2. If SERP overlap between two keywords is 7+, merge into a single post
+3. After clustering, verify uniqueness: list all primary keywords and check for
+ near-duplicates (e.g., "best CRM" and "top CRM software")
+4. If near-duplicates found, either merge the posts or differentiate by intent
+ (e.g., one as "best-of" list, another as "comparison")
+
+## JSON-LD Schema Templates
+
+### Pillar Page
+```json
+[
+ { "@type": "Article", "headline": "...", "author": {...}, "datePublished": "..." },
+ { "@type": "BreadcrumbList", "itemListElement": [
+ { "@type": "ListItem", "position": 1, "name": "Home", "item": "..." },
+ { "@type": "ListItem", "position": 2, "name": "Pillar Title", "item": "..." }
+ ]},
+ { "@type": "ItemList", "name": "Topic Cluster", "itemListElement": [
+ { "@type": "ListItem", "position": 1, "url": "spoke-1-url" }
+ ]}
+]
+```
+
+### Spoke Page
+```json
+[
+ { "@type": "Article", "headline": "...", "author": {...}, "isPartOf": { "@id": "pillar-url" } },
+ { "@type": "BreadcrumbList", "itemListElement": [
+ { "@type": "ListItem", "position": 1, "name": "Home", "item": "..." },
+ { "@type": "ListItem", "position": 2, "name": "Pillar Title", "item": "pillar-url" },
+ { "@type": "ListItem", "position": 3, "name": "Spoke Title", "item": "..." }
+ ]}
+]
+```
+
+## cluster-plan.json Schema
+
+```json
+{
+ "version": "1.9.0",
+ "seed_keyword": "string",
+ "created_at": "ISO-8601",
+ "pillar": {
+ "title": "string",
+ "keyword": "string",
+ "volume": 0,
+ "template": "ultimate-guide",
+ "wordCount": 4000,
+ "url": "string",
+ "status": "planned|written"
+ },
+ "clusters": [
+ {
+ "name": "Cluster Name",
+ "posts": [
+ {
+ "title": "string",
+ "keyword": "string",
+ "volume": 0,
+ "template": "string",
+ "wordCount": 1500,
+ "url": "string",
+ "status": "planned|written"
+ }
+ ]
+ }
+ ],
+ "links": [
+ { "from": "pillar", "to": "cluster-0-post-0", "type": "mandatory", "anchor": "keyword" }
+ ],
+ "serp_matrix": {
+ "keywords": ["string"],
+ "scores": [[0]]
+ },
+ "scorecard": {
+ "coverage": 0.0,
+ "linkDensity": 0.0,
+ "orphanPages": 0,
+ "cannibalization": 0,
+ "contentGaps": 0
+ }
+}
+```
diff --git a/skills/seo-cluster/references/serp-overlap-methodology.md b/skills/seo-cluster/references/serp-overlap-methodology.md
new file mode 100644
index 0000000..1c02322
--- /dev/null
+++ b/skills/seo-cluster/references/serp-overlap-methodology.md
@@ -0,0 +1,108 @@
+# SERP Overlap Methodology
+
+## Core Principle
+
+Two keywords that return the same Google results should be targeted by the same page.
+Two keywords that return completely different results need separate pages. This is the
+foundation of SERP-based clustering -- using Google's own ranking decisions to determine
+content architecture rather than relying on keyword text similarity or stemming.
+
+## Scoring Algorithm
+
+### Step 1: Collect SERP Data
+
+For each keyword in the candidate set, retrieve the top 10 organic results:
+- Use WebSearch or DataForSEO `serp_organic_live_advanced`
+- Extract only organic result URLs (ignore ads, featured snippets, PAA, knowledge panels)
+- Normalize URLs: strip protocol, trailing slash, and query parameters (except meaningful ones)
+- Store as a set of 10 URLs per keyword
+
+### Step 2: Pairwise Comparison
+
+For each pair of keywords (A, B):
+1. Retrieve the URL sets: `urls_A` and `urls_B`
+2. Compute overlap: `shared = urls_A intersection urls_B`
+3. Score: `overlap_score = len(shared)`
+
+### Step 3: Apply Thresholds
+
+| Overlap Score | Relationship | Action |
+|--------------|-------------|--------|
+| 7-10 | **Same post** | Merge keywords into one target page. Use higher-volume keyword as primary. |
+| 4-6 | **Same cluster** | Place in same spoke cluster. May be separate posts or same post depending on volume difference. |
+| 2-3 | **Interlink** | Place in adjacent clusters. Create cross-cluster internal links. |
+| 0-1 | **Separate** | Different clusters entirely or exclude from current pillar topic. |
+
+### Step 4: Handle Ambiguous Scores (3-4 Range)
+
+Scores in the 3-4 range require tiebreaking:
+1. Check domain overlap (same domains but different pages = closer relationship)
+2. Check intent alignment (same intent category = lean toward same cluster)
+3. Check volume ratio (if one keyword has 10x+ more volume, it likely deserves its own post)
+4. When in doubt, keep in same cluster with separate posts (err toward cohesion)
+
+## Optimization Strategy
+
+Full pairwise comparison of N keywords requires N*(N-1)/2 SERP fetches. For 40
+keywords, that is 780 comparisons. Optimize by reducing unnecessary checks:
+
+### Pre-Grouping
+
+1. Classify all keywords by intent (Informational, Commercial, Transactional)
+2. Group keywords that share the same head term (e.g., "CRM software" variants)
+3. Only run pairwise SERP comparison within pre-groups
+4. Cross-check boundary keywords (highest volume in each group) across groups
+
+### Skip Rules
+
+- If keywords A and B are both long-tail variants of the same head term AND share
+ the same intent, assume overlap 4-6 (same cluster) without checking SERP
+- If keywords are in different intent categories, assume overlap 0-2 unless they
+ share a head term
+- Verify assumptions with spot-check SERP comparisons (sample 20% of skipped pairs)
+
+## Scoring Matrix Format
+
+Store the overlap data as a symmetric matrix in `cluster-plan.json`:
+
+```json
+{
+ "serp_matrix": {
+ "keywords": ["keyword-a", "keyword-b", "keyword-c"],
+ "scores": [
+ [10, 5, 1],
+ [5, 10, 3],
+ [1, 3, 10]
+ ]
+ }
+}
+```
+
+Diagonal is always 10 (a keyword overlaps perfectly with itself).
+
+## Anti-Patterns
+
+1. **Never cluster by text similarity alone.** "Dog training tips" and "dog training
+ classes" may have completely different SERPs despite similar text.
+2. **Never use stemming-only grouping.** "Run" and "running" may target different
+ intents entirely.
+3. **Never assume related searches belong in the same cluster.** Verify with SERP data.
+4. **Never ignore SERP feature differences.** If keyword A triggers a local pack and
+ keyword B triggers a featured snippet, they likely need different content types
+ even with moderate URL overlap.
+5. **Never treat all domains equally.** Wikipedia and Reddit appear in many SERPs.
+ Consider filtering out ubiquitous domains (top 5 most common) before scoring, or
+ weighting domain-specific results higher.
+
+## Data Source Priority
+
+1. **DataForSEO** (if available): Most reliable, consistent SERP data. Use
+ `serp_organic_live_advanced` with `location_code: 2840` (US) and `language_code: "en"`.
+2. **WebSearch** (fallback): Adequate for clustering but results may vary by session.
+ Run multiple searches for the same keyword and use the most common result set.
+
+## Caching
+
+Within a single clustering session, cache all SERP results. If keyword A's results
+are fetched for the A-B comparison, reuse them for the A-C comparison. This halves
+the number of actual SERP fetches needed.
diff --git a/skills/seo-competitor-pages/SKILL.md b/skills/seo-competitor-pages/SKILL.md
index 8de0905..707de58 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-content/SKILL.md b/skills/seo-content/SKILL.md
index d91259d..7a24963 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-dataforseo/SKILL.md b/skills/seo-dataforseo/SKILL.md
index 1959619..cc35124 100644
--- a/skills/seo-dataforseo/SKILL.md
+++ b/skills/seo-dataforseo/SKILL.md
@@ -15,7 +15,7 @@ license: MIT
compatibility: "Requires DataForSEO MCP server"
metadata:
author: AgriciDaniel
- version: "1.8.2"
+ version: "1.9.0"
category: seo
---
@@ -46,6 +46,29 @@ DataForSEO charges per API call. Be efficient:
- Cache results mentally within a session; don't re-fetch the same data
- Warn user before running expensive operations (full backlink crawls, large keyword lists)
+## Cost Guardrails
+
+**Before every DataForSEO MCP call**, run cost estimation:
+```
+python scripts/dataforseo_costs.py check <endpoint> [--count N]
+```
+
+- If `"status": "approved"` → proceed with the API call
+- If `"status": "needs_approval"` → show the cost estimate to the user and ask for confirmation before proceeding
+- If `"status": "blocked"` → inform the user that the daily budget limit would be exceeded; do NOT proceed
+
+**After each API call completes**, log the cost:
+```
+python scripts/dataforseo_costs.py log <endpoint> <actual_cost>
+```
+
+**User commands for cost management:**
+- `/seo dataforseo costs today` → show today's spending breakdown
+- `/seo dataforseo costs summary` → show 7-day spending history
+- `/seo dataforseo costs config --mode threshold --threshold 0.50` → configure approval mode
+
+Load `references/cost-tiers.md` for the full pricing table, budget presets, and cost reduction tips.
+
## Quick Reference
| Command | What it does |
diff --git a/skills/seo-dataforseo/references/cost-tiers.md b/skills/seo-dataforseo/references/cost-tiers.md
new file mode 100644
index 0000000..97ff303
--- /dev/null
+++ b/skills/seo-dataforseo/references/cost-tiers.md
@@ -0,0 +1,60 @@
+# DataForSEO API Cost Reference
+
+## Pricing Tiers (USD per call, standard queue)
+
+| Category | Endpoint | Cost/Call | Notes |
+|----------|----------|-----------|-------|
+| **SERP** | `serp_*_live_advanced` | $0.002 | Per 100 results |
+| **SERP** | `serp_*_live_regular` | $0.001 | Lightweight |
+| **SERP Images** | `serp_google_images_live_*` | $0.002 | 5x with site:/filetype: operators |
+| **Keywords** | `kw_data_google_ads_search_volume` | $0.05 | Per batch of keywords |
+| **Keywords** | `kw_data_google_trends_explore` | $0.01 | Per query |
+| **Labs** | `dataforseo_labs_*_keyword_*` | $0.05 | Ideas, suggestions, related |
+| **Labs** | `dataforseo_labs_bulk_*` | $0.01 | Difficulty, traffic |
+| **Labs** | `dataforseo_labs_*_domain_*` | $0.05 | Competitors, intersection |
+| **On-Page** | `on_page_instant_pages` | $0.01 | Quick analysis |
+| **On-Page** | `on_page_lighthouse` | $0.02 | Full Lighthouse |
+| **Backlinks** | `backlinks_*` | $0.02 | Per sub-call |
+| **Content** | `content_analysis_*` | $0.02 | Search, summary, trends |
+| **Business** | `business_data_*` | $0.05 | Listings search |
+| **AI/GEO** | `ai_optimization_*` | $0.05 | ChatGPT scraper, LLM mentions |
+| **Merchant** | `merchant_*` | $0.02 | Google Shopping, Amazon |
+| **Domain** | `domain_analytics_whois_*` | $0.005 | WHOIS data |
+| **Domain** | `domain_analytics_technologies_*` | $0.01 | Tech stack |
+
+## Budget Presets
+
+| Preset | Daily Limit | Threshold | Mode | Best For |
+|--------|------------|-----------|------|----------|
+| **Conservative** | $2.00 | $0.10 | threshold | Learning, testing |
+| **Standard** | $10.00 | $0.50 | threshold | Regular audits |
+| **Aggressive** | $50.00 | $2.00 | threshold | Agency bulk work |
+| **Unlimited** | $999.00 | -- | none | Trusted pipelines |
+
+Configure with: `python scripts/dataforseo_costs.py config --mode threshold --threshold 0.50 --daily-limit 10.00`
+
+## Cost Reduction Tips
+
+- Use `live_regular` instead of `live_advanced` when full SERP features aren't needed (50% savings)
+- Batch keywords into single `search_volume` calls instead of individual SERP lookups
+- Use `standard` task queue instead of `live` for non-urgent analysis (60-80% savings)
+- Avoid `site:` and `filetype:` operators in image SERP queries (5x cost multiplier)
+- Cache session results — don't re-fetch the same keyword/domain within a session
+
+## Approval Flow
+
+Before any DataForSEO MCP call:
+1. Run `python scripts/dataforseo_costs.py check <endpoint> [--count N]`
+2. If `status: "approved"` → proceed
+3. If `status: "needs_approval"` → show cost to user, ask to confirm
+4. If `status: "blocked"` → inform user daily limit would be exceeded
+5. After call completes, log: `python scripts/dataforseo_costs.py log <endpoint> <cost>`
+
+## Warn Endpoints
+
+These endpoints always require user confirmation regardless of approval mode:
+- `backlinks_backlinks` (can generate large result sets)
+- `backlinks_domain_intersection` (expensive multi-domain comparison)
+- `ai_optimization_chat_gpt_scraper` (ChatGPT web scraping)
+- `ai_opt_llm_ment_search` (LLM mention tracking)
+- `merchant_amazon_products_search` (Amazon product data)
diff --git a/skills/seo-drift/SKILL.md b/skills/seo-drift/SKILL.md
new file mode 100644
index 0000000..651018f
--- /dev/null
+++ b/skills/seo-drift/SKILL.md
@@ -0,0 +1,219 @@
+---
+name: seo-drift
+description: >
+ SEO drift monitoring: capture baselines of SEO-critical elements, detect changes,
+ and track regressions over time. Git for SEO — baseline, diff, and track changes
+ to your on-page SEO. Use when user says "SEO drift", "baseline", "track changes",
+ "did anything break", "SEO regression", "compare SEO", "before and after",
+ "monitor SEO changes", or "deployment check".
+user-invokable: true
+argument-hint: "baseline|compare|history <url>"
+license: MIT
+metadata:
+ author: AgriciDaniel
+ original_author: "Dan Colta (Pro Hub Challenge)"
+ version: "1.9.0"
+ category: seo
+---
+
+# SEO Drift Monitor (April 2026)
+
+Git for your SEO. Capture baselines, detect regressions, track changes over time.
+
+---
+
+## Commands
+
+| Command | Purpose |
+|---------|---------|
+| `/seo drift baseline <url>` | Capture current SEO state as a "known good" snapshot |
+| `/seo drift compare <url>` | Compare current page state to stored baseline |
+| `/seo drift history <url>` | Show change history and past comparisons |
+
+---
+
+## What It Captures
+
+Every baseline records these SEO-critical elements:
+
+| Element | Field | Source |
+|---------|-------|--------|
+| Title tag | `title` | `parse_html.py` |
+| Meta description | `meta_description` | `parse_html.py` |
+| Canonical URL | `canonical` | `parse_html.py` |
+| Robots directives | `meta_robots` | `parse_html.py` |
+| H1 headings | `h1` (array) | `parse_html.py` |
+| H2 headings | `h2` (array) | `parse_html.py` |
+| H3 headings | `h3` (array) | `parse_html.py` |
+| JSON-LD schema | `schema` (array) | `parse_html.py` |
+| Open Graph tags | `open_graph` (dict) | `parse_html.py` |
+| Core Web Vitals | `cwv` (dict) | `pagespeed_check.py` |
+| HTTP status code | `status_code` | `fetch_page.py` |
+| HTML content hash | `html_hash` (SHA-256) | Computed |
+| Schema content hash | `schema_hash` (SHA-256) | Computed |
+
+---
+
+## How Comparison Works
+
+The comparison engine applies **17 rules across 3 severity levels**. Load
+`references/comparison-rules.md` for the full rule set with thresholds,
+recommended actions, and cross-skill references.
+
+### Severity Levels
+
+| Level | Meaning | Response Time |
+|-------|---------|---------------|
+| **CRITICAL** | SEO-breaking change, likely traffic loss | Immediate |
+| **WARNING** | Potential impact, needs investigation | Within 1 week |
+| **INFO** | Awareness only, may be intentional | Review at convenience |
+
+---
+
+## Storage
+
+All data is stored locally in SQLite:
+
+```
+~/.cache/claude-seo/drift/baselines.db
+```
+
+### Tables
+
+- **baselines**: Captured snapshots with all SEO elements
+- **comparisons**: Diff results with triggered rules and severities
+
+URL normalization ensures consistent matching: lowercase scheme/host, strip
+default ports (80/443), sort query parameters, remove UTM parameters, strip
+trailing slashes.
+
+---
+
+## Command: `baseline`
+
+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)
+5. Hash HTML body and schema content (SHA-256)
+6. Store snapshot in SQLite
+
+**Execution:**
+```bash
+python scripts/drift_baseline.py <url>
+python scripts/drift_baseline.py <url> --skip-cwv
+```
+
+**Output:** JSON with baseline ID, timestamp, URL, and summary of captured elements.
+
+---
+
+## Command: `compare`
+
+Fetches the current page state and diffs it against the most recent baseline.
+
+**Steps:**
+1. Validate URL
+2. Load most recent baseline from SQLite (or specific `--baseline-id`)
+3. Fetch and parse current page state
+4. Run all 17 comparison rules
+5. Classify findings by severity
+6. Store comparison result
+7. Output JSON diff report
+
+**Execution:**
+```bash
+python scripts/drift_compare.py <url>
+python scripts/drift_compare.py <url> --baseline-id 5
+python scripts/drift_compare.py <url> --skip-cwv
+```
+
+**Output:** JSON with all triggered rules, old/new values, severity, and actions.
+
+After comparison, offer to generate an HTML report:
+```bash
+python scripts/drift_report.py <comparison_json_file> --output drift-report.html
+```
+
+---
+
+## Command: `history`
+
+Shows all baselines and comparisons for a URL.
+
+**Execution:**
+```bash
+python scripts/drift_history.py <url>
+python scripts/drift_history.py <url> --limit 10
+```
+
+**Output:** JSON array of baselines (newest first) with timestamps and comparison summaries.
+
+---
+
+## Cross-Skill Integration
+
+When drift is detected, recommend the appropriate specialized skill:
+
+| Finding | Recommendation |
+|---------|----------------|
+| Schema removed or modified | Run `/seo schema <url>` for full validation |
+| CWV regression | Run `/seo technical <url>` for performance audit |
+| Title or meta description changed | Run `/seo page <url>` for content analysis |
+| Canonical changed or removed | Run `/seo technical <url>` for indexability check |
+| Noindex added | Run `/seo technical <url>` for crawlability audit |
+| H1/heading structure changed | Run `/seo content <url>` for E-E-A-T review |
+| OG tags removed | Run `/seo page <url>` for social sharing analysis |
+| Status code changed to error | Run `/seo technical <url>` for full diagnostics |
+
+---
+
+## Error Handling
+
+| Scenario | Action |
+|----------|--------|
+| URL unreachable | Report error from `fetch_page.py`. Do not guess state. Suggest user verify URL. |
+| No baseline exists for URL | Inform user and suggest running `baseline` first. |
+| SSRF blocked (private IP) | Report `validate_url()` rejection. Never bypass. |
+| SQLite database missing | Auto-create on first use. No error. |
+| CWV fetch fails (no API key) | Store `null` for CWV fields. Skip CWV rules during comparison. |
+| Page returns 4xx/5xx | Still capture as baseline (status code IS a tracked field). |
+| Multiple baselines exist | Use most recent unless `--baseline-id` specified. |
+
+---
+
+## Security
+
+- **All URL fetching** goes through `scripts/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
+- **TLS always verified** -- no `verify=False` anywhere in the pipeline
+
+---
+
+## Typical Workflows
+
+### Pre/Post Deployment Check
+```
+/seo drift baseline https://example.com # Before deploy
+# ... deploy happens ...
+/seo drift compare https://example.com # After deploy
+```
+
+### Ongoing Monitoring
+```
+/seo drift baseline https://example.com # Initial capture
+# ... weeks later ...
+/seo drift compare https://example.com # Check for drift
+/seo drift history https://example.com # Review all changes
+```
+
+### Investigating a Traffic Drop
+```
+/seo drift compare https://example.com # What changed?
+/seo drift history https://example.com # When did it change?
+```
diff --git a/skills/seo-drift/references/comparison-rules.md b/skills/seo-drift/references/comparison-rules.md
new file mode 100644
index 0000000..70583e1
--- /dev/null
+++ b/skills/seo-drift/references/comparison-rules.md
@@ -0,0 +1,124 @@
+# SEO Drift Comparison Rules
+
+17 rules across 3 severity levels. Each rule compares a specific SEO element
+between the stored baseline and the current page state.
+
+---
+
+## CRITICAL (Immediate Action Required)
+
+These changes typically cause measurable traffic loss within days.
+
+### Rule 1: Schema/JSON-LD Completely Removed
+- **Compare**: Baseline `schema` array has items, current is empty
+- **Threshold**: Any schema present before, none now
+- **Action**: Restore structured data immediately. Rich results will be lost within hours.
+- **Cross-ref**: `/seo schema <url>`
+
+### Rule 2: Canonical URL Changed
+- **Compare**: Baseline `canonical` vs current `canonical`
+- **Threshold**: Different non-null values (after normalization)
+- **Action**: Verify the new canonical is intentional. Incorrect canonicals redirect ranking signals to wrong page.
+- **Cross-ref**: `/seo technical <url>`
+
+### Rule 3: Canonical URL Removed
+- **Compare**: Baseline `canonical` was set, current is `null`
+- **Threshold**: Had value, now missing
+- **Action**: Restore canonical tag. Google will guess, often incorrectly for pages with query parameters.
+- **Cross-ref**: `/seo technical <url>`
+
+### Rule 4: Noindex Directive Added
+- **Compare**: Baseline `meta_robots` did not contain "noindex", current does
+- **Threshold**: "noindex" substring now present (case-insensitive)
+- **Action**: If unintentional, remove immediately. Page will be dropped from index within days.
+- **Cross-ref**: `/seo technical <url>`
+
+### Rule 5: H1 Tag Removed Entirely
+- **Compare**: Baseline `h1` had entries, current is empty
+- **Threshold**: One or more H1s before, zero now
+- **Action**: Restore H1 heading. Primary page topic signal for search engines.
+- **Cross-ref**: `/seo content <url>`
+
+### Rule 6: H1 Text Changed Significantly
+- **Compare**: First H1 in baseline vs first H1 in current, SequenceMatcher ratio
+- **Threshold**: Similarity ratio < 0.5 (>50% different)
+- **Action**: Verify the H1 change aligns with target keyword strategy.
+- **Cross-ref**: `/seo content <url>`
+
+### Rule 7: Title Tag Removed Entirely
+- **Compare**: Baseline `title` was set, current is `null` or empty
+- **Threshold**: Had value, now missing
+- **Action**: Restore title tag immediately. Google will auto-generate one, often poorly.
+- **Cross-ref**: `/seo page <url>`
+
+### Rule 8: HTTP Status Code Changed to Error
+- **Compare**: Baseline `status_code` was 2xx, current is 4xx or 5xx
+- **Threshold**: Status code class changed from success to client/server error
+- **Action**: Investigate server error or missing page. Rankings will drop within days.
+- **Cross-ref**: `/seo technical <url>`
+
+---
+
+## WARNING (Investigate Within 1 Week)
+
+These changes may impact rankings or CTR but are sometimes intentional.
+
+### Rule 9: Title Text Changed
+- **Compare**: Baseline `title` vs current `title` (trimmed)
+- **Threshold**: Strings differ (case-sensitive, whitespace-normalized)
+- **Action**: Verify new title includes target keywords. Monitor CTR in GSC over 2 weeks.
+- **Cross-ref**: `/seo page <url>`
+
+### Rule 10: Meta Description Changed
+- **Compare**: Baseline `meta_description` vs current `meta_description`
+- **Threshold**: Strings differ (trimmed)
+- **Action**: Verify new description includes call-to-action and target keywords. Monitor CTR.
+- **Cross-ref**: `/seo page <url>`
+
+### Rule 11: Core Web Vitals Metric Regressed >20%
+- **Compare**: Each CWV metric p75 value (LCP, INP, CLS) baseline vs current
+- **Threshold**: Current value is >20% worse than baseline (higher for LCP/INP, higher for CLS)
+- **Action**: Investigate performance regression. Check recent code changes or third-party scripts.
+- **Cross-ref**: `/seo technical <url>`
+
+### Rule 12: CWV Performance Score Dropped 10+ Points
+- **Compare**: Lighthouse performance score baseline vs current
+- **Threshold**: Drop of 10 or more points (e.g., 85 to 74)
+- **Action**: Run full PageSpeed analysis to identify new bottlenecks.
+- **Cross-ref**: `/seo google psi <url>`
+
+### Rule 13: OG Tags Removed
+- **Compare**: Baseline `open_graph` had entries, current is empty
+- **Threshold**: One or more OG tags before, none now
+- **Action**: Restore OG tags. Social sharing will show generic/missing previews.
+- **Cross-ref**: `/seo page <url>`
+
+### Rule 14: Schema/JSON-LD Content Modified
+- **Compare**: Baseline `schema_hash` vs current `schema_hash`
+- **Threshold**: Hash differs AND schema still exists (removal is Rule 1)
+- **Action**: Validate modified schema. Check for type changes, removed properties, or new validation errors.
+- **Cross-ref**: `/seo schema <url>`
+
+---
+
+## INFO (Awareness Only)
+
+These are tracked for completeness. Often positive or neutral changes.
+
+### Rule 15: New Schema/JSON-LD Added
+- **Compare**: Baseline `schema` was empty, current has items
+- **Threshold**: No schema before, schema now present
+- **Action**: Positive change. Validate the new schema with `/seo schema <url>`.
+- **Cross-ref**: `/seo schema <url>`
+
+### Rule 16: H2 Structure Changed
+- **Compare**: Baseline `h2` array vs current `h2` array
+- **Threshold**: Different number of H2s, or different H2 text values
+- **Action**: Review heading hierarchy. Ensure content sections still align with target topics.
+- **Cross-ref**: `/seo content <url>`
+
+### Rule 17: Content Hash Changed
+- **Compare**: Baseline `html_hash` vs current `html_hash`
+- **Threshold**: Hash differs (catch-all for any body content change)
+- **Action**: General content change detected. Review if no other rules triggered to understand what changed.
+- **Cross-ref**: `/seo page <url>`
diff --git a/skills/seo-ecommerce/SKILL.md b/skills/seo-ecommerce/SKILL.md
new file mode 100644
index 0000000..2fdabf5
--- /dev/null
+++ b/skills/seo-ecommerce/SKILL.md
@@ -0,0 +1,341 @@
+---
+name: seo-ecommerce
+description: >
+ E-commerce SEO analysis: Google Shopping visibility, Amazon marketplace
+ intelligence, product schema validation, competitor pricing analysis, and
+ marketplace keyword gaps. Combines on-page product SEO with marketplace data
+ from DataForSEO Merchant API. Use when user says "ecommerce SEO", "product SEO",
+ "Google Shopping", "marketplace SEO", "product schema", "Amazon SEO",
+ "product listings", "shopping ads", or "merchant SEO".
+user-invokable: true
+argument-hint: "<url or keyword>"
+license: MIT
+compatibility: "Enhanced with DataForSEO Merchant API (optional)"
+metadata:
+ author: AgriciDaniel
+ original_author: "Matej Marjanovic (Pro Hub Challenge)"
+ version: "1.9.0"
+ category: seo
+---
+
+# E-commerce SEO Analysis
+
+Comprehensive product page optimization, marketplace intelligence, and
+competitive pricing analysis. Works standalone (on-page + schema) and with
+DataForSEO Merchant API for live Google Shopping and Amazon data.
+
+## Commands
+
+| Command | Purpose | DataForSEO? |
+|---------|---------|-------------|
+| `/seo ecommerce <url>` | Full e-commerce SEO analysis of a product page or store | Optional |
+| `/seo ecommerce products <keyword>` | Google Shopping competitive analysis | Required |
+| `/seo ecommerce gaps <domain>` | Keyword gap: organic vs Shopping visibility | Required |
+| `/seo ecommerce schema <url>` | Product schema validation and enhancement | No |
+
+---
+
+## 1. Product Page Analysis (No DataForSEO Needed)
+
+Fetch and parse any product page for on-page SEO quality.
+
+### Workflow
+
+```
+1. python scripts/fetch_page.py <url> → raw HTML
+2. python scripts/parse_html.py --url <url> → SEO elements
+3. Analyze product-specific signals (below)
+```
+
+### Product SEO Checklist
+
+#### Title Tag
+- [ ] Contains primary product keyword
+- [ ] Includes brand name
+- [ ] Under 60 characters (no truncation in SERPs)
+- [ ] Format: `[Product Name] - [Key Feature] | [Brand]`
+
+#### Meta Description
+- [ ] Contains product keyword + benefit
+- [ ] Includes price or "from $XX" (triggers rich snippet interest)
+- [ ] Call-to-action present (Shop now, Buy, Free shipping)
+- [ ] Under 155 characters
+
+#### Heading Structure
+- [ ] Single H1 matching primary product name
+- [ ] H2s for: Features, Specifications, Reviews, Related Products
+- [ ] No duplicate H1 tags across product variants
+
+#### Product Images
+- [ ] Alt text includes product name + distinguishing feature
+- [ ] File names are descriptive (not `IMG_001.jpg`)
+- [ ] WebP format served (with JPEG fallback)
+- [ ] At least 3 images per product (hero, detail, lifestyle)
+- [ ] Image dimensions >= 800px for Google Shopping eligibility
+- [ ] Lazy loading on below-fold images only
+
+#### Internal Linking
+- [ ] Breadcrumb navigation: Home > Category > Subcategory > Product
+- [ ] Related products section (cross-sell / upsell)
+- [ ] Link back to category page with keyword-rich anchor
+- [ ] Reviews section links to full review page (if separate)
+
+#### Content Quality
+- [ ] Unique product description (not manufacturer copy-paste)
+- [ ] Word count >= 200 for product description body
+- [ ] Specs table present (not just prose)
+- [ ] User reviews on-page (UGC signals)
+
+### Scoring
+
+| Category | Weight | Criteria |
+|----------|--------|----------|
+| Schema completeness | 25% | Required + recommended Product fields |
+| Title & meta | 15% | Keyword placement, length, format |
+| Image optimization | 20% | Alt text, format, sizing, count |
+| Content quality | 20% | Unique description, specs, reviews |
+| Internal linking | 10% | Breadcrumbs, related products, categories |
+| Technical | 10% | Page speed, mobile rendering, canonical |
+
+---
+
+## 2. Google Shopping Intelligence (DataForSEO Merchant API)
+
+Live competitive analysis from Google Shopping results.
+
+### Cost Guardrail (MANDATORY)
+
+Before EVERY Merchant API call:
+```bash
+python scripts/dataforseo_costs.py check merchant_google_products_search
+```
+
+- `"status": "approved"` -- proceed
+- `"status": "needs_approval"` -- show cost, ask user
+- `"status": "blocked"` -- stop, inform user
+
+After each call:
+```bash
+python scripts/dataforseo_costs.py log merchant_google_products_search <cost>
+```
+
+### Workflow
+
+```bash
+# Product search: who sells what at what price
+python scripts/dataforseo_merchant.py search "<keyword>" --marketplace google
+
+# Seller analysis: merchant ratings and dominance
+python scripts/dataforseo_merchant.py sellers "<keyword>"
+
+# Normalize results for analysis
+python scripts/dataforseo_normalize.py results.json --module merchant
+```
+
+### Analysis Outputs
+
+#### Pricing Intelligence
+- Price distribution: min, max, median, P25, P75
+- Price outliers (> 2 standard deviations from median)
+- Price-to-rating correlation
+- Currency normalization to USD (or user-specified)
+
+#### Seller Landscape
+- Top 10 sellers by listing count
+- Merchant rating distribution
+- Free shipping prevalence
+- New vs established sellers
+
+#### Product Listing Quality
+- Title keyword patterns in top listings
+- Average rating and review count benchmarks
+- Image count per listing
+- Availability status distribution
+
+Load `references/marketplace-endpoints.md` for full API parameter details.
+
+---
+
+## 3. Amazon Marketplace (DataForSEO)
+
+Cross-marketplace intelligence comparing Google Shopping and Amazon.
+
+### Cost Guardrail (MANDATORY)
+
+```bash
+python scripts/dataforseo_costs.py check merchant_amazon_products_search
+```
+
+Amazon endpoints are in the `warn_endpoints` set -- always requires user approval.
+
+### Workflow
+
+```bash
+# Amazon product search
+python scripts/dataforseo_merchant.py search "<keyword>" --marketplace amazon
+
+# Cross-marketplace comparison
+python scripts/dataforseo_merchant.py compare "<keyword>"
+```
+
+### Cross-Marketplace Report
+
+| Metric | Google Shopping | Amazon |
+|--------|---------------|--------|
+| Avg price | $ | $ |
+| Median rating | X.X | X.X |
+| Avg review count | N | N |
+| Top seller share | % | % |
+| Free shipping % | % | % |
+
+---
+
+## 4. Marketplace Keyword Gaps
+
+Identify mismatches between organic and Shopping visibility.
+
+### Workflow
+
+1. Fetch organic rankings via seo-dataforseo:
+ `dataforseo_labs_google_ranked_keywords` for domain
+2. Fetch Google Shopping presence via Merchant API:
+ `merchant_google_products_search` for top organic keywords
+3. Cross-reference results
+
+### Gap Types
+
+| Gap Type | Meaning | Action |
+|----------|---------|--------|
+| **Organic Only** | Ranks organically but no Shopping ads | Create Google Merchant Center feed, bid on these keywords |
+| **Shopping Only** | Shopping visibility but weak/no organic | Create content (buying guides, comparison pages) for these keywords |
+| **Both Present** | Visible in both channels | Optimize: ensure price consistency, enhance schema |
+| **Neither** | No visibility in either | Low priority unless high volume |
+
+### Output Format
+
+```
+## Keyword Gap Analysis: example.com
+
+### Opportunities: Organic → Shopping (12 keywords)
+| Keyword | Organic Pos | Volume | CPC | Recommended Action |
+|---------|------------|--------|-----|-------------------|
+
+### Opportunities: Shopping → Organic (8 keywords)
+| Keyword | Shopping Rank | Volume | CPC | Content Type Needed |
+|---------|-------------|--------|-----|-------------------|
+```
+
+---
+
+## 5. Product Schema Enhancement
+
+Validate and generate Product schema following Google's current requirements.
+
+### Required Properties (Google Merchant)
+
+```json
+{
+ "@context": "https://schema.org",
+ "@type": "Product",
+ "name": "",
+ "image": [""],
+ "description": "",
+ "brand": { "@type": "Brand", "name": "" },
+ "offers": {
+ "@type": "Offer",
+ "url": "",
+ "priceCurrency": "USD",
+ "price": "0.00",
+ "availability": "https://schema.org/InStock",
+ "seller": { "@type": "Organization", "name": "" }
+ }
+}
+```
+
+### Recommended Properties (Enhance Rich Results)
+
+- `sku` -- product identifier
+- `gtin13` / `gtin14` / `mpn` -- global trade identifiers
+- `aggregateRating` -- star rating + review count
+- `review` -- individual reviews (minimum 1)
+- `color`, `material`, `size` -- variant attributes
+- `shippingDetails` -- ShippingDetails with rate and delivery time
+- `hasMerchantReturnPolicy` -- MerchantReturnPolicy with type and days
+
+### Validation Rules
+
+1. `price` must be a number string, not "$29.99" (no currency symbol)
+2. `availability` must use full Schema.org URL enum
+3. `image` should be array with >= 1 high-res image URL
+4. `priceCurrency` must be ISO 4217 (USD, EUR, GBP)
+5. `brand.name` must not be empty or "N/A"
+6. Dates in `priceValidUntil` must be ISO 8601
+7. If `aggregateRating` present: `ratingValue` and `reviewCount` required
+
+### Schema Scoring
+
+| Completeness | Score |
+|-------------|-------|
+| All required fields | 50/100 |
+| + aggregateRating | 65/100 |
+| + sku/gtin/mpn | 75/100 |
+| + shippingDetails | 85/100 |
+| + merchantReturnPolicy | 90/100 |
+| + reviews (3+) | 100/100 |
+
+---
+
+## Cross-Skill Integration
+
+| Skill | Integration Point |
+|-------|------------------|
+| **seo-schema** | Delegates Product schema generation; reuses validation logic |
+| **seo-images** | Product image audit (alt text, format, dimensions) |
+| **seo-content** | Product description E-E-A-T and uniqueness analysis |
+| **seo-dataforseo** | Organic keyword rankings for gap analysis |
+| **seo-technical** | Core Web Vitals for product pages (LCP on hero image) |
+| **seo-google** | Google Merchant Center feed validation via GSC |
+
+---
+
+## Error Handling
+
+| Error | Cause | Response |
+|-------|-------|----------|
+| No Product schema found | Page lacks JSON-LD | Analyze page content, generate recommended schema |
+| DataForSEO credentials missing | Env vars not set | Run analysis without marketplace data, note limitation |
+| Cost check blocked | Daily budget exceeded | Inform user, offer free-only analysis |
+| Empty Shopping results | No products for keyword | Suggest broader keyword, check location settings |
+| Amazon API timeout | Network/rate limit | Retry with backoff, fall back to Google-only |
+| Invalid URL | Malformed input | Validate via `google_auth.validate_url()`, show error |
+| Non-product page | URL is category/homepage | Detect page type, suggest `/seo ecommerce schema` instead |
+
+---
+
+## Output Template
+
+```
+## E-commerce SEO Report: [URL or Keyword]
+
+### Overall Score: XX/100
+
+### Product Page SEO
+- Schema Completeness: XX/100
+- Title & Meta: XX/100
+- Image Optimization: XX/100
+- Content Quality: XX/100
+- Internal Linking: XX/100
+
+### Marketplace Intelligence (if DataForSEO available)
+- Google Shopping Listings: N products found
+- Price Range: $XX - $XX (median: $XX)
+- Top Seller: [name] (XX% market share)
+- Amazon Comparison: [available/not checked]
+
+### Top Recommendations
+1. [Critical] ...
+2. [High] ...
+3. [Medium] ...
+
+Generate a PDF report? Use `/seo google report`
+```
diff --git a/skills/seo-ecommerce/references/marketplace-endpoints.md b/skills/seo-ecommerce/references/marketplace-endpoints.md
new file mode 100644
index 0000000..7b32ea8
--- /dev/null
+++ b/skills/seo-ecommerce/references/marketplace-endpoints.md
@@ -0,0 +1,119 @@
+# DataForSEO Merchant API Reference
+
+Endpoint details for Google Shopping and Amazon marketplace data.
+
+## Endpoints
+
+### Google Shopping Products
+
+| Field | Value |
+|-------|-------|
+| Endpoint | `merchant_google_products_search` |
+| Method | POST (task) / GET (results) |
+| Cost | $0.02 per call |
+| Queue | Standard (60-80% savings vs live) |
+
+**Parameters:**
+- `keyword` (required) -- search query
+- `location_code` (default: 2840 = US) -- DataForSEO location ID
+- `language_code` (default: "en") -- language
+- `price_min` / `price_max` (optional) -- filter by price range
+- `sort_by` (optional) -- "relevance", "price_low_to_high", "price_high_to_low", "rating"
+- `depth` (optional, default: 100) -- number of results
+
+**Response fields:**
+- `title` -- product listing title
+- `price` -- numeric price value
+- `currency` -- currency code (USD, EUR, etc.)
+- `seller` -- merchant name
+- `rating` -- product rating (float, 0-5)
+- `reviews_count` -- number of reviews
+- `url` -- product listing URL
+- `image_url` -- product image URL
+- `availability` -- "in_stock", "out_of_stock", "preorder"
+- `delivery_info` -- shipping details text
+- `product_id` -- Google Shopping product ID
+
+### Google Shopping Sellers
+
+| Field | Value |
+|-------|-------|
+| Endpoint | `merchant_google_sellers_search` |
+| Method | POST (task) / GET (results) |
+| Cost | $0.02 per call |
+
+**Parameters:** Same as products search.
+
+**Response fields:**
+- `seller_name` -- merchant name
+- `seller_rating` -- merchant rating (float)
+- `seller_reviews_count` -- merchant review count
+- `price` -- price offered by this seller
+- `delivery_info` -- shipping and delivery text
+- `url` -- seller listing URL
+
+### Amazon Products
+
+| Field | Value |
+|-------|-------|
+| Endpoint | `merchant_amazon_products_search` |
+| Method | POST (task) / GET (results) |
+| Cost | $0.02 per call |
+| Note | In `warn_endpoints` -- always requires user approval |
+
+**Parameters:**
+- `keyword` (required) -- search query
+- `location_code` (default: 2840 = US)
+- `language_code` (default: "en")
+- `depth` (optional, default: 100)
+- `sort_by` (optional) -- "relevance", "price_low_to_high", "price_high_to_low", "avg_customer_review"
+
+**Response fields:**
+- `title` -- product title
+- `price` -- numeric price
+- `currency` -- currency code
+- `seller` -- seller/brand name
+- `rating` -- star rating (float, 0-5)
+- `reviews_count` -- review count
+- `url` -- Amazon product URL
+- `image_url` -- product image
+- `availability` -- stock status
+- `asin` -- Amazon Standard Identification Number
+- `is_prime` -- Prime eligibility (boolean)
+- `is_best_seller` -- Best Seller badge (boolean)
+
+## Task/Poll Pattern
+
+All Merchant endpoints use the standard DataForSEO queue pattern:
+
+1. **POST** task with parameters to create endpoint
+2. **Poll** for results with exponential backoff (2s, 4s, 8s, max 60s)
+3. **GET** completed results by task ID
+
+This saves 60-80% compared to live endpoints.
+
+## Rate Limits
+
+- Max 2000 tasks per minute (across all endpoints)
+- Max 30,000 tasks per day on standard plans
+- Backoff on HTTP 429: wait 60 seconds, then retry
+
+## Data Normalization
+
+When consuming responses, normalize:
+
+| Field | Raw | Normalized |
+|-------|-----|-----------|
+| Price | String "$29.99" or float | Float `29.99` |
+| Currency | Mixed formats | ISO 4217 code (USD, EUR, GBP) |
+| Availability | Various strings | Enum: `in_stock`, `out_of_stock`, `preorder`, `unknown` |
+| Rating | Integer or float | Float rounded to 1 decimal |
+| Reviews | String or int | Integer |
+
+Use `scripts/dataforseo_normalize.py --module merchant` for automatic normalization.
+
+## Cost Reference
+
+See `skills/seo-dataforseo/references/cost-tiers.md` for the full pricing table,
+budget presets, and cost reduction tips. All Merchant endpoints are $0.02/call
+on standard queue.
diff --git a/skills/seo-geo/SKILL.md b/skills/seo-geo/SKILL.md
index a42ad57..433908b 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-google/SKILL.md b/skills/seo-google/SKILL.md
index d121734..1e6ed8d 100644
--- a/skills/seo-google/SKILL.md
+++ b/skills/seo-google/SKILL.md
@@ -14,7 +14,7 @@ argument-hint: "[command] [url|property]"
license: MIT
metadata:
author: AgriciDaniel
- version: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-hreflang/SKILL.md b/skills/seo-hreflang/SKILL.md
index 9e38ca4..9fa1ef3 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
@@ -190,6 +190,60 @@ Key rules:
- Incorrect codes to fix
- Method migration suggestions (e.g., HTML to sitemap for scale)
+## Cultural Adaptation Assessment
+
+When analyzing a multi-language site, go beyond technical hreflang validation to assess
+whether the content is culturally adapted for each target market.
+
+Load `references/cultural-profiles.md` for pre-built profiles (DACH, Francophone, Hispanic, Japanese).
+
+**Assessment steps:**
+1. Identify all language versions and their target markets
+2. Load the relevant cultural profile(s)
+3. Check CTAs match cultural expectations (direct vs indirect)
+4. Check trust signals are locale-appropriate (certifications, legal pages)
+5. Check for foreign brand references on localized pages
+6. Check number/date/currency formatting consistency
+7. Flag cultural adaptation issues as Medium severity
+
+**Output:** Cultural Adaptation Score per language version (0-100) with specific findings.
+
+## Content Parity Audit
+
+**Command:** `/seo hreflang audit <directory-or-url>`
+
+Audit content parity across all language versions of a site or local content directory.
+
+Load `references/content-parity.md` for the full parity matrix and scoring methodology.
+
+**What it checks:**
+- Page existence across all declared languages
+- Section structure equivalence (H2/H3 count)
+- SEO element parity (title, meta, schema localization)
+- Word count ratio validation (DE should be 25-35% longer than EN, JA 10-25% shorter)
+- Freshness tracking (stale translations detected via timestamps)
+- Cultural marker scanning (foreign brands, wrong legal references, untranslated elements)
+
+**Output:** Parity matrix table with per-page scores and prioritized action items.
+
+## Locale Format Validation
+
+Load `references/locale-formats.md` for number, date, currency, address, and phone format
+reference tables per locale.
+
+**Checks:**
+- Number format consistency (e.g., "1,000.00" should be "1.000,00" on de-DE pages)
+- Date format matches locale expectations
+- Currency symbols and placement correct for target market
+- Phone numbers use international format with correct country code
+
+## Reference Files
+
+Load on-demand as needed (do NOT load all at startup):
+- `references/cultural-profiles.md`: DACH, Francophone, Hispanic, Japanese cultural adaptation profiles
+- `references/locale-formats.md`: Number, date, currency, address, phone format tables per locale
+- `references/content-parity.md`: Content parity audit methodology and scoring
+
## Error Handling
| Scenario | Action |
@@ -197,3 +251,5 @@ Key rules:
| URL unreachable (DNS failure, connection refused) | Report the error clearly. Do not guess site structure. Suggest the user verify the URL and try again. |
| No hreflang tags found | Report the absence. Check for other internationalization signals (subdirectories, subdomains, ccTLDs) and recommend the appropriate hreflang implementation method. |
| Invalid language/region codes detected | List each invalid code with the correct replacement. Provide a corrected hreflang tag set ready to implement. |
+| Cultural profile not available for language | Use the Default Profile checklist from cultural-profiles.md. Note that assessment is based on general guidelines, not a pre-built profile. |
+| Content parity directory empty | Report that no content files were found. Suggest verifying the directory path or providing a URL for live site analysis. |
diff --git a/skills/seo-hreflang/references/content-parity.md b/skills/seo-hreflang/references/content-parity.md
new file mode 100644
index 0000000..e2bea02
--- /dev/null
+++ b/skills/seo-hreflang/references/content-parity.md
@@ -0,0 +1,87 @@
+# Content Parity Audit for Multi-Language Sites
+
+Load this reference when auditing content parity across language versions of a site.
+Content parity ensures all language versions provide equivalent value and SEO signals.
+
+Original concept: Chris Muller (Pro Hub Challenge)
+
+## Content Parity Matrix
+
+For each page that exists in multiple languages, check:
+
+| Dimension | What to Compare | Acceptable Variance | Severity if Failing |
+|-----------|----------------|--------------------|--------------------|
+| Page existence | Does equivalent page exist in all declared languages? | 0% — all declared languages must have the page | High |
+| Section structure | Same number of H2/H3 sections? | ±1 section allowed | Medium |
+| FAQ items | Same number of FAQ questions? | ±2 items allowed | Medium |
+| Images | Same number of images with localized alt text? | Must match exactly | Medium |
+| Charts/SVGs | Charts present in all versions? | Must match exactly | Low |
+| Word count | Proportional to language expansion ratio? | ±30% of expected ratio | Low |
+| Schema markup | JSON-LD present and localized in all versions? | Must match type and key properties | High |
+| Title tag | Localized with target keyword in local language? | Must be localized, not English | High |
+| Meta description | Localized and within character limits? | Must be localized | Medium |
+
+## Freshness Tracking
+
+Detect stale translations by comparing:
+1. **File modification timestamps**: If EN version was updated after DE version, DE may be stale
+2. **Frontmatter dates**: Compare `date_modified` or `lastmod` across language versions
+3. **Content hash comparison**: If the source language content hash changed since last translation
+
+Freshness delta thresholds:
+- **Fresh**: Translated within 7 days of source update → OK
+- **Aging**: 8-30 days since source update → Low priority update
+- **Stale**: 31-90 days since source update → Medium priority update
+- **Outdated**: 90+ days since source update → High priority update
+
+## Word Count Ratio Validation
+
+Expected word count ratios vs English source:
+
+| Target Language | Expected Ratio | Acceptable Range |
+|----------------|---------------|-----------------|
+| German (DE) | 1.25-1.35x | 1.10-1.50x |
+| French (FR) | 1.15-1.25x | 1.00-1.40x |
+| Spanish (ES) | 1.15-1.25x | 1.00-1.40x |
+| Japanese (JA) | 0.75-0.90x | 0.60-1.00x |
+| Chinese (ZH) | 0.70-0.80x | 0.55-0.95x |
+
+A German translation that is shorter than the English original likely has missing content.
+A Japanese translation that is longer than English likely has unnecessary padding.
+
+## Cultural Adaptation Quality Gates
+
+Beyond direct translation, check for cultural markers that indicate proper localization:
+
+| Check | What to Look For | Severity |
+|-------|-----------------|----------|
+| Foreign brand references | US-specific brands on non-US pages (e.g., "Walmart" on de-DE) | Medium |
+| Foreign statistics | US-only data cited on localized pages (e.g., "80% of Americans") | Medium |
+| CTA aggressiveness | Aggressive CTAs on formal-culture pages (e.g., "BUY NOW!" on ja-JP) | Low |
+| Legal references | Wrong jurisdiction laws cited (e.g., CCPA on de-DE instead of DSGVO) | High |
+| Currency/unit mismatch | USD prices on EUR pages, imperial units on metric pages | High |
+| Untranslated elements | English text remaining in navigation, buttons, alt text, schema | Medium |
+
+## Parity Score Calculation
+
+Score out of 100:
+- Page existence parity: 30 points
+- SEO element parity (title, meta, schema): 30 points
+- Content structure parity (sections, images, FAQ): 25 points
+- Freshness parity: 15 points
+
+Interpretation:
+- 90-100: Excellent parity across all language versions
+- 70-89: Good parity with minor gaps to address
+- 50-69: Significant parity issues affecting some language versions
+- Below 50: Major parity failures requiring immediate attention
+
+## Output Format
+
+Present as a matrix table:
+```
+| Page | EN | DE | FR | ES | JA | Parity Score |
+|------|----|----|----|----|----| -------------|
+| /about | ✅ | ✅ | ✅ | ❌ | ✅ | 80/100 |
+| /pricing | ✅ | ✅ | ⚠️ | ❌ | ❌ | 45/100 |
+```
diff --git a/skills/seo-hreflang/references/cultural-profiles.md b/skills/seo-hreflang/references/cultural-profiles.md
new file mode 100644
index 0000000..361e480
--- /dev/null
+++ b/skills/seo-hreflang/references/cultural-profiles.md
@@ -0,0 +1,91 @@
+# Cultural Adaptation Profiles for International SEO
+
+Load this reference when analyzing multi-language sites or generating hreflang
+implementations. Profiles guide cultural assessment beyond technical validation.
+
+Original concept: Chris Muller (Pro Hub Challenge)
+
+## DACH Region (DE, AT, CH)
+
+| Dimension | Guideline |
+|-----------|-----------|
+| Formality | High. Use "Sie" (formal you). Professional tone expected. |
+| Humor | Conservative. Avoid sarcasm and wordplay in CTAs. |
+| CTA Style | Indirect preferred. "Jetzt entdecken" over "Jetzt kaufen". |
+| Trust Signals | Certifications (TUV, ISO), "Datenschutz" (privacy), Impressum required by law. |
+| Legal | Impressum page mandatory. DSGVO (GDPR). Widerrufsrecht (right of withdrawal). |
+| Number Format | 1.000,00 (dot for thousands, comma for decimal) |
+| Date Format | DD.MM.YYYY |
+| Currency | EUR (DE/AT), CHF (CH) |
+| Color Symbolism | Blue = trust, Green = eco/nature, Red = caution (not urgency) |
+| Brand Substitution | Walmart → MediaMarkt, Home Depot → Hornbach, Amazon → Otto/Zalando |
+| Word Expansion | +25-35% vs English (plan for longer headlines and button text) |
+
+## Francophone (FR, BE, CA-FR, CH-FR)
+
+| Dimension | Guideline |
+|-----------|-----------|
+| Formality | Medium-high. "Vous" default. "Tu" only for youth/casual brands. |
+| Humor | Appreciated when sophisticated. Avoid blunt/direct humor. |
+| CTA Style | Elegant phrasing. "Decouvrir nos solutions" over "Achetez maintenant". |
+| Trust Signals | "Fabrique en France" (made in France), professional certifications, press mentions. |
+| Legal | Mentions legales required. CNIL (data protection). CGV (terms). |
+| Number Format | 1 000,00 (space for thousands, comma for decimal) |
+| Date Format | DD/MM/YYYY |
+| Currency | EUR (FR/BE), CAD (CA-FR), CHF (CH-FR) |
+| Color Symbolism | Blue = stability, White = purity/luxury, Red = passion |
+| Brand Substitution | Walmart → Carrefour, Amazon → Fnac/Cdiscount, Target → Leclerc |
+| Word Expansion | +15-25% vs English |
+
+## Hispanic (ES, LATAM)
+
+| Dimension | Guideline |
+|-----------|-----------|
+| Formality | Varies by country. Spain: "Usted" formal. LATAM: mixed. |
+| Humor | Warm and relational. Self-deprecating humor accepted. |
+| CTA Style | Warm, personal. "Empieza tu viaje" over "Comprar ahora". |
+| Trust Signals | Community proof, family/relationship themes, celebrity endorsements popular. |
+| Legal | LOPD (Spain data protection). Each LATAM country has own regulations. |
+| Number Format | Spain: 1.000,00 / LATAM: varies by country |
+| Date Format | DD/MM/YYYY (most), DD-MM-YYYY (some LATAM) |
+| Currency | EUR (ES), regional currencies (MXN, ARS, COP, CLP, PEN) |
+| Color Symbolism | Red = energy/passion, Yellow = warmth, Blue = trust |
+| Brand Substitution | Walmart → Mercadona (ES) / Coppel (MX), Amazon → MercadoLibre |
+| Word Expansion | +15-25% vs English |
+
+## Japanese (JA)
+
+| Dimension | Guideline |
+|-----------|-----------|
+| Formality | Very high. Keigo (honorific language) expected in business. |
+| Humor | Subtle. Avoid direct humor in B2B. Kawaii (cute) elements acceptable in B2C. |
+| CTA Style | Subtle and polite. "Otoiawase" (inquire) over direct "buy now". |
+| Trust Signals | Company longevity, ISO certifications, endorsements from recognized institutions. |
+| Legal | APPI (Act on Protection of Personal Information). Tokutei Shotorihiki law. |
+| Number Format | 1,000 (comma for thousands, no decimal in most contexts) |
+| Date Format | YYYY/MM/DD or YYYY年MM月DD日 |
+| Currency | JPY (no decimals) |
+| Color Symbolism | White = purity, Red = vitality/celebration, Black = formality |
+| Brand Substitution | Amazon → Rakuten, Google Shopping → Yahoo! Shopping Japan |
+| Word Contraction | -10-25% vs English (Japanese is more compact) |
+
+## Default Profile (Unlisted Languages)
+
+When analyzing a locale without a pre-built profile above:
+
+1. **Research formality norms**: Check if the language has formal/informal registers (e.g., Korean has 7 speech levels)
+2. **Check text direction**: LTR vs RTL (Arabic, Hebrew, Farsi, Urdu)
+3. **Verify number/date formats**: Use CLDR (Unicode Common Locale Data Repository)
+4. **Research legal requirements**: Privacy law, business registration, consumer protection
+5. **Check word expansion ratio**: Germanic/Slavic languages expand, CJK languages contract
+6. **Verify currency and payment preferences**: Local payment methods may need mention
+7. **Research color meanings**: Colors have different cultural associations globally
+
+## How to Use in Analysis
+
+When running `/seo hreflang` on a multi-language site:
+1. Identify all language versions and their target markets
+2. Load the relevant cultural profile(s)
+3. Check that CTAs, trust signals, and legal pages match the cultural expectations
+4. Flag mismatches as "Cultural Adaptation" findings (Medium severity)
+5. Check number/date/currency formatting consistency within each locale version
diff --git a/skills/seo-hreflang/references/locale-formats.md b/skills/seo-hreflang/references/locale-formats.md
new file mode 100644
index 0000000..6bfb511
--- /dev/null
+++ b/skills/seo-hreflang/references/locale-formats.md
@@ -0,0 +1,100 @@
+# Locale Format Reference for International SEO
+
+Load this reference when validating content parity or generating localized content.
+Mismatched formats (e.g., US date format on a German page) signal poor localization
+and reduce user trust.
+
+Original concept: Chris Muller (Pro Hub Challenge)
+
+## Number Formats
+
+| Locale | Thousands | Decimal | Example |
+|--------|-----------|---------|---------|
+| en-US | , | . | 1,234.56 |
+| en-GB | , | . | 1,234.56 |
+| de-DE | . | , | 1.234,56 |
+| de-AT | . | , | 1.234,56 |
+| de-CH | ' | . | 1'234.56 |
+| fr-FR | (space) | , | 1 234,56 |
+| fr-CA | (space) | , | 1 234,56 |
+| es-ES | . | , | 1.234,56 |
+| es-MX | , | . | 1,234.56 |
+| ja-JP | , | . | 1,234 |
+| pt-BR | . | , | 1.234,56 |
+| it-IT | . | , | 1.234,56 |
+| nl-NL | . | , | 1.234,56 |
+| ko-KR | , | . | 1,234 |
+| zh-CN | , | . | 1,234.56 |
+
+## Date Formats
+
+| Locale | Format | Example |
+|--------|--------|---------|
+| en-US | MM/DD/YYYY | 04/14/2026 |
+| en-GB | DD/MM/YYYY | 14/04/2026 |
+| de-DE | DD.MM.YYYY | 14.04.2026 |
+| fr-FR | DD/MM/YYYY | 14/04/2026 |
+| es-ES | DD/MM/YYYY | 14/04/2026 |
+| ja-JP | YYYY/MM/DD or YYYY年MM月DD日 | 2026/04/14 |
+| pt-BR | DD/MM/YYYY | 14/04/2026 |
+| ko-KR | YYYY.MM.DD | 2026.04.14 |
+| zh-CN | YYYY年MM月DD日 | 2026年04月14日 |
+
+## Currency Formats
+
+| Locale | Symbol | Placement | Example |
+|--------|--------|-----------|---------|
+| en-US | $ | Before | $1,234.56 |
+| en-GB | £ | Before | £1,234.56 |
+| de-DE | € | After (space) | 1.234,56 € |
+| fr-FR | € | After (space) | 1 234,56 € |
+| es-ES | € | After (space) | 1.234,56 € |
+| ja-JP | ¥ | Before | ¥1,234 |
+| pt-BR | R$ | Before | R$ 1.234,56 |
+| ko-KR | ₩ | Before | ₩1,234 |
+| zh-CN | ¥ | Before | ¥1,234.56 |
+| de-CH | CHF | Before | CHF 1'234.56 |
+
+## Address Formats
+
+| Region | Order | Example |
+|--------|-------|---------|
+| US/CA | Street, City, State ZIP | 123 Main St, Austin, TX 78701 |
+| UK | Street, City, Postcode | 10 Downing St, London, SW1A 2AA |
+| DE/AT | Street Nr, PLZ City | Hauptstr. 1, 10115 Berlin |
+| FR | Street, Code Postal City | 1 Rue de Rivoli, 75001 Paris |
+| JP | Postal City District Street | 〒100-0001 東京都千代田区千代田1-1 |
+
+## Phone Formats
+
+| Region | Format | Example |
+|--------|--------|---------|
+| US | +1 (XXX) XXX-XXXX | +1 (512) 555-0123 |
+| UK | +44 XXXX XXXXXX | +44 2071 234567 |
+| DE | +49 XXX XXXXXXX | +49 30 12345678 |
+| FR | +33 X XX XX XX XX | +33 1 23 45 67 89 |
+| JP | +81 X-XXXX-XXXX | +81 3-1234-5678 |
+
+## Text Expansion Ratios (vs English)
+
+| Language | Expansion | Impact |
+|----------|-----------|--------|
+| German | +25-35% | Longer headlines, buttons, navigation labels |
+| French | +15-25% | Moderate expansion |
+| Spanish | +15-25% | Moderate expansion |
+| Italian | +15-25% | Moderate expansion |
+| Portuguese | +15-25% | Moderate expansion |
+| Dutch | +10-20% | Slight expansion |
+| Japanese | -10-25% | Contraction (more compact) |
+| Korean | -10-20% | Contraction |
+| Chinese | -20-30% | Significant contraction |
+
+## Validation Rules
+
+When checking locale format consistency:
+1. Scan for number patterns on the page (prices, statistics, measurements)
+2. Compare against the expected format for the page's declared language
+3. Flag US-format numbers on non-US pages (e.g., "$1,234.56" on a de-DE page)
+4. Check date formats in blog posts, copyright notices, update timestamps
+5. Verify currency symbols match the target market
+6. Check that phone numbers use international format with correct country code
diff --git a/skills/seo-image-gen/SKILL.md b/skills/seo-image-gen/SKILL.md
index 11ffc0b..7fe727b 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-images/SKILL.md b/skills/seo-images/SKILL.md
index d9b54f9..964c686 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-local/SKILL.md b/skills/seo-local/SKILL.md
index 5ca0040..aad3201 100644
--- a/skills/seo-local/SKILL.md
+++ b/skills/seo-local/SKILL.md
@@ -15,7 +15,7 @@ argument-hint: "[url]"
license: MIT
metadata:
author: AgriciDaniel
- version: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-maps/SKILL.md b/skills/seo-maps/SKILL.md
index d26d1c2..05b3f49 100644
--- a/skills/seo-maps/SKILL.md
+++ b/skills/seo-maps/SKILL.md
@@ -16,7 +16,7 @@ license: MIT
compatibility: "DataForSEO MCP for Tier 1+, Google Maps API for Tier 2"
metadata:
author: AgriciDaniel
- version: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-page/SKILL.md b/skills/seo-page/SKILL.md
index f92ab2a..711ae6e 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-plan/SKILL.md b/skills/seo-plan/SKILL.md
index 38a4ac4..fc0c4df 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-programmatic/SKILL.md b/skills/seo-programmatic/SKILL.md
index bc470a3..1d929f1 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-schema/SKILL.md b/skills/seo-schema/SKILL.md
index 294afb4..a15b371 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-sitemap/SKILL.md b/skills/seo-sitemap/SKILL.md
index 36dace3..667420c 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo-sxo/SKILL.md b/skills/seo-sxo/SKILL.md
new file mode 100644
index 0000000..c2c6ae3
--- /dev/null
+++ b/skills/seo-sxo/SKILL.md
@@ -0,0 +1,254 @@
+---
+name: seo-sxo
+description: >
+ Search Experience Optimization: reads Google SERPs backwards to detect page-type
+ mismatches, derives user stories from search intent signals, and scores pages
+ from multiple persona perspectives. Identifies why well-optimized pages fail
+ to rank by analyzing what Google rewards for each keyword. Use when user says
+ "SXO", "search experience", "page type mismatch", "SERP analysis", "user story",
+ "persona scoring", "why isn't my page ranking", "intent mismatch", or "wireframe".
+user-invokable: true
+argument-hint: "<url> [keyword]"
+license: MIT
+metadata:
+ author: AgriciDaniel
+ original_author: "Florian Schmitz (Pro Hub Challenge)"
+ version: "1.9.0"
+ category: seo
+---
+
+# Search Experience Optimization (SXO)
+
+SXO bridges the gap between SEO (what Google rewards) and UX (what users need).
+Traditional SEO audits check technical health. SXO asks: "Does this page deserve
+to rank for this keyword based on what Google is actually rewarding in the SERP?"
+
+## Core Insight
+
+A page can score 95/100 on technical SEO and still fail to rank because it is the
+**wrong page type** for the keyword. If Google shows 8 product pages and 2 comparison
+pages for your keyword, your blog post will never break through -- no matter how
+well-optimized it is.
+
+## Commands
+
+| Command | Purpose |
+|---------|---------|
+| `/seo sxo <url>` | Full SXO analysis (auto-detect keyword from page) |
+| `/seo sxo <url> <keyword>` | Full SXO analysis for a specific keyword |
+| `/seo sxo wireframe <url>` | Generate IST/SOLL wireframe with concrete placeholders |
+| `/seo sxo personas <url>` | Persona-only scoring (skip SERP analysis) |
+
+## Execution Pipeline
+
+### Step 1: Target Acquisition
+
+1. Fetch the target URL via `scripts/fetch_page.py` (SSRF-safe)
+2. Parse with `scripts/parse_html.py` 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
+
+### Step 2: SERP Backwards Analysis
+
+Read `references/page-type-taxonomy.md` for classification rules.
+
+1. Search Google for the target keyword (WebSearch)
+2. For each of the top 10 organic results, record:
+ - URL and domain authority tier (brand / niche authority / unknown)
+ - Page type (classify using taxonomy)
+ - Content format (long-form, listicle, how-to, comparison, tool, video)
+ - Word count estimate (from snippet length and page structure)
+ - Schema types present (from SERP features: ratings, FAQ, HowTo)
+ - Media signals (video carousel, image pack, thumbnail presence)
+3. Record SERP features present:
+ - Featured snippet (paragraph / list / table / video)
+ - People Also Ask (extract all visible questions)
+ - Ads (top and bottom -- count and analyze ad copy themes)
+ - Related searches (extract all)
+ - Knowledge panel / local pack / shopping results
+ - AI Overview presence and source types
+4. Calculate SERP consensus:
+ - Dominant page type (>60% = strong consensus, 40-60% = mixed, <40% = fragmented)
+ - Content depth expectations (average word count tier)
+ - Schema expectation (most common structured data types)
+ - Media expectations (video required? images critical?)
+
+### Step 3: Page-Type Mismatch Detection
+
+This is the core SXO insight. Compare target page type against SERP consensus.
+
+**Mismatch severity levels:**
+
+| Target Type | SERP Expects | Severity | Recommendation |
+|-------------|-------------|----------|----------------|
+| Blog Post | Product Pages | CRITICAL | Create dedicated product page |
+| Blog Post | Comparison | HIGH | Restructure as comparison with matrix |
+| Product | Informational | HIGH | Add educational content layer |
+| Landing Page | Tool/Calculator | HIGH | Build interactive tool component |
+| Service Page | Local Results | MEDIUM | Add location signals + local schema |
+| Any type match | - | ALIGNED | Focus on content depth and UX |
+
+**Classification rules:**
+- Classify target page using `references/page-type-taxonomy.md`
+- Classify each SERP result using the same taxonomy
+- Flag mismatch if target type differs from SERP dominant type
+- If SERP is fragmented (no dominant type), note opportunity for differentiation
+
+### Step 4: User Story Derivation
+
+Read `references/user-story-framework.md` for the full framework.
+
+From SERP signals, derive user stories:
+
+1. **PAA questions** reveal knowledge gaps and concerns
+2. **Ad copy themes** reveal commercial triggers and value propositions
+3. **Related searches** reveal the search journey (what comes before/after)
+4. **Featured snippet format** reveals the expected answer structure
+5. **AI Overview** reveals what Google considers the definitive answer
+
+For each signal cluster, generate a user story:
+```
+As a [persona derived from signal],
+I want to [goal derived from query intent],
+because [emotional driver from ad copy / PAA tone],
+but I'm blocked by [barrier derived from PAA questions / related searches].
+```
+
+Generate 3-5 user stories covering the primary intent angles.
+
+### Step 5: Gap Analysis
+
+Compare the target page against SERP expectations across 7 dimensions:
+
+| Dimension | What to Compare | Score |
+|-----------|----------------|-------|
+| Page Type | Target type vs SERP dominant type | 0-15 |
+| Content Depth | Word count, heading depth, topic coverage | 0-15 |
+| UX Signals | CTA clarity, above-fold content, mobile layout | 0-15 |
+| Schema Markup | Present vs expected structured data types | 0-15 |
+| Media Richness | Images, video, interactive elements vs SERP norm | 0-15 |
+| Authority Signals | E-E-A-T markers, social proof, credentials | 0-15 |
+| Freshness | Last updated, date signals, content recency | 0-10 |
+
+**Total: 0-100 SXO Gap Score** (lower = larger gap, higher = better alignment)
+
+### Step 6: Persona-Based Scoring
+
+Read `references/persona-scoring.md` for methodology.
+
+1. Derive 4-7 personas from SERP intent signals:
+ - Cluster PAA questions by theme
+ - Segment ad copy by target audience
+ - Map related searches to journey stages
+2. For each persona, score the target page on 4 dimensions (25 pts each):
+ - **Relevance**: Does the page address this persona's need?
+ - **Clarity**: Can this persona find their answer within 10 seconds?
+ - **Trust**: Are there adequate trust signals for this persona?
+ - **Action**: Is there a clear next step for this persona?
+3. Output persona cards with scores and specific improvement recommendations
+4. Sort recommendations by weakest persona first (biggest opportunity)
+
+### Step 7: Wireframe Generation (Optional)
+
+Only execute when `/seo sxo wireframe` is invoked.
+
+Read `references/wireframe-templates.md` for templates.
+
+1. Generate IST (current state) wireframe from parsed page structure
+2. Generate SOLL (target state) wireframe based on:
+ - SERP consensus page type
+ - Gap analysis findings
+ - Persona scoring weaknesses
+3. Use ultra-concrete placeholders:
+ - NOT: "Add a CTA here"
+ - YES: "Add pricing CTA with annual savings badge below hero, linking to /pricing#enterprise"
+4. Output as semantic HTML section outline with annotations
+
+## DataForSEO Integration
+
+If DataForSEO MCP tools are available:
+
+1. **Before any API call**, run cost estimate and confirm with user
+2. Use `google_organic_serp` for precise SERP data (positions, features, snippets)
+3. Use `keyword_data` for search volume and competition metrics
+4. Fall back to WebSearch if DataForSEO unavailable -- note reduced precision in output
+
+## SXO Score vs SEO Health Score
+
+The SXO score is **separate** from the main SEO Health Score.
+
+- SEO Health Score = technical compliance (crawlability, speed, schema, etc.)
+- SXO Gap Score = alignment between page and SERP expectations
+- A page can score 95 SEO + 30 SXO = technically perfect but strategically misaligned
+- Both scores should be reported together when both are available
+
+## Cross-Skill References
+
+| Finding | Hand Off To |
+|---------|-------------|
+| E-E-A-T gaps in persona scoring | `/seo content` for deep E-E-A-T audit |
+| Missing schema types | `/seo schema` for generation |
+| Local intent detected in SERP | `/seo local` for GBP analysis |
+| Content depth gaps | `/seo page` for deep page analysis |
+| Technical issues found during fetch | `/seo technical` for full audit |
+| Image/media gaps | `/seo images` for optimization |
+
+## Output Format
+
+### Full SXO Analysis
+
+```
+## SXO Analysis: [URL]
+### Target Keyword: [keyword]
+
+### 1. SERP Landscape
+- Dominant page type: [type] ([confidence]% consensus)
+- SERP features: [list]
+- Content depth norm: [word count range]
+- Schema expectation: [types]
+
+### 2. Page-Type Alignment
+- Your page type: [type]
+- SERP expects: [type]
+- Verdict: [ALIGNED | MISMATCH (severity)]
+- Impact: [explanation]
+
+### 3. User Stories (derived from SERP signals)
+[3-5 user stories with source signals]
+
+### 4. Gap Analysis (SXO Score: XX/100)
+[7-dimension breakdown table]
+
+### 5. Persona Scores
+[4-7 persona cards with 4-dimension scores]
+
+### 6. Priority Actions
+[Ranked list: fix mismatch first, then weakest persona gaps]
+
+### 7. Limitations
+[What could not be assessed, data source notes]
+```
+
+## Error Handling
+
+| Error | Action |
+|-------|--------|
+| URL fetch fails | Report error, suggest checking URL accessibility |
+| No keyword provided or detected | Ask user to provide target keyword |
+| WebSearch returns <5 results | Proceed with available data, note limited sample |
+| SERP has no organic results (all ads) | Note highly commercial SERP, analyze ad copy only |
+| Target page is JavaScript-rendered | Note limitation, use available HTML content |
+| DataForSEO cost exceeds threshold | Fall back to WebSearch, notify user |
+
+## Quality Checklist
+
+Before delivering results, verify:
+- [ ] Target URL was fetched via `scripts/fetch_page.py` (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
+- [ ] Persona scores include concrete improvement suggestions
+- [ ] SXO score is clearly labeled as separate from SEO Health Score
+- [ ] Limitations section is present and honest
+- [ ] Cross-skill recommendations are included where relevant
diff --git a/skills/seo-sxo/references/page-type-taxonomy.md b/skills/seo-sxo/references/page-type-taxonomy.md
new file mode 100644
index 0000000..996b2f6
--- /dev/null
+++ b/skills/seo-sxo/references/page-type-taxonomy.md
@@ -0,0 +1,187 @@
+# Page Type Taxonomy for SERP Classification
+
+Classify every page -- both the target URL and each SERP result -- into exactly one
+of these 8 types. When signals overlap, choose the type with the strongest primary
+signal match.
+
+---
+
+## 1. Landing Page
+
+**Primary signals:** hero section with single value proposition, prominent CTA
+(sign up / get started / book demo), pricing section or pricing link, testimonials
+or social proof badges, minimal navigation (reduced header links).
+
+**SERP indicators (top 10):** branded queries, high ad density at top, sitelinks
+pointing to /pricing or /features, title tags with "| Product Name".
+
+**Content structure:** Hero > Social proof > Features (3-5) > How it works > Pricing > CTA repeat > FAQ.
+
+**Required elements:** Primary CTA above fold, trust badges, at least one testimonial,
+WebSite or SoftwareApplication schema.
+
+**Common mismatches:**
+- Blog Post targeting landing-page keywords (severity: CRITICAL)
+- Service Page missing CTA focus (severity: HIGH)
+
+---
+
+## 2. Blog Post
+
+**Primary signals:** author byline, publish date, article body > 800 words,
+comment section or social share buttons, breadcrumb with /blog/ segment,
+related posts section.
+
+**SERP indicators (top 10):** featured snippets (paragraph or list), PAA boxes
+with 4+ questions, diverse domains in results, dates visible in snippets,
+low ad density.
+
+**Content structure:** Title > Author + Date > Introduction > H2 sections > Images/Examples > Conclusion > Author bio.
+
+**Required elements:** Article or BlogPosting schema, author entity, datePublished,
+dateModified, at least 1 image with descriptive alt text.
+
+**Common mismatches:**
+- Product Page targeting informational keyword (severity: HIGH)
+- Landing Page targeting how-to keyword (severity: CRITICAL)
+
+---
+
+## 3. Product Page
+
+**Primary signals:** price displayed, add-to-cart or buy button, product images
+(multiple angles), specifications/features list, customer reviews with star ratings,
+SKU or product identifiers.
+
+**SERP indicators (top 10):** shopping results / product carousel, rich snippets
+with price + availability + ratings, merchant names in titles, "buy" or "shop"
+in title tags.
+
+**Content structure:** Product title > Images > Price + CTA > Description > Specs > Reviews > Related products.
+
+**Required elements:** Product schema (name, price, availability, review),
+high-quality images, clear pricing, purchase CTA.
+
+**Common mismatches:**
+- Blog Post targeting product keyword (severity: CRITICAL)
+- Comparison Page when user wants to buy (severity: MEDIUM)
+
+---
+
+## 4. Hybrid (Service + Content)
+
+**Primary signals:** educational content sections mixed with CTAs, feature
+explanations with "learn more" and "get started" side by side, common in SaaS,
+both /blog/ and /product/ internal links in navigation.
+
+**SERP indicators (top 10):** mix of branded and informational results,
+some results with FAQ schema + others with SoftwareApplication schema,
+moderate ad density.
+
+**Content structure:** Problem statement > Solution overview > How it works > Feature deep-dives > Social proof > CTA > FAQ.
+
+**Required elements:** FAQPage or HowTo schema combined with product schema,
+both educational and commercial CTAs, clear value proposition.
+
+**Common mismatches:**
+- Pure Blog Post missing product integration (severity: HIGH)
+- Pure Landing Page missing educational depth (severity: MEDIUM)
+
+---
+
+## 5. Service Page
+
+**Primary signals:** service descriptions with methodology/process, case studies
+or portfolio, "our process" or "how we work" sections, team credentials,
+contact form or consultation CTA, industry-specific terminology.
+
+**SERP indicators (top 10):** local pack presence, "near me" related searches,
+results from agency/firm domains, title tags with "[Service] | [Company]",
+moderate PAA questions about process/cost.
+
+**Content structure:** Service overview > Benefits > Process/Methodology > Case studies > Team > Pricing/Packages > Contact CTA.
+
+**Required elements:** Service or ProfessionalService schema, clear process
+description, at least one case study or testimonial, contact mechanism.
+
+**Common mismatches:**
+- Blog Post targeting service keyword (severity: HIGH)
+- Product Page for custom/consultative services (severity: MEDIUM)
+
+---
+
+## 6. Comparison Page
+
+**Primary signals:** "vs" or "versus" in title/URL, feature comparison matrix
+or table, pros/cons lists, side-by-side layout, "best [X] for [use case]"
+framing, multiple products reviewed.
+
+**SERP indicators (top 10):** "vs" queries in related searches, multiple PAA
+about alternatives, results from review sites (G2, Capterra, TrustRadius),
+listicle-style titles ("10 Best..."), affiliate disclosures.
+
+**Content structure:** Introduction > Comparison criteria > Feature matrix > Individual reviews > Verdict/Recommendation > FAQ.
+
+**Required elements:** Comparison table with clear criteria, pros/cons for each
+option, clear recommendation or "best for" segmentation, ItemList or Table schema.
+
+**Common mismatches:**
+- Single Product Page when user wants comparison (severity: HIGH)
+- Blog Post without structured comparison (severity: HIGH)
+
+---
+
+## 7. Local Page
+
+**Primary signals:** physical address displayed, Google Maps embed, NAP
+(Name, Address, Phone) in consistent format, service area description,
+directions or "visit us" section, location-specific content.
+
+**SERP indicators (top 10):** local pack (map + 3 listings), "near me" in
+related searches, Google Business Profile cards, location in title tags,
+results from local directories (Yelp, BBB).
+
+**Content structure:** Business name + location > Services at this location > Map + directions > Hours > Reviews > Local content > Contact.
+
+**Required elements:** LocalBusiness schema (correct subtype), full NAP,
+geo coordinates, openingHoursSpecification, embedded map.
+
+**Common mismatches:**
+- Generic Service Page missing local signals (severity: HIGH)
+- Blog Post targeting "[service] in [city]" (severity: CRITICAL)
+
+---
+
+## 8. Tool / Interactive
+
+**Primary signals:** input fields, calculator or generator interface, interactive
+elements (sliders, dropdowns, toggles), results output area, utility-first
+design with minimal marketing copy, "free [tool name]" in title.
+
+**SERP indicators (top 10):** tool/calculator results in SERP, "calculator"
+or "generator" or "checker" in related searches, results from tool-first sites,
+minimal PAA (users want to DO, not READ).
+
+**Content structure:** Tool interface (above fold) > Brief instructions > Tool output > Supporting content below > FAQ > Related tools.
+
+**Required elements:** WebApplication or SoftwareApplication schema, functional
+tool above fold, clear input/output flow, no login wall for basic functionality.
+
+**Common mismatches:**
+- Blog Post about topic where users want a tool (severity: CRITICAL)
+- Landing Page without interactive element (severity: HIGH)
+
+---
+
+## Classification Priority
+
+When a page shows signals for multiple types, use this priority:
+
+1. If interactive tool is present and functional: **Tool**
+2. If physical address + map: **Local** (unless tool is primary)
+3. If comparison table + "vs" framing: **Comparison**
+4. If price + buy button: **Product**
+5. If CTA-heavy + minimal navigation: **Landing Page**
+6. If service process + case studies: **Service Page**
+7. If educational + CTA mix: **Hybrid**
+8. Default: **Blog Post**
diff --git a/skills/seo-sxo/references/persona-scoring.md b/skills/seo-sxo/references/persona-scoring.md
new file mode 100644
index 0000000..90f352e
--- /dev/null
+++ b/skills/seo-sxo/references/persona-scoring.md
@@ -0,0 +1,170 @@
+# Persona-Based Scoring Methodology
+
+Score the target page from the perspective of each derived persona. This reveals
+which audience segments the page serves well and which it fails.
+
+---
+
+## Persona Derivation
+
+Derive 4-7 personas from SERP intent signals. Do not invent personas without
+evidence -- every persona must trace back to a signal cluster.
+
+### Sources for Persona Derivation
+
+| Source | What It Reveals | Example Persona |
+|--------|----------------|-----------------|
+| PAA question cluster | Knowledge gaps by audience | Beginner, Technical Evaluator |
+| Ad copy segments | Commercial audience targets | Budget Buyer, Enterprise Buyer |
+| Related search themes | Journey stage groups | Researcher, Comparison Shopper |
+| SERP result types | Content consumption preferences | Visual Learner, Data-Driven Analyst |
+| Featured snippet format | Expected answer style | Quick-Answer Seeker |
+
+### Persona Card Format
+
+For each persona, document:
+
+```
+**[Persona Name]** -- [one-line description]
+- Role: [job title or situation]
+- Goal: [what they want to accomplish]
+- Emotional state: [from user-story-framework.md]
+- Journey stage: Awareness | Consideration | Decision
+- Key questions: [2-3 questions this persona needs answered]
+- SERP evidence: [specific signals that generated this persona]
+```
+
+---
+
+## 4-Dimension Scoring Rubric
+
+Score each persona on 4 dimensions. Maximum 25 points each, 100 total per persona.
+
+### Dimension 1: Relevance (0-25)
+
+Does the page address this persona's specific need?
+
+| Score | Criteria |
+|-------|----------|
+| 21-25 | Page directly addresses the persona's primary goal with specific content |
+| 16-20 | Page covers the topic but lacks persona-specific depth or framing |
+| 11-15 | Page is tangentially relevant -- persona must extrapolate to find value |
+| 6-10 | Page mentions the topic but serves a different audience |
+| 0-5 | Page is irrelevant to this persona's need |
+
+**Scoring signals:** keyword alignment with persona goal, presence of persona-relevant
+sections (e.g., "for small businesses" section for SMB persona), depth of coverage
+for persona-specific use cases.
+
+### Dimension 2: Clarity (0-25)
+
+Can this persona find their answer within 10 seconds?
+
+| Score | Criteria |
+|-------|----------|
+| 21-25 | Answer is visible above fold or within first scroll for this persona |
+| 16-20 | Answer is on the page but requires scrolling or navigation |
+| 11-15 | Answer exists but is buried in dense text or unclear structure |
+| 6-10 | Persona must piece together the answer from multiple sections |
+| 0-5 | Answer is not clearly present -- persona would bounce |
+
+**Scoring signals:** heading clarity for persona's question, scan-ability (bullets,
+tables, bold key terms), table of contents or jump links, information hierarchy
+matching persona priority.
+
+### Dimension 3: Trust (0-25)
+
+Does the page provide adequate trust signals for this persona?
+
+| Score | Criteria |
+|-------|----------|
+| 21-25 | Multiple trust signals directly relevant to this persona's concerns |
+| 16-20 | General trust signals present but not persona-specific |
+| 11-15 | Some trust signals but gaps in what this persona needs |
+| 6-10 | Minimal trust signals -- persona would feel uncertain |
+| 0-5 | No trust signals or signals that actively undermine trust for this persona |
+
+**Scoring signals:** testimonials from similar users/companies, relevant credentials
+or certifications, security badges (for risk-averse personas), case studies matching
+persona's industry or size, author expertise signals.
+
+### Dimension 4: Action (0-25)
+
+Is there a clear next step for this persona?
+
+| Score | Criteria |
+|-------|----------|
+| 21-25 | Clear, persona-appropriate CTA with low friction |
+| 16-20 | CTA exists but is generic (not tailored to persona's stage) |
+| 11-15 | Next step is available but not prominent or requires searching |
+| 6-10 | Only one CTA that doesn't match persona's journey stage |
+| 0-5 | No clear next step -- persona reaches a dead end |
+
+**Scoring signals:** CTA relevance to journey stage (awareness = "learn more",
+decision = "buy now"), friction level (free trial vs sales call), CTA placement
+relative to persona-relevant content, alternative paths for different readiness levels.
+
+---
+
+## Score Interpretation
+
+| Range | Rating | Implication |
+|-------|--------|-------------|
+| 80-100 | Excellent | Page serves this persona well -- minor optimizations only |
+| 60-79 | Good | Page is relevant but has notable gaps for this persona |
+| 40-59 | Needs Work | Page partially serves this persona -- significant improvements needed |
+| 0-39 | Critical Mismatch | Page fails this persona -- major restructuring or new page needed |
+
+---
+
+## Aggregation and Prioritization
+
+### Weighted Average
+
+Not all personas are equally important. Weight by estimated search volume share:
+
+- If SERP shows 70% informational intent, weight informational personas higher
+- If ads dominate, weight commercial personas higher
+- If local pack present, weight local personas higher
+
+### Priority Ranking
+
+Sort improvement recommendations by:
+
+1. **Weakest persona with highest search volume weight** = biggest opportunity
+2. **Lowest-scoring dimension across all personas** = systemic issue
+3. **Critical mismatch personas** = fundamental page-type problem
+
+### Output Format
+
+```
+## Persona Scores for [URL]
+
+| Persona | Relevance | Clarity | Trust | Action | Total | Rating |
+|---------|-----------|---------|-------|--------|-------|--------|
+| [Name] | XX/25 | XX/25 | XX/25 | XX/25 | XX/100 | [Rating] |
+| ... | ... | ... | ... | ... | ... | ... |
+
+### Weakest Persona: [Name] (XX/100)
+**Top issue:** [specific problem]
+**Recommended fix:** [concrete action with page-level detail]
+
+### Systemic Issues
+- [dimension]: [pattern across all personas]
+
+### Priority Actions
+1. [Action targeting weakest persona]
+2. [Action targeting systemic issue]
+3. [Action targeting next weakest persona]
+```
+
+---
+
+## Validation Rules
+
+- [ ] Every persona traces to specific SERP signals (no invented personas)
+- [ ] Scores include specific evidence from the page (not just numbers)
+- [ ] Recommendations are concrete (section names, CTA text, placement)
+- [ ] At least 4 personas scored, no more than 7
+- [ ] Weakest persona is addressed first in recommendations
+- [ ] Score interpretation uses the standard ranges above
diff --git a/skills/seo-sxo/references/user-story-framework.md b/skills/seo-sxo/references/user-story-framework.md
new file mode 100644
index 0000000..a7c0b63
--- /dev/null
+++ b/skills/seo-sxo/references/user-story-framework.md
@@ -0,0 +1,139 @@
+# User Story Framework: SERP Signals to User Intent
+
+Derive user stories from observable SERP signals. Every story must cite the
+specific signal that generated it -- no guessing.
+
+---
+
+## Signal Sources
+
+### 1. People Also Ask (PAA)
+
+PAA questions reveal **knowledge gaps and concerns** the searcher has.
+
+- Cluster PAA by theme: definitional ("what is"), procedural ("how to"),
+ evaluative ("is X worth it"), comparative ("X vs Y"), risk ("is X safe")
+- Each cluster maps to a distinct persona or journey stage
+- Definitional PAA = awareness stage, evaluative PAA = consideration,
+ comparative PAA = decision stage
+
+### 2. Ad Copy
+
+Ads reveal **commercial triggers and objection handling** that convert.
+
+- Extract recurring themes across all visible ads (top + bottom)
+- Common patterns: free trial emphasis (barrier: commitment), trusted-by counts
+ (barrier: trust), price anchoring (barrier: cost), speed claims (barrier: time)
+- If no ads appear, the keyword is likely informational -- commercial intent is low
+
+### 3. Related Searches
+
+Related searches reveal the **search journey** -- what comes before and after.
+
+- Searches with added qualifiers (+ "for beginners", + "pricing") = narrowing
+- Searches with removed qualifiers = broadening / pivoting
+- "[keyword] alternatives" = dissatisfaction signal
+- "[keyword] vs [competitor]" = active comparison stage
+- "[keyword] reviews" = trust-seeking before purchase
+
+### 4. Featured Snippets
+
+The snippet format reveals the **expected answer structure**.
+
+- Paragraph snippet = user wants a concise definition or explanation
+- List snippet = user wants steps or ranked items
+- Table snippet = user wants structured comparison data
+- Video snippet = user wants visual demonstration
+- No snippet = Google uncertain about best format (opportunity)
+
+### 5. AI Overview
+
+AI Overview reveals what Google considers the **authoritative synthesis**.
+
+- Sources cited = authority signals Google trusts for this topic
+- Answer structure = the format Google believes best serves the query
+- If target page is not cited = content does not match Google's synthesis model
+
+---
+
+## User Story Format
+
+```
+As a [persona],
+I want to [goal],
+because [emotional driver],
+but I'm blocked by [barrier].
+```
+
+### Persona Derivation
+
+Derive from signal clusters, not assumptions:
+- PAA cluster about cost/pricing = **Budget-Conscious Buyer**
+- PAA cluster about setup/implementation = **Technical Evaluator**
+- Ads emphasizing trust/security = **Risk-Averse Decision Maker**
+- Related searches with "for small business" = **SMB Owner**
+- Related searches with "enterprise" = **Enterprise Buyer**
+
+### Emotional States
+
+Map SERP signals to emotional states:
+
+| Signal Pattern | Emotional State |
+|---------------|----------------|
+| "Is X safe / legitimate / scam" in PAA | Skeptical |
+| Many comparison queries in related | Overwhelmed by choices |
+| "How to [basic task]" dominating PAA | Confused / frustrated |
+| High ad density + shopping results | Ready to buy |
+| "Best [X] for [use case]" results | Evaluating carefully |
+| "[X] not working / problems" in PAA | Frustrated with current solution |
+
+### Barrier Types
+
+| Barrier | SERP Signal | Page Must Address |
+|---------|------------|-------------------|
+| Information gap | PAA questions unanswered by snippet | Clear, complete answer in first scroll |
+| Trust gap | Ads emphasize trust badges / reviews | Social proof, credentials, guarantees |
+| Comparison fatigue | Many "vs" and "best" related searches | Clear differentiation or recommendation |
+| Price sensitivity | PAA about cost, free alternatives | Transparent pricing, value justification |
+| Technical confusion | "How to" PAA, setup-related queries | Step-by-step guide, demo, or tool |
+| Time pressure | Ads with "instant" / "today" / "fast" | Quick-win content, speed of resolution |
+
+---
+
+## Example Derivation
+
+**Keyword**: "project management software"
+
+**Observed signals:**
+- PAA: "Is Monday.com better than Asana?", "What is the cheapest project management tool?", "Do I need project management software for a small team?"
+- Ads: "Free forever plan", "Trusted by 150,000 teams", "Set up in 5 minutes"
+- Related: "project management software for small business", "free project management tools", "Asana vs Monday vs ClickUp"
+- Featured snippet: list of tools with brief descriptions
+
+**Derived user stories:**
+
+1. As a **small business owner**, I want to find affordable PM software, because
+ I need to organize my growing team, but I'm blocked by **price sensitivity**
+ and fear of paying for features I won't use.
+ *(Source: PAA "cheapest", related "small business", ads "free forever")*
+
+2. As a **team lead evaluating tools**, I want to compare the top 3 options side
+ by side, because my boss asked for a recommendation, but I'm blocked by
+ **comparison fatigue** from too many similar-looking options.
+ *(Source: related "Asana vs Monday vs ClickUp", PAA "is Monday better than Asana")*
+
+3. As a **non-technical manager**, I want software that works immediately without
+ training, because I can't afford downtime during migration, but I'm blocked by
+ **technical confusion** about setup complexity.
+ *(Source: ads "set up in 5 minutes", PAA "do I need PM software for small team")*
+
+---
+
+## Story Quality Checklist
+
+- [ ] Every story cites at least one specific SERP signal
+- [ ] Persona name reflects the signal source, not assumptions
+- [ ] Emotional driver is grounded in observable SERP tone
+- [ ] Barrier is specific enough to suggest a page-level fix
+- [ ] 3-5 stories cover the primary intent angles (no duplicates)
+- [ ] Stories span at least 2 journey stages (awareness, consideration, decision)
diff --git a/skills/seo-sxo/references/wireframe-templates.md b/skills/seo-sxo/references/wireframe-templates.md
new file mode 100644
index 0000000..e416480
--- /dev/null
+++ b/skills/seo-sxo/references/wireframe-templates.md
@@ -0,0 +1,168 @@
+# Wireframe Templates: IST/SOLL Patterns
+
+Generate before (IST) and after (SOLL) wireframes showing what the page currently
+looks like vs what it should look like based on SERP expectations.
+
+## Core Principles
+
+1. **Ultra-concrete placeholders**: Not "add CTA" but "add pricing CTA with annual
+ savings badge below hero, linking to /pricing#enterprise"
+2. **Mobile-first**: Assume 375px viewport first; above-the-fold (~600px) must
+ contain the most critical element for the page type
+3. **Semantic HTML**: Output as section outline with HTML5 elements
+
+## IST Generation
+
+Parse the current page and map to this structure:
+
+```
+IST: [URL]
+├── ABOVE FOLD
+│ ├── [element]: "[actual content]"
+│ └── [element]: "[actual content]"
+├── MAIN CONTENT
+│ ├── [section]: "[summary]" (~XXX words)
+│ └── [section]: "[summary]" (~XXX words)
+├── SUPPORTING
+│ └── [element]: "[description]"
+└── FOOTER — [elements present]
+
+Missing from SERP expectations:
+- [element]: [why it matters]
+```
+
+## SOLL Templates by Page Type
+
+### 1. Landing Page
+
+```
+<header> Nav: logo + 3-4 links max + primary CTA button </header>
+<section class="hero">
+ H1: [value proposition matching target keyword]
+ Subhead: [supporting benefit] | CTA: [primary action]
+ Trust line: "Trusted by [X] companies including [logos]"
+</section>
+<section class="social-proof"> 3-5 logo badges + key metric </section>
+<section class="features"> 3 blocks: icon + H3 + 2-line desc (address PAA) </section>
+<section class="how-it-works"> 3-step process with numbered icons </section>
+<section class="testimonial"> Quote + photo + name + title + company </section>
+<section class="pricing"> 2-3 tiers, recommended highlighted, annual toggle </section>
+<section class="faq"> 5-7 PAA questions, FAQPage schema </section>
+<section class="final-cta"> Repeat hero CTA with urgency </section>
+```
+
+### 2. Blog Post
+
+```
+<article>
+ <header> H1 | Author + photo + credentials | Date + Updated | Reading time </header>
+ <nav class="toc"> Jump links to H2 sections </nav>
+ <section class="intro"> Hook + thesis + TL;DR box (above fold) </section>
+ <section> H2: [cluster 1] — address PAA #1 </section>
+ <section> H2: [cluster 2] — address PAA #2 </section>
+ <section> H2: [cluster 3] — comparison table if SERP warrants </section>
+ <section> H2: [cluster 4] — image/diagram </section>
+ <section class="expert-quote"> Blockquote from SME (E-E-A-T) </section>
+ <section> H2: FAQ — remaining PAA questions </section>
+ <footer> Author bio | Related posts (3) | CTA: newsletter </footer>
+</article>
+```
+
+### 3. Product Page
+
+```
+<section class="product-hero">
+ H1: [product + benefit keyword] | Gallery: 4-6 images
+ Price + savings indicator | CTA: "Add to Cart" (above fold)
+ Trust: stars + review count + shipping
+</section>
+<section class="key-features"> 4-6 bullets: feature + benefit </section>
+<section class="specifications"> Table: specs, dimensions, compatibility </section>
+<section class="reviews"> aggregateRating + 5 reviews, filterable </section>
+<section class="comparison"> "Why choose this" table (if SERP shows intent) </section>
+<section class="faq"> Product PAA questions </section>
+<section class="related"> 4 complementary products </section>
+```
+
+### 4. Comparison Page
+
+```
+<header>
+ H1: "[A] vs [B]: [year] Comparison"
+ Quick verdict: "Best for [use case]: [winner]"
+</header>
+<section class="matrix"> Feature table: check/cross/partial icons </section>
+<section class="reviews">
+ H2: [A] — pros, cons, best for, pricing
+ H2: [B] — pros, cons, best for, pricing
+</section>
+<section class="verdict"> Persona recs: "Choose A if...", "Choose B if..." </section>
+<section class="faq"> Comparison PAA questions </section>
+```
+
+### 5. Service Page
+
+```
+<section class="hero"> H1: [service + location] | CTA: "Free Consultation" </section>
+<section class="problem"> Empathy-driven problem statement </section>
+<section class="process"> 3-5 numbered steps </section>
+<section class="results"> 2-3 case studies with before/after metrics </section>
+<section class="credentials"> Certs, experience, team </section>
+<section class="pricing"> Packages or "starting at" </section>
+<section class="faq"> PAA questions </section>
+<section class="cta"> Repeat CTA + contact form </section>
+```
+
+### 6. Local Page
+
+```
+<section class="hero">
+ H1: [service] in [city] — [business name]
+ CTA: "Call Now" + "Get Directions" | NAP displayed
+</section>
+<section class="map"> Google Map embed + landmark directions </section>
+<section class="services"> Location-specific services (unique content) </section>
+<section class="reviews"> Review widget with reviewer locations </section>
+<section class="hours"> openingHoursSpecification + "open now" </section>
+<section class="about"> Team, history, community (location-specific) </section>
+```
+
+### 7. Tool / Interactive
+
+```
+<section class="tool" id="tool">
+ H1: Free [Tool Name] — [purpose]
+ Input: [fields/dropdowns/upload] (ABOVE FOLD)
+ CTA: "Calculate" / "Generate" / "Check" | Output zone
+</section>
+<section class="instructions"> How to Use — 3 steps max </section>
+<section class="explanation"> Educational depth for SEO </section>
+<section class="faq"> Tool-specific PAA </section>
+<section class="related-tools"> 3-4 related tools </section>
+```
+
+### 8. Hybrid (Education + Product)
+
+```
+<section class="hero">
+ H1: [education + product keyword] | Dual CTA: "Learn More" + "Try Free"
+</section>
+<section class="education"> Address awareness-stage PAA </section>
+<section class="solution"> Bridge: how [Product] solves this </section>
+<section class="features"> 3-4 benefit-framed features </section>
+<section class="proof"> Case study or testimonial </section>
+<section class="cta"> Match journey stage from SERP analysis </section>
+<section class="faq"> Mix of educational + product PAA </section>
+```
+
+## Placeholder Rules
+
+When filling SOLL placeholders, always be specific:
+
+| Bad (vague) | Good (concrete) |
+|-------------|-----------------|
+| "Add a CTA" | "Add 'Start Free Trial' button below hero, green #2d6a4f, links to /signup" |
+| "Include social proof" | "Add 3 logos (G2, Capterra, TrustRadius) + '4.8/5 from 2,300 reviews'" |
+| "Add FAQ section" | "Add 5 FAQs from PAA: 'Is X safe?', 'How much does X cost?', ..." |
+| "Improve trust" | "Add SSL badge + 'SOC 2 certified' banner + customer count" |
+| "More content" | "Add 400-word section under H2 'How [Feature] Works' with diagram" |
diff --git a/skills/seo-technical/SKILL.md b/skills/seo-technical/SKILL.md
index b719e75..d8bda8f 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
diff --git a/skills/seo/SKILL.md b/skills/seo/SKILL.md
index e423092..474c1b3 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: "1.8.2"
+ version: "1.9.0"
category: seo
---
@@ -17,7 +17,7 @@ metadata:
**Scripts:** Located at the plugin root `scripts/` directory.
Comprehensive SEO analysis across all industries (SaaS, local services,
-e-commerce, publishers, agencies). Orchestrates 16 specialized sub-skills and 11 subagents
+e-commerce, publishers, agencies). Orchestrates 20 specialized sub-skills and 15 subagents
(+ 3 optional extension sub-skills: seo-dataforseo, seo-firecrawl, and seo-image-gen).
## Quick Reference
@@ -40,6 +40,12 @@ e-commerce, publishers, agencies). Orchestrates 16 specialized sub-skills and 11
| `/seo hreflang [url]` | Hreflang/i18n SEO audit and generation |
| `/seo google [command] [url]` | Google SEO APIs (GSC, PageSpeed, CrUX, Indexing, GA4) |
| `/seo backlinks <url>` | Backlink profile analysis (free: Moz, Bing, CC; premium: DataForSEO) |
+| `/seo cluster <seed-keyword>` | SERP-based semantic clustering and content architecture |
+| `/seo sxo <url>` | Search Experience Optimization: page-type analysis, user stories, personas |
+| `/seo drift baseline <url>` | Capture SEO baseline for change monitoring |
+| `/seo drift compare <url>` | Compare current state to stored baseline |
+| `/seo drift history <url>` | Show drift history over time |
+| `/seo ecommerce <url>` | E-commerce SEO: product schema, marketplace intelligence |
| `/seo firecrawl [command] <url>` | Full-site crawling and site mapping (extension) |
| `/seo dataforseo [command]` | Live SEO data via DataForSEO (extension) |
| `/seo image-gen [use-case] <description>` | AI image generation for SEO assets (extension) |
@@ -54,9 +60,13 @@ When the user invokes `/seo audit`, delegate to subagents in parallel:
5. If local business detected AND DataForSEO MCP available, also spawn seo-maps agent
6. If backlink APIs detected (`python scripts/backlinks_auth.py --check`), also spawn seo-backlinks agent
7. If Firecrawl MCP available, use `firecrawl_map` to discover all site URLs before analysis
-8. Collect results and generate unified report with SEO Health Score (0-100)
-9. Create prioritized action plan (Critical -> High -> Medium -> Low)
-10. **Offer PDF report**: "Generate a professional PDF report? Use `/seo google report full`"
+8. If content strategy signals detected (blog, pillar pages, topic clusters), also spawn seo-cluster agent
+9. If e-commerce detected, also spawn seo-ecommerce agent
+10. If drift baseline exists for this URL (`python scripts/drift_history.py <url>`), also spawn seo-drift agent
+11. Always include seo-sxo in full audits (search experience applies to all sites)
+12. Collect results and generate unified report with SEO Health Score (0-100)
+13. Create prioritized action plan (Critical -> High -> Medium -> Low)
+14. **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`.
@@ -107,6 +117,10 @@ Display after these commands complete their full output:
- `/seo maps` (after maps intelligence report)
- `/seo google` (after Google API data report)
- `/seo backlinks` (after backlink profile analysis)
+- `/seo cluster` (after cluster plan generation)
+- `/seo sxo` (after SXO analysis report)
+- `/seo drift compare` (after drift comparison report)
+- `/seo ecommerce` (after e-commerce analysis)
### When to skip
@@ -156,7 +170,7 @@ Weighted aggregate of all categories:
## Sub-Skills
-This skill orchestrates 16 specialized sub-skills (+ 3 extensions):
+This skill orchestrates 20 specialized sub-skills (+ 3 extensions):
1. **seo-audit** -- Full website audit with parallel delegation
2. **seo-page** -- Deep single-page analysis
@@ -169,14 +183,18 @@ This skill orchestrates 16 specialized sub-skills (+ 3 extensions):
9. **seo-plan** -- Strategic planning with templates
10. **seo-programmatic** -- Programmatic SEO analysis and planning
11. **seo-competitor-pages** -- Competitor comparison page generation
-12. **seo-hreflang** -- Hreflang/i18n SEO audit and generation
+12. **seo-hreflang** -- Hreflang/i18n SEO audit, cultural profiles, content parity
13. **seo-local** -- Local SEO (GBP, NAP, citations, reviews, local schema, multi-location)
14. **seo-maps** -- Maps intelligence (geo-grid, GBP audit, reviews, competitor radius)
15. **seo-google** -- Google SEO APIs (GSC, PageSpeed, CrUX, Indexing API, GA4)
16. **seo-backlinks** -- Backlink profile analysis (free: Moz, Bing, CC; premium: DataForSEO)
-17. **seo-firecrawl** -- Full-site crawling and site mapping via Firecrawl MCP (extension)
-18. **seo-dataforseo** -- Live SEO data via DataForSEO MCP (extension)
-19. **seo-image-gen** -- AI image generation for SEO assets via Gemini (extension)
+17. **seo-cluster** -- SERP-based semantic clustering (contributed by Lutfiya Miller)
+18. **seo-sxo** -- Search Experience Optimization (contributed by Florian Schmitz)
+19. **seo-drift** -- SEO drift monitoring (contributed by Dan Colta)
+20. **seo-ecommerce** -- E-commerce SEO intelligence (contributed by Matej Marjanovic)
+21. **seo-firecrawl** -- Full-site crawling and site mapping via Firecrawl MCP (extension)
+22. **seo-dataforseo** -- Live SEO data via DataForSEO MCP (extension)
+23. **seo-image-gen** -- AI image generation for SEO assets via Gemini (extension)
## Subagents
@@ -192,6 +210,10 @@ For parallel analysis during audits:
- `seo-maps` -- Geo-grid rank tracking, GBP audit, review intelligence, competitor radius mapping (conditional: spawned when Local Service detected AND DataForSEO MCP available)
- `seo-google` -- CWV field data, URL indexation status, organic traffic trends (conditional: spawned when Google API credentials detected)
- `seo-backlinks` -- Backlink profile data: DA/PA, referring domains, anchor text, toxic links (conditional: spawned when Moz/Bing API keys detected or always for CC domain-level metrics)
+- `seo-cluster` -- Semantic clustering analysis (conditional: content strategy detected)
+- `seo-sxo` -- Page-type mismatch, user stories, persona scoring (always in full audits)
+- `seo-drift` -- Baseline comparison (conditional: drift baseline exists for URL)
+- `seo-ecommerce` -- Product schema, marketplace intel (conditional: e-commerce detected)
- `seo-dataforseo` -- Live SERP, keyword, backlink, local SEO data (extension, optional)
- `seo-image-gen` -- SEO image audit and generation plan (extension, optional)
- `seo-firecrawl` -- Full-site crawl and site mapping (extension, optional; used by audit for URL discovery)
diff --git a/video-script-v1.7.2.md b/video-script-v1.7.2.md
new file mode 100644
index 0000000..49475ad
--- /dev/null
+++ b/video-script-v1.7.2.md
@@ -0,0 +1,142 @@
+# Video Script: Claude SEO v1.7.2 — What's New
+
+**Duration:** ~5 minutes
+**Tone:** Natural, conversational, like talking to a friend who knows Claude Code
+**Format:** Screen recording with face cam overlay
+
+---
+
+## INTRO (0:00 - 0:30)
+
+Hey everyone. So about a month ago I showed you Claude SEO — the universal SEO skill for Claude Code. Since then, the project has gone from around 2,000 stars to over 3,500, which is insane. Thank you.
+
+But I haven't just been watching the numbers grow — I've been shipping. We went from v1.5 to v1.7.2, and in this video I'm going to walk you through the biggest updates: Google API integration, AI image generation with Banana, the extension system, and marketplace compliance.
+
+Let's get into it.
+
+---
+
+## SECTION 1: Google SEO APIs (0:30 - 2:15)
+
+*[Screen: Show terminal with Claude Code open]*
+
+The biggest addition is direct Google API integration. Claude SEO can now pull live data from Google's own APIs — Search Console, PageSpeed Insights, CrUX, GA4, and even the Indexing API.
+
+*[Type: `/seo google psi https://example.com`]*
+
+So here I'm running a PageSpeed check. This isn't just lab data — it pulls real Chrome User Experience data, the actual Core Web Vitals that Google uses for ranking.
+
+The cool part is the credential system. There are four tiers. Tier 0 — just a free API key — gives you PageSpeed and CrUX. Tier 1 adds OAuth for Search Console and the Indexing API. Tier 2 adds GA4 organic traffic data. And Tier 3 unlocks the Keyword Planner if you have a Google Ads account.
+
+You can start with just Tier 0. One API key, completely free, and you already get live Core Web Vitals and Lighthouse scores.
+
+*[Type: `/seo google report full`]*
+
+And all of this data feeds into professional PDF reports. A4 format, charts, color-coded scores, table of contents — something you can actually send to a client.
+
+*[Show generated PDF briefly]*
+
+Now in v1.7.2, you can also export to Excel.
+
+*[Type: `/seo google report full --format xlsx`]*
+
+Same data, but in a spreadsheet. Queries, pages, indexation status — all in separate sheets with filters and frozen headers. Clients love spreadsheets. You can even do `--format all` and get PDF, HTML, and Excel at once.
+
+---
+
+## SECTION 2: Banana — AI Image Generation (2:15 - 3:15)
+
+*[Screen: Terminal]*
+
+The second feature I want to show is the Banana extension — AI image generation for SEO assets. This uses Google Gemini to generate images directly from Claude Code.
+
+*[Type: `/seo image-gen og "AI-powered SEO audit tool"`]*
+
+So I just asked it to generate an Open Graph image. Claude acts as a creative director — it builds a detailed prompt, picks the right model, generates the image, and saves it. About two cents per image.
+
+*[Show generated image]*
+
+You can generate OG images, blog hero graphics, product shots, infographics — six use cases out of the box.
+
+*[Type: `/seo image-gen hero "technical SEO audit checklist"`]*
+
+The skill also does SEO image audits — it checks your existing images for missing alt text, wrong formats, oversized files, missing schema — and then creates a generation plan for the ones you need.
+
+This is the extension pattern in action. Claude SEO's core is free and local. Extensions like Banana, DataForSEO, and Firecrawl plug in via MCP servers when you need them. Each one has its own installer, its own uninstaller, completely self-contained.
+
+---
+
+## SECTION 3: The Extension System (3:15 - 4:00)
+
+*[Screen: Show the extensions/ folder structure in editor or terminal]*
+
+So let me quickly explain how the extension system works because this is key to how Claude SEO grows.
+
+The core skill — 17 sub-skills, 12 subagents — works with zero API keys. You install it, you run `/seo audit`, and it does a full analysis using Claude's own intelligence.
+
+But when you want live data — SERP rankings, backlink profiles, keyword volume — you add an extension. Right now there are three:
+
+*[Show list]*
+
+DataForSEO gives you 22 commands across 9 API modules — SERP analysis, keyword research, backlinks, content analysis. Firecrawl gives you full-site crawling with JavaScript rendering. And Banana gives you AI image generation via Gemini.
+
+Each extension is one install script. It copies the skill files, configures the MCP server, and you're done. And if you don't want it anymore — one uninstall script, clean removal.
+
+The audit orchestrator detects which extensions are installed and automatically spawns the right subagents. So the more extensions you add, the deeper your audits get.
+
+---
+
+## SECTION 4: Marketplace & Community (4:00 - 4:45)
+
+*[Screen: GitHub repo]*
+
+A few more things worth mentioning. We cleaned up the entire codebase following Anthropic's official best practices. Every skill now has its own LICENSE file. We added a privacy policy. We stripped out unsupported frontmatter fields. And we're now validated for the official Claude Code plugin marketplace.
+
+*[Show: `claude plugin validate .` passing]*
+
+We also got listed on the awesome-claude-skills repo — that's the one with 49,000 stars — and we cross-linked with AI Marketing Claude as a companion tool for the post-audit workflow.
+
+The project is now at 19 sub-skills, 12 subagents, 3 extensions, and 3,500 stars. Community PRs keep coming in — we've reviewed and responded to every single one.
+
+---
+
+## OUTRO (4:50 - 5:10)
+
+If you're using Claude Code for anything SEO-related, give Claude SEO a try. Install is one command — link in the description. Star the repo if you find it useful, and drop a comment if there's a feature you want to see next.
+
+I'm thinking v1.8 might be the content strategy skill — turning audit findings into actual content plans. Let me know what you think.
+
+See you in the next one.
+
+---
+
+## VIDEO DESCRIPTION (for YouTube)
+
+```
+Claude SEO v1.7.2 — Universal SEO Skill for Claude Code
+
+What's new:
+- Google SEO APIs (Search Console, PageSpeed, CrUX, GA4, Indexing API)
+- PDF & Excel reports (A4 with charts, multi-sheet .xlsx)
+- Banana extension (AI image generation via Gemini for OG, hero, product images)
+- Extension system (DataForSEO, Firecrawl, Banana — plug in what you need)
+- Official marketplace compliance (passes claude plugin validate)
+
+Install:
+curl -fsSL https://raw.githubusercontent.com/AgriciDaniel/claude-seo/main/install.sh | bash
+
+GitHub: https://github.com/AgriciDaniel/claude-seo
+Skool: https://www.skool.com/ai-marketing-hub-pro
+
+19 sub-skills | 12 subagents | 3 extensions | 3,500+ stars
+
+#ClaudeCode #SEO #AI #ClaudeSEO
+```
+
+---
+
+## THUMBNAIL TEXT IDEAS
+
+- "Claude SEO v1.7.2"
+- "Google APIs + AI Images"
+- "19 Skills | 3 Extensions"
diff --git a/youtube-shorts-research.md b/youtube-shorts-research.md
new file mode 100644
index 0000000..b34c177
--- /dev/null
+++ b/youtube-shorts-research.md
@@ -0,0 +1,225 @@
+# YouTube Shorts Research: Claude SEO
+
+## 1. Market Gap Analysis
+
+**Massive opportunity.** There are virtually ZERO YouTube videos specifically about "Claude Code SEO" or "Claude SEO skill." YouTube search returns no direct matches. Meanwhile:
+- The GitHub repo has 31,000+ demo views
+- Search Engine Land, Stormy AI, and multiple blogs are writing about Claude Code for SEO
+- 150+ skills listed on claudemarketplace.com
+- Multiple competitor SEO skills appearing (seo-geo-claude-skills, seomachine, marketingskills)
+
+**You own this niche.** Nobody is making video content about it yet.
+
+---
+
+## 2. Keyword Research
+
+### Primary Keywords (high intent, low competition on YouTube)
+
+| Keyword | Search Intent | Competition | Priority |
+|---------|--------------|-------------|----------|
+| claude code seo | Discovery | Very low | #1 |
+| claude code tutorial | Learning | Medium | #2 |
+| claude code skills | Learning | Low | #3 |
+| free seo audit tool | Solution | High | #4 |
+| ai seo tool 2026 | Discovery | Medium | #5 |
+| free backlink checker | Solution | High | #6 |
+| claude code plugins | Learning | Low | #7 |
+
+### Long-Tail Keywords (Shorts titles)
+
+| Keyword Phrase | Type |
+|---------------|------|
+| how to audit a website seo with ai | How-to |
+| free backlink analysis with common crawl | Tutorial |
+| claude code vs ahrefs | Comparison |
+| seo audit in 30 seconds with ai | Demo |
+| free domain authority checker | Tool demo |
+| check backlinks for free no signup | Solution |
+| ai that does seo for you | Discovery |
+| best claude code skill for seo | Recommendation |
+| how to install claude code plugins | Tutorial |
+| schema markup generator ai | Tool demo |
+| e-e-a-t checker tool free | Solution |
+| ai seo audit tool free 2026 | Discovery |
+| generative engine optimization tool | Niche |
+| geo seo claude code | Niche |
+| local seo audit with ai | Solution |
+
+### Hashtags (use 3-5 per Short)
+
+**Always include:** `#Shorts`
+
+**Core rotation (pick 2-3):**
+- `#ClaudeCode` `#SEO` `#AITools`
+- `#SEOAudit` `#FreeSEO` `#BacklinkChecker`
+- `#TechTutorial` `#DevTools` `#AIForSEO`
+- `#SEOTips` `#DigitalMarketing` `#WebDev`
+
+---
+
+## 3. Topic Research: 30 Shorts Ideas
+
+### A. Quick Demos (highest viral potential — show the tool working)
+
+1. **"I built a free SEO audit tool with AI"** — 45s demo of `/seo audit` running on a real site. Show the health score at the end. Hook: "This AI just found 47 SEO issues on my site in under a minute."
+
+2. **"Free backlink checker that uses Common Crawl data"** — Demo `commoncrawl_graph.py` on google.com showing PageRank #1. Hook: "Google's PageRank is public data. Here's how to check any domain for free."
+
+3. **"This AI verifies if your backlinks still exist"** — Demo verify_backlinks.py checking 5 URLs. Show verified/lost/JS-rendered results. Hook: "3 of my backlinks were dead. This script found them in 10 seconds."
+
+4. **"Free Domain Authority check without Ahrefs"** — Show Moz API free tier. Hook: "You don't need a $99/month subscription to check Domain Authority."
+
+5. **"AI detected my schema markup was broken"** — Demo `/seo schema` finding issues. Hook: "My JSON-LD had a bug Google couldn't read. AI found it instantly."
+
+6. **"This AI checks if your site is ready for ChatGPT"** — Demo `/seo geo` checking AI crawler access. Hook: "Is your site being cited by ChatGPT? Here's how to check."
+
+7. **"I replaced my SEO agency with one command"** — Demo `/seo audit` full report. Hook: "My SEO agency charged $3,000/month. This does the same thing for free."
+
+8. **"Your H1 tags might be fake"** — Show the suspicious H1 detection (counters like "67" being flagged). Hook: "This site has 5 H1 tags. None of them are real headings."
+
+### B. Behind-the-Build (developer audience, builds authority)
+
+9. **"How I stream a 500MB file without crashing"** — Show the incremental zlib decompression in commoncrawl_graph.py. Hook: "Common Crawl's data is 500MB compressed. Here's how I process it in 256KB chunks."
+
+10. **"The bug that made Instagram look dead"** — JS-rendering false negative story. Hook: "My crawler said Instagram removed my backlink. It was lying."
+
+11. **"Why I validate every report before showing it"** — Show validate_backlink_report.py catching false findings. Hook: "AI makes mistakes. So I built AI to catch AI's mistakes."
+
+12. **"Reversed domain names broke my parser"** — Common Crawl uses com.google not google.com. Hook: "Common Crawl stores domains backwards. This took me 2 hours to figure out."
+
+13. **"The 3-tier fallback I built for free backlink data"** — Architecture overview. Hook: "Ahrefs costs $99/month. I built a system that gets 70% of the data for free."
+
+14. **"18 bugs in one feature"** — Story of the 4 audit rounds. Hook: "I wrote 3,000 lines of code. Then found 18 bugs before shipping."
+
+### C. SEO Education (broadest audience, drives awareness)
+
+15. **"What is Domain Authority and why it matters"** — Explain DA with real examples from Moz data. Hook: "Google says DA doesn't exist. Here's why SEOs still use it."
+
+16. **"Your site is invisible to AI search"** — Show a site blocking GPTBot/ClaudeBot in robots.txt. Hook: "95% of sites are blocking AI from citing them. Is yours?"
+
+17. **"Schema markup in 60 seconds"** — Show JSON-LD generation. Hook: "This invisible code can double your click-through rate."
+
+18. **"The difference between good and toxic backlinks"** — Show toxic patterns. Hook: "Not all backlinks help you. Some can get you penalized."
+
+19. **"E-E-A-T explained with a real audit"** — Show E-E-A-T scoring. Hook: "Google's quality raters use 4 letters to judge your site. Here's what they mean."
+
+20. **"Why your blog has zero backlinks"** — Link building education. Hook: "I checked. Your competitor has 300 referring domains. You have 2."
+
+### D. Comparisons & Hot Takes (engagement bait, comment drivers)
+
+21. **"Claude Code vs Ahrefs for SEO audits"** — Side by side. Hook: "One costs $99/month. The other is free. Which finds more issues?"
+
+22. **"I audited Google.com's SEO"** — Run audit on google.com. Hook: "Even Google fails its own SEO checks. Here's the score."
+
+23. **"Free tools that replaced my $500/month SEO stack"** — Show the full free tier. Hook: "I cancelled Ahrefs, Semrush, and Screaming Frog. Here's what I use now."
+
+24. **"The SEO metric nobody talks about: Harmonic Centrality"** — Show CC data. Hook: "PageRank is dead. This metric replaced it."
+
+25. **"Is your site crawled by Common Crawl?"** — Demo in_crawl check. Hook: "134 million domains are in this database. Is yours?"
+
+### E. Tutorials (highest value, saves/shares)
+
+26. **"Install Claude SEO in 30 seconds"** — Show marketplace install. Hook: "One command. 19 SEO tools. Zero dollars."
+
+27. **"Set up free backlink monitoring"** — Show backlinks_auth.py --setup. Hook: "Moz + Bing + Common Crawl. All free. Here's the setup."
+
+28. **"How to check your competitor's backlinks for free"** — Bing Webmaster comparison. Hook: "Bing gives you something Ahrefs charges $99 for."
+
+29. **"Generate a PDF SEO report with AI"** — Show full report generation. Hook: "My clients think I spent 8 hours on this. It took 2 minutes."
+
+30. **"The AI pre-delivery validator"** — Show the validator catching errors. Hook: "Before any report reaches you, this script checks it for lies."
+
+---
+
+## 4. YouTube Shorts SEO Best Practices (2026)
+
+### Algorithm Priorities
+- **Viewed vs Swiped ratio**: Target 70%+ viewed rate
+- **Replay value**: If viewers watch 1.5x, algorithm flags as "extraordinary value"
+- **Completion rate**: 50s Short with 90% retention beats 15s with 60%
+- **First hour engagement**: Likes/shares in first 60 minutes are critical
+
+### Optimal Format
+- **Length**: 30-55 seconds (higher loop rate than 7-15s clips)
+- **Hook**: First 2 seconds must grab attention (question, surprising stat, bold claim)
+- **Resolution**: 1080x1920 vertical
+- **Captions**: Always on (85% of Shorts watched without sound)
+- **CTA**: End with "Follow for more" or question to drive comments
+
+### Title Formula
+```
+[Hook/Number] + [Keyword] + [Benefit/Surprise]
+```
+Examples:
+- "I found 47 SEO issues in 30 seconds with AI"
+- "Free backlink checker that nobody knows about"
+- "This AI replaced my $3000/month SEO agency"
+
+### Description Formula
+```
+Line 1: Primary keyword + context (most weight for search)
+Line 2: Secondary keyword + value proposition
+Line 3-5: Hashtags (3-5 max)
+```
+
+### Posting Strategy
+- **Frequency**: 3-5 Shorts per week minimum
+- **Best times**: Tue-Thu, 12pm-3pm and 7pm-9pm (test your audience)
+- **Series batching**: Record 5-10 Shorts in one session, release over 2 weeks
+- **Cross-post**: Same content on TikTok and Instagram Reels (different hashtags)
+
+---
+
+## 5. Competitive Landscape
+
+### Who's Making Claude Code Content?
+- **Search Engine Land** — wrote about Claude Code as "SEO command center" (article, not video)
+- **Stormy AI Blog** — 3+ articles on Claude Code + SEO (text only)
+- **mean.ceo blog** — "replaced my SEO agency" angle (text only)
+- **thruuu.com** — "SEO content strategy with Claude Code" (text only)
+- **almcorp.com** — "Claude Code for SEO data command center" (text only)
+
+### Key Insight
+**Everyone is writing blog posts. Nobody is making Shorts.** The video gap is enormous. First mover advantage is real.
+
+### Competitor Skills on GitHub
+- `alirezarezvani/claude-skills` — 220+ skills, broad (not SEO-focused)
+- `aaron-he-zhu/seo-geo-claude-skills` — 20 SEO skills (lighter than yours)
+- `TheCraigHewitt/seomachine` — Blog content focus (not full SEO)
+- `coreyhaines31/marketingskills` — Marketing broad (CRO, copy, SEO, analytics)
+
+**You have the most comprehensive SEO skill (19 sub-skills, 13 agents). Nobody else is close.**
+
+---
+
+## 6. Content Calendar: First 2 Weeks
+
+### Week 1: Awareness (show what it does)
+| Day | Short | Keyword |
+|-----|-------|---------|
+| Mon | "I built a free SEO audit tool with AI" (#1) | claude code seo, free seo audit |
+| Wed | "Free backlink checker using Common Crawl" (#2) | free backlink checker, common crawl |
+| Fri | "This AI checks if your site is ready for ChatGPT" (#6) | ai seo tool, geo seo |
+
+### Week 2: Education + Authority
+| Day | Short | Keyword |
+|-----|-------|---------|
+| Mon | "Install Claude SEO in 30 seconds" (#26) | claude code tutorial, install plugin |
+| Wed | "The bug that made Instagram look dead" (#10) | backlink verification, js rendering |
+| Fri | "I audited Google.com's SEO" (#22) | seo audit, google seo score |
+
+---
+
+## Sources
+
+- [YouTube SEO Best Practices 2026](https://turrboo.com/blog/youtube-seo-best-practices)
+- [YouTube Shorts SEO 2026: How to Rank in Search](https://miraflow.ai/blog/youtube-shorts-seo-2026-how-to-rank-shorts-in-search)
+- [How to Optimize YouTube Shorts for SEO: 2026 Viral Blueprint](https://12amagency.com/blog/how-to-optimize-youtube-shorts-for-seo/)
+- [YouTube Shorts Trends 2026](https://klipa.ai/en/blog/youtube-shorts-trends-2026_151)
+- [YouTube Trends For SEO April 2026](https://blog.mean.ceo/youtube-trends-for-seo-april-2026/)
+- [How to Turn Claude Code Into Your SEO Command Center](https://searchengineland.com/claude-code-seo-work-470668)
+- [Claude Code Skills Documentation](https://code.claude.com/docs/en/skills)
+- [Claude SEO GitHub](https://github.com/AgriciDaniel/claude-seo)
+- [YouTube SEO Guide 2026](https://www.nigcworld.com/youtube-seo-guide-2026)
+- [YouTube Shorts SEO Best Practices](https://www.hollyland.com/blog/topics/youtube-shorts-seo-best-practices)