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(v2): Checkpoint 6 — local + international + privacy polish (Phase F)
Daniel08be6708a690
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex ef47489..dfcee55 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -69,7 +69,8 @@ jobs:python3 -m py_compile scripts/schema_generate.pypython3 -m py_compile scripts/schema_ecommerce_validate.pypython3 -m py_compile scripts/parasite_risk.py- echo "All 46 scripts passed syntax check"+ python3 -m py_compile scripts/gbp_deprecation_lint.py+ echo "All 47 scripts passed syntax check"test:name: Test suite (manifests + sync_flow)diff --git a/scripts/gbp_deprecation_lint.py b/scripts/gbp_deprecation_lint.pynew file mode 100755index 0000000..3d1c3bb--- /dev/null+++ b/scripts/gbp_deprecation_lint.py@@ -0,0 +1,157 @@+#!/usr/bin/env python3+"""+GBP feature-deprecation linter.++Google sunset two long-running Google Business Profile features:++ - **GBP chat + call history**: fully wound down 2024-07-31. Any page+ that still surfaces a "Message us via Google" CTA or wires up a+ GBP-chat widget is broken.+ - **`*.business.site` GBP websites**: shut down March 2024; redirects+ expired 2024-06-10. References to these URLs in citations or+ internal navigation are dead links.++This script scans HTML for both patterns and emits a structured report+so the seo-local audit can include "remove deprecated GBP references"+as a Critical finding.++Usage::++ python scripts/gbp_deprecation_lint.py https://example.com+ python scripts/gbp_deprecation_lint.py page.html --file+ python scripts/gbp_deprecation_lint.py https://example.com --json++Exit code 0 if no deprecated patterns found, 1 otherwise.+"""++from __future__ import annotations++import argparse+import json+import os+import re+import sys+from pathlib import Path++_SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))+if _SCRIPTS_DIR not in sys.path:+ sys.path.insert(0, _SCRIPTS_DIR)+from url_safety import URLSafetyError, safe_requests_get # noqa: E402+++# Patterns for retired GBP chat. The "Message" / "Chat" CTAs alone are+# common on commercial sites — we only flag when they appear NEAR a+# Google-business-related signal in the same DOM neighbourhood.+_GBP_CHAT_CTAS = re.compile(+ r"\bmessage\s+us\s+(?:on|via|through)\s+google\b"+ r"|\bchat\s+(?:on|via|with)\s+google\s+(?:business|maps)\b"+ r"|\bgoogle\s+business\s+chat\b"+ r"|\bgoogle[-\s]?business[-\s]?messages?\b",+ re.IGNORECASE,+)+++# Deprecated GBP-hosted websites: business.site, .business.google.com.+# Both patterns match anywhere in HTML (links, citations, schema sameAs).+_BUSINESS_SITE_URL = re.compile(+ r"https?://[^/\s\"']+\.business\.site(?:/[^\s\"']*)?",+ re.IGNORECASE,+)+++# GBP Q&A deprecated December 2025; replaced by "Ask Maps Gemini AI".+# Sites with their own Q&A widgets are fine; we flag *embedded* GBP Q&A.+_GBP_QA_EMBED = re.compile(+ r"\b(?:google[-\s]?business[-\s]?(?:q&?a|questions)|maps[-\s]?q&?a)\b",+ re.IGNORECASE,+)+++def scan(html: str) -> dict:+ """Find every deprecated GBP feature reference in the HTML."""+ chat_matches = sorted(set(_GBP_CHAT_CTAS.findall(html)))+ business_site_matches = sorted(set(_BUSINESS_SITE_URL.findall(html)))+ qa_matches = sorted(set(_GBP_QA_EMBED.findall(html)))++ findings: list[dict] = []+ for hit in chat_matches:+ findings.append({+ "severity": "Critical",+ "feature": "gbp-chat",+ "match": hit[:200],+ "message": "GBP chat / call-history features were fully sunset "+ "2024-07-31. The CTA does nothing and breaks user "+ "trust. Remove or replace with a working channel "+ "(phone, web form, SMS, etc.).",+ })+ for url in business_site_matches:+ findings.append({+ "severity": "High",+ "feature": "business-site-url",+ "match": url,+ "message": "*.business.site URLs were shut down March 2024 and "+ "redirects expired 2024-06-10. This link is now dead. "+ "Update to your actual site URL.",+ })+ for hit in qa_matches:+ findings.append({+ "severity": "Medium",+ "feature": "gbp-qa-embed",+ "match": hit[:200],+ "message": "Embedded Google Business Q&A was retired December "+ "2025 in favour of 'Ask Maps Gemini AI'. The embed "+ "may render empty. Replace with an on-page FAQ "+ "(but note FAQPage rich result is government/"+ "healthcare only since Aug 2023).",+ })++ return {+ "ok": not findings,+ "findings": findings,+ "summary": {+ "critical": sum(1 for f in findings if f["severity"] == "Critical"),+ "high": sum(1 for f in findings if f["severity"] == "High"),+ "medium": sum(1 for f in findings if f["severity"] == "Medium"),+ },+ }+++def main() -> int:+ parser = argparse.ArgumentParser(+ description="GBP deprecation linter (chat + business.site + Q&A)."+ )+ parser.add_argument("source", help="URL, or file path with --file.")+ parser.add_argument("--file", action="store_true",+ help="Treat source as a local file path, not a URL.")+ parser.add_argument("--json", action="store_true")+ args = parser.parse_args()++ if args.file:+ html = Path(args.source).read_text(encoding="utf-8", errors="replace")+ else:+ try:+ resp = safe_requests_get(args.source, timeout=20)+ html = resp.text+ except URLSafetyError as exc:+ print(f"Error: url_safety: {exc}", file=sys.stderr)+ return 2++ result = scan(html)++ if args.json:+ json.dump(result, sys.stdout, indent=2)+ sys.stdout.write("\n")+ else:+ status = "PASS" if result["ok"] else "FAIL"+ s = result["summary"]+ print(f"GBP deprecation lint: {status} "+ f"({s['critical']} critical, {s['high']} high, {s['medium']} medium)")+ for f in result["findings"]:+ print(f" [{f['severity']:<8}] {f['feature']}: {f['match']!r}")+ print(f" {f['message']}")++ return 0 if result["ok"] else 1+++if __name__ == "__main__":+ sys.exit(main())diff --git a/skills/seo-google/references/dma-consent-mode-v2.md b/skills/seo-google/references/dma-consent-mode-v2.mdnew file mode 100644index 0000000..5986294--- /dev/null+++ b/skills/seo-google/references/dma-consent-mode-v2.md@@ -0,0 +1,60 @@+# DMA + Consent Mode v2 — click-through impact diagnostic++EU traffic flowing through Google Search has been subject to the+**Digital Markets Act** since 2024-03-07. The DMA limits how Google+can use behavioural data and forces consent-mode v2 compliance for+GA4 + Ads in EU. The operational effect for SEO audits:++- EU click-through-rate (CTR) data from Search Console is materially+ noisier after the DMA enforcement date. Year-over-year CTR+ comparisons across that boundary are not apples-to-apples.+- GA4 organic-traffic reports for EU users show systematic+ under-reporting when consent-mode v2 is configured as "denied for+ ad_storage, granted for analytics_storage" (the typical EU default).+ Conversion modelling fills the gap, but the raw counts are lower+ than pre-2024.++## What the seo-google skill should do++1. **When pulling GSC search analytics for an EU-targeted property**,+ note: "EU CTR comparisons before/after 2024-03-07 are not+ apples-to-apples (DMA + consent-mode v2 took effect)."+2. **When pulling GA4 organic traffic**, surface the consent-mode+ configuration if the GA4 admin API exposes it. If the property+ has `eu_data_collection_disabled` or denies ad_storage by default,+ note "EU traffic counts are conservative; conversion-modelled+ uplift may apply."+3. **Do not lecture the user on cookie consent UX** — that's a legal+ team / engineering concern outside SEO scope. Just attach the+ diagnostic note.++## Required GA4 / Consent Mode setup the audit should check for++- GA4 4.x consent-mode v2 wired up (`gtag('consent', 'default', ...)`+ before any pageview).+- `ads_data_redaction` flag set on EU traffic.+- Server-side tagging at consent transitions (recommended pattern;+ not legally required).++## Softening cookieless-attribution warnings++Google **abandoned** third-party cookie deprecation in July 2024 and+confirmed in April 2025 that Chrome will not ship a standalone cookie+prompt. The "cookieless future" framing is no longer urgent.++For audits as of May 2026:++- Do NOT recommend "switch to cookieless attribution" as a priority.+- DO recommend "implement consent-mode v2 + server-side tagging" for+ EU compliance + signal-loss recovery.+- Privacy Sandbox APIs are still available, but optional. Mention+ only if the audit subject is consumer-facing and has heavy+ retargeting dependence.++## Primary sources++- DMA enforcement: https://digital-markets-act.ec.europa.eu/+- Google's third-party cookie reversal: https://privacysandbox.com/news/privacy-sandbox-update-jul-2024+- Consent Mode v2 spec: https://support.google.com/google-ads/answer/14411014++Last verified: 2026-05-17.diff --git a/skills/seo-hreflang/references/machine-translation-qa.md b/skills/seo-hreflang/references/machine-translation-qa.mdnew file mode 100644index 0000000..b575cce--- /dev/null+++ b/skills/seo-hreflang/references/machine-translation-qa.md@@ -0,0 +1,53 @@+# Machine-translation QA flag (Jan 2025 QRG)++Google's January 23, 2025 Quality Rater Guidelines update added+explicit language about **machine-translated content with no human+review** as a form of scaled content abuse (§4.6.5).++> "Using automated tools (generative AI or otherwise) as a low-effort+> way to produce many pages that add little-to-no value."++Machine-translated content is fine **when reviewed by a human+speaker and corrected**. Untranslated MT — or "lightly post-edited"+output that still contains hallucinated terms, wrong gender/number+agreement, or untranslated proper nouns — is treated as scaled+content abuse.++## Signals the seo-hreflang audit should surface++| Signal | Severity | Notes |+|---|---|---|+| Multiple `hreflang` alternates point to URLs whose content is identical except for header chrome | Critical | Indicates the body wasn't translated; just template wrapped. |+| `lang="xx"` attribute on `<html>` doesn't match the body language | High | Translation pipeline output without a final QA step. |+| Auto-translated `<meta name="description">` longer than 160 chars (untrimmed) | Medium | The translator overran the snippet limit — no human reviewer caught it. |+| `lang` attribute is `auto` or missing entirely | Medium | Pages that don't declare their language confuse hreflang + AI crawlers. |+| Untranslated proper nouns or product names sprinkled in body | Low (heuristic) | Common MT failure mode; hard to detect automatically. |+| Schema.org `inLanguage` field absent or wrong | Medium | Multi-language audits should cross-check `inLanguage` vs. body. |++## What the audit should NOT flag++- Sites that have a few MT pages clearly labelled as MT (a+ human-translation-fallback pattern). Google's QRG explicitly+ permits MT *when honestly labelled and clearly scoped*.+- Machine-translated UI strings — those are i18n, not "content".+- Content with `lang="auto"` if the audit can't fetch a fallback+ signal (be conservative; don't claim what we can't verify).++## Cross-skill delegation++- For per-page hreflang validation, stay inside `seo-hreflang`.+- For broader scaled-content scoring (entropy of translated pages,+ AI-pattern detection in body), defer to `seo-content` via+ `python scripts/content_quality.py`.+- For "is this translated by Google's own auto-translate widget"+ detection, look for the `.goog-te-banner-frame` iframe; auto-+ translate widgets are explicitly exempted from MT-scaled-content+ abuse but produce poor passage-citability anyway.++## Primary sources++- Jan 2025 QRG §4.6.5: https://services.google.com/fh/files/misc/hsw-sqrg.pdf+- John Mueller on MT (multiple SOTR episodes, 2024-2025): MT is OK+ when reviewed by a human; bulk MT without review is abuse.++Last verified: 2026-05-17.diff --git a/tests/test_gbp_lint_and_polish.py b/tests/test_gbp_lint_and_polish.pynew file mode 100644index 0000000..f1674f7--- /dev/null+++ b/tests/test_gbp_lint_and_polish.py@@ -0,0 +1,115 @@+"""+Tests for v2 Checkpoint 6 (Phase F — local + international + privacy polish):+ scripts/gbp_deprecation_lint.py+ skills/seo-google/references/dma-consent-mode-v2.md+ skills/seo-hreflang/references/machine-translation-qa.md+"""++from __future__ import annotations++import os+import sys+from pathlib import Path++import pytest++_REPO = Path(__file__).resolve().parents[1]+_SCRIPTS = _REPO / "scripts"+if str(_SCRIPTS) not in sys.path:+ sys.path.insert(0, str(_SCRIPTS))++import gbp_deprecation_lint as gbp # noqa: E402+++# ---------------------------------------------------------------------------+# gbp_deprecation_lint+# ---------------------------------------------------------------------------+++def test_clean_page_returns_ok() -> None:+ result = gbp.scan("<html><body>Contact us at +1-555-1234.</body></html>")+ assert result["ok"] is True+ assert result["findings"] == []+++def test_detects_gbp_chat_cta() -> None:+ html = '<a class="cta">Message us on Google</a>'+ result = gbp.scan(html)+ assert result["ok"] is False+ feats = {f["feature"] for f in result["findings"]}+ assert "gbp-chat" in feats+ assert result["summary"]["critical"] >= 1+++def test_detects_business_site_url() -> None:+ html = '<a href="https://shopname-456.business.site/menu">our menu</a>'+ result = gbp.scan(html)+ feats = {f["feature"] for f in result["findings"]}+ assert "business-site-url" in feats+ assert result["summary"]["high"] >= 1+++def test_detects_gbp_qa_embed() -> None:+ html = '<div data-google-business-qa>...</div>'+ result = gbp.scan(html)+ feats = {f["feature"] for f in result["findings"]}+ assert "gbp-qa-embed" in feats+++def test_does_not_flag_generic_chat_widget() -> None:+ """Intercom / drift / custom chat widgets are fine — we only flag GBP-chat."""+ html = '<div id="intercom"><button>Message us</button></div>'+ result = gbp.scan(html)+ feats = {f["feature"] for f in result["findings"]}+ assert "gbp-chat" not in feats+++def test_summary_counts_match_findings() -> None:+ html = (+ '<a href="https://x.business.site/">a</a>'+ '<a href="https://y.business.site/">b</a>'+ '<span>Message us on Google</span>'+ )+ result = gbp.scan(html)+ s = result["summary"]+ assert s["critical"] + s["high"] + s["medium"] == len(result["findings"])+ assert s["critical"] >= 1+ assert s["high"] >= 1 # at least one of the .business.site URLs+++# ---------------------------------------------------------------------------+# DMA + consent-mode v2 reference+# ---------------------------------------------------------------------------+++def test_dma_reference_exists_and_cites_primary_sources() -> None:+ path = _REPO / "skills" / "seo-google" / "references" / "dma-consent-mode-v2.md"+ assert path.is_file()+ text = path.read_text(encoding="utf-8")+ assert "DMA" in text+ assert "consent" in text.lower()+ assert "third-party cookie" in text.lower()+ assert "2024-03-07" in text or "Mar" in text+ # Must cite an official EC URL.+ assert "digital-markets-act.ec.europa.eu" in text+ # Must explicitly soften cookieless framing per the gap analysis.+ assert "abandoned" in text.lower() or "reversal" in text.lower() or \+ "no longer urgent" in text.lower()+++# ---------------------------------------------------------------------------+# Machine-translation QA reference+# ---------------------------------------------------------------------------+++def test_mt_qa_reference_exists_and_cites_qrg() -> None:+ path = _REPO / "skills" / "seo-hreflang" / "references" / "machine-translation-qa.md"+ assert path.is_file()+ text = path.read_text(encoding="utf-8")+ assert "Jan" in text and "2025" in text+ assert "§4.6.5" in text or "4.6.5" in text+ # Primary source link must point at Google.+ assert "services.google.com" in text+ # Must list at least one signal table.+ assert "hreflang" in text.lower()+ assert "scaled content abuse" in text.lower()