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(content-verify): keep the citation Proper-Noun anchor case-sensitive

Rudy Celekli0f21b5008606
diff --git a/scripts/content_verify.py b/scripts/content_verify.py
index a34c205..147b3d0 100644
--- a/scripts/content_verify.py
+++ b/scripts/content_verify.py
@@ -100,7 +100,7 @@ _CITATION_PATTERNS: tuple[re.Pattern, ...] = (
# "Source:", "Via:", "See also:", "Cited in", "Cited by", or
# "Per/According to" followed by a Proper Noun.
r"\b(?:source\s*:|via\s*:|see\s+also\s*:|cited\s+(?:in|by)|"
- r"according\s+to|per)\s+[A-Z]",
+ r"according\s+to|per)\s+(?-i:[A-Z])",
re.IGNORECASE,
),
)
diff --git a/tests/test_content_quality.py b/tests/test_content_quality.py
index b6e7b63..c6b3a97 100644
--- a/tests/test_content_quality.py
+++ b/tests/test_content_quality.py
@@ -312,6 +312,23 @@ def test_verify_empty_text_returns_zero_claims() -> None:
assert result["uncited_ratio"] == 0.0
+def test_verify_standalone_per_followed_by_a_common_word_is_not_a_citation() -> None:
+ # The citation pattern requires "per"/"according to" + a Proper Noun, but
+ # re.IGNORECASE made the [A-Z] anchor match lowercase too, so "per week",
+ # "per page", "according to the ..." were counted as citations. A claim
+ # near such a phrase was then wrongly reported as cited.
+ result = content_verify.verify("Fully 80% of users churned, measured per week.")
+ assert result["claim_count"] == 1
+ claim = result["claims"][0]
+ assert claim["has_citation"] is False
+ assert result["uncited_count"] == 1
+
+
+def test_verify_per_followed_by_a_proper_noun_is_still_a_citation() -> None:
+ result = content_verify.verify("Fully 80% of users churned, per Gartner.")
+ assert result["claims"][0]["has_citation"] is True
+
+
# ---------------------------------------------------------------------------
# seo_updates
# ---------------------------------------------------------------------------