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 pull request #378 from rudycelekli/fix/content-verify-citation-case

Agrici Danielfd51af3d887e
diff --cc tests/test_content_quality.py
index 4d87c0d,c6b3a97..0fc0dd7
--- a/tests/test_content_quality.py
+++ b/tests/test_content_quality.py
@@@ -312,23 -312,21 +312,38 @@@ def test_verify_empty_text_returns_zero
assert result["uncited_ratio"] == 0.0
+def test_verify_detects_a_bare_percentage_statistic() -> None:
+ # A bare percentage not followed by "of ..." is the canonical unsourced
+ # statistic this tool exists to flag. A trailing \b after "%" in the
+ # pattern could never match (a percentage is followed by a space or
+ # punctuation, both non-word), so these claims were silently missed.
+ for text in ("The bounce rate hit 85%.", "Conversions rose by 30% overall.",
+ "Prices rose 3.5% this quarter."):
+ result = content_verify.verify(text)
+ assert result["claim_count"] == 1, text
+ assert result["claims"][0]["kind"] == "statistic", text
+
+
+def test_verify_bare_percentage_does_not_double_count_percent_of() -> None:
+ # "47% of marketers" must still be one claim, not two (the longer
+ # "% of ..." match wins over the bare-"%" match on the same span).
+ result = content_verify.verify("47% of marketers report gains.")
+ assert result["claim_count"] == 1
+ 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
# ---------------------------------------------------------------------------