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.

fix(drift): recognize none as a noindex directive

Afloatf9201f978c7f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 648be42..b23a7d5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Fixed
+
+- Recognize the `none` robots directive as an indexing restriction in drift comparisons.
+
## [2.5.0] - 2026-10-22
Security and accuracy fixes from a full audit, and Claude Desktop installs again.
diff --git a/scripts/drift_compare.py b/scripts/drift_compare.py
index 43b5e3b..b2a8a87 100644
--- a/scripts/drift_compare.py
+++ b/scripts/drift_compare.py
@@ -14,6 +14,7 @@ Output: JSON with diffs, severity levels, and recommended actions.
import argparse
import json
import os
+import re
import sqlite3
import sys
from datetime import datetime, timezone
@@ -184,9 +185,15 @@ def rule_03_canonical_removed(baseline: dict, current: dict) -> dict:
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
+ def directives(value: str) -> set[str]:
+ # A parameter value such as max-image-preview: none is not a directive.
+ standalone = re.sub(r"\b[\w-]+\s*:\s*[^,\s]+", "", value.lower())
+ return set(re.split(r"[,\s]+", standalone))
+
+ old_robots = directives(baseline.get("robots") or "")
+ new_robots = directives(current.get("meta_robots") or "")
+ blocking = {"noindex", "none"}
+ triggered = not bool(old_robots & blocking) and bool(new_robots & blocking)
return _make_finding(
"noindex_added", "CRITICAL", triggered,
baseline.get("robots"), current.get("meta_robots"),
diff --git a/tests/test_drift_robots_directives.py b/tests/test_drift_robots_directives.py
new file mode 100644
index 0000000..c16987b
--- /dev/null
+++ b/tests/test_drift_robots_directives.py
@@ -0,0 +1,49 @@
+"""Noindex drift follows robots directives, including the none shorthand."""
+
+import sys
+from pathlib import Path
+
+import pytest
+
+sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts"))
+
+from drift_compare import rule_04_noindex_added # noqa: E402
+
+
[email protected]("current", ["none", "NONE", " none , max-snippet:0"])
+def test_none_added_blocks_indexing(current):
+ result = rule_04_noindex_added({"robots": "index, follow"}, {"meta_robots": current})
+ assert result["triggered"] is True
+ assert result["severity"] == "CRITICAL"
+
+
[email protected]("previous", ["none", "NONE", "noindex, nofollow"])
+def test_equivalent_existing_restriction_is_not_new(previous):
+ result = rule_04_noindex_added({"robots": previous}, {"meta_robots": "noindex"})
+ assert result["triggered"] is False
+
+
[email protected]("current", [
+ "max-image-preview:none", "max-image-preview: none",
+ "max-image-preview: none, follow", "not-noindex", "index, follow",
+])
+def test_values_or_substrings_are_not_noindex_directives(current):
+ assert rule_04_noindex_added({}, {"meta_robots": current})["triggered"] is False
+
+
+def test_comma_separated_noindex_still_triggers():
+ assert rule_04_noindex_added({}, {"meta_robots": "follow, NOINDEX"})["triggered"] is True
+
+
[email protected]("current", [
+ "follow none", "max-image-preview: none noindex",
+ "max-image-preview: none, NOINDEX",
+])
+def test_parameter_values_do_not_hide_an_independent_directive(current):
+ assert rule_04_noindex_added({}, {"meta_robots": current})["triggered"] is True
+
+
+def test_previous_parameter_value_does_not_hide_a_new_restriction():
+ assert rule_04_noindex_added(
+ {"robots": "max-image-preview: none"}, {"meta_robots": "none"},
+ )["triggered"] is True