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.
fix: validate JSON-LD type arrays
惠岩528a3738f089
diff --git a/hooks/validate-schema.py b/hooks/validate-schema.pyindex 9b3bb0f..49b4c74 100755--- a/hooks/validate-schema.py+++ b/hooks/validate-schema.py@@ -217,8 +217,10 @@ def _validate_schema_object(for placeholder in BARE_PLACEHOLDER_RE.findall(text):errors.append(f"{prefix}: Contains placeholder text: {placeholder}")- # Check for deprecated types- schema_type = obj.get("@type", "")+ # Check for deprecated types. Schema.org permits multiple values in @type.+ raw_schema_type = obj.get("@type", "")+ schema_types = raw_schema_type if isinstance(raw_schema_type, list) else [raw_schema_type]+ schema_types = [schema_type for schema_type in schema_types if isinstance(schema_type, str)]deprecated = {"HowTo": "deprecated September 2023","SpecialAnnouncement": "deprecated July 31, 2025",@@ -228,16 +230,20 @@ def _validate_schema_object("ClaimReview": "retired June 2025; fact-check rich results discontinued","VehicleListing": "retired June 2025; vehicle listing structured data discontinued",}- if schema_type in deprecated:- errors.append(f"{prefix}: @type '{schema_type}' is {deprecated[schema_type]}")+ for schema_type in schema_types:+ if schema_type in deprecated:+ errors.append(f"{prefix}: @type '{schema_type}' is {deprecated[schema_type]}")# Check for restricted types used incorrectly.# FAQPage is intentionally NOT flagged: Google retired FAQ rich results for# all sites (May 7, 2026), but FAQPage remains a valid Schema.org type.# This project makes no claim of a confirmed AI or ranking benefit.restricted: dict = {}- if schema_type in restricted:- errors.append(f"{prefix}: @type '{schema_type}' is {restricted[schema_type]}; verify site qualifies")+ for schema_type in schema_types:+ if schema_type in restricted:+ errors.append(+ f"{prefix}: @type '{schema_type}' is {restricted[schema_type]}; verify site qualifies"+ )if "@graph" in obj:if not isinstance(graph, list):diff --git a/tests/test_schema_hook_policy.py b/tests/test_schema_hook_policy.pyindex a3e1012..8f4e67d 100644--- a/tests/test_schema_hook_policy.py+++ b/tests/test_schema_hook_policy.py@@ -93,6 +93,25 @@ def test_deprecated_graph_member_still_blocks(tmp_path: Path) -> None:assert _run_payload(tmp_path, payload).returncode == 2+def test_schema_type_array_is_validated_without_crashing(tmp_path: Path) -> None:+ payload = {+ "@context": "https://schema.org",+ "@type": ["Organization", "LocalBusiness"],+ "name": "Example",+ }+ result = _run_payload(tmp_path, payload, capture_output=True, encoding="utf-8")+ assert _clean(result)+++def test_deprecated_type_inside_array_is_still_blocked(tmp_path: Path) -> None:+ payload = {+ "@context": "https://schema.org",+ "@type": ["Organization", "HowTo"],+ "name": "Example",+ }+ assert _run_payload(tmp_path, payload).returncode == 2++def test_non_object_graph_members_are_reported_without_crashing(tmp_path: Path) -> None:payload = {"@context": "https://schema.org",