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.

Merge branch 'phase2/packaging' into release/v2.3.0

Agrici Daniel87a9b8fc3c05
diff --cc CHANGELOG.md
index a1b0468,26cad94..a404675
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -7,103 -7,68 +7,159 @@@ and this project adheres to [Semantic V
## [Unreleased]
+### Security
+
+## [Unreleased]
+
### Added
+- `content_humanize.py` now strips invisible Unicode watermark characters (zero-width
+ codepoints, directional marks/overrides, tag characters) and normalizes exotic spaces
+ before the AI-phrasing pass, which those codepoints otherwise defeat by breaking `\b`
+ word boundaries. Emoji sequences (ZWJ, variation selectors) are preserved. The
+ `seo-content` skill documents the new triggers and the scope limits (statistical
+ watermarks are untouched; intended for the user's own drafts).
+- Templated-metadata detector (`scripts/metadata_template.py`): flags meta descriptions that
+ restate their own title tag verbatim and then close with a stock call to action, the shape bulk
+ metadata jobs produce site-wide. Deterministic string comparison, no model, `method: heuristic`
+ in its output. Exposes a site-level roll-up (`templated_ratio`, `shared_cta_phrases`, `site_risk`)
+ because duplicated/templated metadata is a site-scale signal, not a per-page one. Wired into
+ `seo-page`, the `seo-content` agent, the quality-gates meta description table, and the
+ `seo-programmatic` uniqueness gate, which measures body copy only and therefore cannot see this.
+ - `fetch_page.py --json` exposes full response metadata and content for raw and
+ rendered fetches, including structured fetch errors (#282).
+ - `fetch_page.py --json --max-text N` truncates content fields, matching
+ `render_page.py`'s option.
+### Changed
+
+- Google Search guidance refreshed through 2026-09-10 from Google-owned sources:
+ site reputation abuse enforcement now differs for EEA searchers (2026-08-28),
+ region-specific aggregator and supplier units are documented for the EEA, South
+ Africa, and Turkiye (2026-09-08), AI Mode adds travel booking and price tracking
+ (2026-08-27), and the CrUX pass-rate figure moves to the August 2026 dataset.
+- `safe_requests_get` and `safe_requests_head` send browser-like default headers
+ instead of `User-Agent: python-requests/x.y.z`, which managed WAFs answer with
+ 403/406 and SSR frameworks answer with an empty client-side shell, both of
+ which callers were analysing as if they were the real document. The values are
+ `fetch_page.py`'s and now live in `url_safety` as the single source of truth,
+ with `fetch_page.py` importing them back. `Accept-Language` is not sent unless
+ the caller passes one: announcing `en-US` makes a multi-locale site serve its
+ English variant, which corrupts hreflang and international audits. (#200)
+
### Fixed
+- The JSON-LD hook now validates every `application/ld+json` block regardless of
+ attribute order, CSP `nonce`, `id` or `data-*` attributes, tag case, or an
+ unquoted type value; such blocks were previously skipped without validation.
+- The JSON-LD hook no longer reports runtime template expressions (JSX, Vue,
+ Svelte, template literals in component files; PHP and EJS everywhere) as
+ invalid JSON, while a malformed literal in plain HTML is still reported.
+- The JSON-LD hook accepts the schema.org `@context` with a trailing slash, in
+ list form, and in `{"@vocab": ...}` object form.
+- `google_report.py` no longer labels a plain-string finding as "Info" in the
+ executive summary's critical-issues box or in the full-audit category
+ findings; the "Info" prefix/badge now appears only when the finding is a
+ dict that carries an explicit `severity`.
+- `parse_html.py` now detects `rel="canonical"` and `rel="alternate"`
+ (hreflang) `<link>` tags case-insensitively, so `rel="Alternate"` or
+ `REL="Canonical"` are no longer silently dropped. Credit to #269 for the
+ report that prompted this investigation.
+- Every live fetch failed behind a configured HTTP proxy: the pinned resolver
+ refused to resolve the proxy's own address, so nothing left the process. The
+ proxy host `requests` selects for the URL is now exempt from that check, and
+ only that host. (#280)
+- `unlighthouse_run.py` no longer passes `--max-routes` as `--scanner
+ '{"maxRoutes": N}'`, a CLI flag unlighthouse-ci's parser never reads (the
+ crawl silently ran uncapped). Route count and a new per-page timeout are
+ now set via a generated `unlighthouse.config.mjs` passed with
+ `--config-file`, confirmed against unlighthouse's CLI source and docs.
+ `ci-result.json` is parsed as the array the default `jsonSimple` reporter
+ actually writes, with a tolerant fallback for the `jsonExpanded` object
+ shape, instead of assuming a dict. `extensions/unlighthouse/install.sh`
+ no longer aborts on a marketplace/plugin install: it now also checks
+ `${CLAUDE_PLUGIN_ROOT}` and the plugin cache before requiring the manual
+ `~/.claude/skills/seo` layout. Fixes #189.
+- Raised `maxTurns` on all 16 agents `seo-audit` can spawn (`seo-technical`
+ 20→45, `seo-content` 15→45, and thirteen others that were below 30) so a
+ large-site audit doesn't hit its turn budget before finishing. Every one of
+ those agents now writes a partial findings file after its first analysis
+ pass and overwrites it with the complete findings at the end, so a
+ turn-budget stop never throws away completed work; `seo-audit`'s
+ error-handling table documents the same contract for the orchestrator.
+ Fixes #177, #272.
+- AI crawler claims are now checked against the crawler that actually governs them.
+ `GPTBot` was documented as "ChatGPT web search" in the `seo-geo` crawler table; it is
+ OpenAI's model-training crawler, while `OAI-SearchBot` is what determines ChatGPT
+ Search citability. `Google-Extended` governs Gemini/Vertex training and grounding only
+ and is no longer treated as a Google Search readiness signal (Google Search, AI
+ Overviews, and AI Mode all follow `Googlebot`). The same GPTBot-shaped conflation was
+ found for Claude: `ClaudeBot` (Anthropic's training crawler) was listed as a
+ search-visibility crawler in `seo-geo`'s table, agent, and recommendation line, while
+ `Claude-SearchBot` (the crawler that actually governs Claude search citability) was
+ missing entirely. `seo-technical` already had `ClaudeBot` correctly labelled
+ training-only, so `seo-geo` and the `seo-geo` agent were brought into agreement with
+ it rather than the other way around. Adds `Claude-SearchBot` and `Applebot-Extended`
+ (Apple's training-opt-out token, distinct from `Applebot` search indexing) to both
+ skills, a claim-to-bot mapping table for all four vendors, citations to each vendor's
+ own crawler documentation (OpenAI, Google, Anthropic, Apple), the missing
+ `OAI-SearchBot` row to the `seo-technical` crawler table, and requires training access
+ and search citability to be reported as separate findings. The `anthropic-ai` row is
+ marked unverified: it does not appear on Anthropic's current crawler support article.
+ - `fetch_page.py --json` emitted a different key set for the raw path than the
+ rendered path (raw dumped `fetch_page()`'s own dict as-is; rendered dumped
+ `render_page()`'s dict as-is). Both paths now go through
+ `render_page._json_summary` after the raw result is mapped onto the
+ render_page contract, so `--json` output has one shared shape and `--max-text`
+ applies to both (#297).
+ - `install.ps1` crashed on Windows PowerShell 5.1 before it could even check
+ whether Python was installed: `Test-PythonCandidate`'s `-Args` parameter was
+ a mandatory `[string[]]`, which 5.1 rejects when called with an empty array,
+ and `Resolve-Python` calls it that way for the `python3`/`python` candidates
+ (#207).
+ - The Windows installer smoke workflow only ran the install/verify/uninstall
+ sequence under PowerShell Core (`pwsh`); a parallel job now runs the same
+ steps under Windows PowerShell 5.1 (`shell: powershell`), which is what
+ actually caught #207.
+ - The dataforseo, firecrawl, ahrefs, and banana extension installers wrote
+ their MCP server block to `~/.claude/settings.json`, a key Claude Code does
+ not read from that file, so the server never loaded and reinstalling could
+ not fix it. They now write `~/.claude.json` (the file `claude mcp add`
+ writes) across install/uninstall scripts, banana's Python helpers, and the
+ setup docs. `bing-webmaster`, `profound`, and `seranking` were left alone:
+ they write the `env` key, which settings.json does support (#204).
+ - `extensions/firecrawl/install.ps1` and `extensions/banana/scripts/
+ setup_mcp.py` now write `~/.claude.json` atomically (temp file in the same
+ directory, then `Move-Item -Force` / `os.replace`), and the PowerShell
+ serialisation depth is raised from 10 to 100 so an existing `~/.claude.json`
+ with deeply nested config round-trips intact instead of being flattened.
+ - `scripts/backlinks_auth.py`'s token file hardening was a no-op on Windows:
+ it had no write path at all, and its permission story on POSIX (none) did
+ not match `google_auth.py`'s OAuth token handling. It now shares
+ `google_auth._chmod_quiet`, gains a `save_config()` that mirrors
+ `google_auth.py`'s `os.open`/`os.fchmod` 0o600 write pattern, and both
+ `save_config()` and `load_config()` make a best-effort `icacls` call on
+ Windows to restrict `~/.config/claude-seo/backlinks-api.json` to the
+ current user, since POSIX mode bits do not restrict NTFS ACLs (#290).
+ - 17 scripts raise `sys.exit(1)` at import time when an optional dependency
+ (`requests`, `bs4`, `playwright`, `googleapiclient`, `google.analytics`) is
+ missing. Any test module that imports one of these at module scope aborted
+ the whole pytest session on a minimal install instead of skipping. 8 of the
+ 17 (`bing_webmaster`, `commoncrawl_graph`, `crux_history`, `fetch_page`,
+ `moz_api`, `nlp_analyze`, `pagespeed_check`, `parse_html`) had test modules
+ that needed the guard (`gsc_query`'s 3 test modules already had it; the
+ other 8 of the 17 have no test module that imports them at module scope,
+ so nothing to guard). `url_safety.py` itself hard-requires `requests`
+ (by design), so every script that imports it transitively hits the same
+ failure; guarded those test modules too (`domain_history`,
+ `gbp_deprecation_lint`, `parasite_risk`, `agent_ux_check`/`render_page`,
+ `indexnow_submit`, `url_safety`'s own suite, and the new
+ `backlinks_auth` hardening tests). 17 test modules gained a
+ `pytest.importorskip` guard in total. Verified in a throwaway venv with
+ only `pytest` and `beautifulsoup4` installed: the suite completes (206
+ passed, 24 skipped, no errors).
+
## [2.2.6] - 2026-09-10
### Security
diff --cc SECURITY.md
index cedb972,c50adcf..0d5707b
--- a/SECURITY.md
+++ b/SECURITY.md
@@@ -56,16 -56,10 +56,16 @@@ claude-seo is a research and audit tool
## Known residual risks
- **Playwright + Chromium DNS rebinding.** Chromium does its own DNS resolution inside the renderer process. claude-seo's Python-layer DNS pin (`url_safety._pin_dns`) cannot reach it. The Playwright `route()` handler re-validates every subresource host (`make_safe_playwright_route_handler`), which closes the common case, but a true rebinding attacker can still race Chromium's resolver after our pre-flight returns. Mitigation: do not point `/seo` skills at untrusted sites with high-frequency redirects.
+- **CONNECT proxies weaken DNS pinning.** Behind a configured HTTP proxy (`HTTPS_PROXY` and friends) the proxy resolves the final host itself, so `url_safety`'s pin degrades to the pre-flight check in `validate_url_strict`; the proxy host itself is exempted from the pinned scope only after passing the same hostname blocklist and `is_safe_ip` policy as an audit target, so a proxy on loopback, RFC 1918, RFC 6598, link-local, or a metadata address is refused rather than exempted.
- **IPv6-only audit targets.** The strict validator queries `family=AF_INET` for the initial resolution. Hosts with AAAA records only will surface as "DNS resolution failed". This is **fail-closed** by design — we'd rather refuse than connect to an unvalidated IPv6 endpoint. Tracked for a future patch (full dual-stack pinning, similar to the Playwright handler which already uses `AF_UNSPEC`).
- - **Windows file permissions.** `os.fchmod(fd, 0o600)` is a no-op on Windows for non-ACL filesystems. Users on Windows should rely on per-user directory ACLs instead of POSIX mode bits.
+ - **Windows file permissions.** `os.fchmod(fd, 0o600)` is a no-op on Windows for non-ACL filesystems. Users on Windows should rely on per-user directory ACLs instead of POSIX mode bits. `scripts/backlinks_auth.py` additionally makes a best-effort `icacls <path> /inheritance:r /grant:r "%USERNAME%:F"` call after every write to (and load-time remediation of) `~/.config/claude-seo/backlinks-api.json`, restricting it to the current user on NTFS. This is best-effort only: a failure (missing `icacls`, a non-NTFS volume, a restricted shell) is logged as a warning and does not block the credential read or write, so on a failure the file's effective protection on Windows falls back to whatever the containing directory's ACLs already provide.
-- **RFC 6598 (100.64.0.0/10) is refused.** Cloud providers serve instance metadata in this range, so `url_safety` treats it like RFC 1918. Tailscale also allocates from it: a staging site reached over Tailscale cannot be audited with the default policy. There is no escape hatch yet; an explicit local-target allowlist is planned.
+- **RFC 6598 (100.64.0.0/10) is refused by default.** Cloud providers serve instance metadata in this range, so `url_safety` treats it like RFC 1918. Tailscale also allocates from it, so a staging site reached over Tailscale is refused under the default policy. The escape hatch is `CLAUDE_SEO_LOCAL_TARGETS`, a comma-separated allowlist of `host` or `host:port` entries (for example `localhost:3000,127.0.0.1:8080,100.101.102.103`, the last being a Tailscale address). Its scope is deliberately narrow:
+ - It is consulted **only** for the first, top-level URL passed to `validate_url` / `validate_url_strict`. Redirect targets, embedded subresources, and every request the Playwright route handler sees stay fail-closed, so a page served from an allowlisted dev server still cannot pull anything else off the local network. Rendering an allowlisted host through Playwright is therefore not supported; the raw-HTTP path is.
+ - A host must be named exactly. There is no range, wildcard, or "allow private" mode, `host:port` matches that port only, and a bare `host` matches any port on that host.
+ - Cloud metadata endpoints are refused even when listed, by name (`metadata.google.internal` and its siblings) and by address (169.254.169.254, `fd00:ec2::254`, and Alibaba's 100.100.100.200, which sits inside the Tailscale range). Link-local, multicast, unspecified, and reserved addresses are never allowlistable.
+ - `is_safe_ip` is unchanged and reads no environment, so every fail-closed path downstream of the first connection is unaffected.
+ - Unset, claude-seo behaves exactly as it did before the flag existed.
## Security-relevant code paths