Skip to content

Commit 0a5aa36

Browse files
AgriciDanielclaude
andcommitted
feat: v1.8.0 — free backlink data integration (Moz, Bing, Common Crawl, verification crawler)
Transform /seo backlinks from paid-only (DataForSEO) to a 3-tier free-to-premium system: - Tier 0 (zero config): Common Crawl web graph + backlink verification crawler - Tier 1-2 (free signup): Moz API (DA/PA/spam) + Bing Webmaster (competitor comparison) - Tier 3 (paid): DataForSEO extension (unchanged, fully backward compatible) New scripts (6): backlinks_auth.py, moz_api.py, bing_webmaster.py, commoncrawl_graph.py, verify_backlinks.py, validate_backlink_report.py New agent: seo-backlinks.md (tier-based workflow, confidence-weighted scoring) New reference: free-backlink-sources.md (source comparison, methodology) Data accuracy safeguards: - JS-rendering detection (unverifiable_js status for Instagram/Facebook/SPAs) - @graph JSON-LD flattening in parse_html.py (prevents false "malformed schema") - Suspicious H1 flagging (counters/stats not reported as headings) - Data sufficiency gate (no misleading numeric scores with <4/7 factors) - Automated pre-delivery validator (6 programmatic checks) - SSRF protection on all user URLs including competitor_url Tested with real data: google.com (PageRank #1), github.com (#24), 21collagen.com, collagenwise.ro. 48/48 CLAUDE.md rule checks passed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ecceb26 commit 0a5aa36

15 files changed

Lines changed: 3343 additions & 122 deletions

.claude-plugin/plugin.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-seo",
3-
"version": "1.7.2",
3+
"version": "1.8.0",
44
"description": "Comprehensive SEO analysis skill for Claude Code. Covers technical SEO, content quality (E-E-A-T), schema markup, image optimization, sitemap architecture, AI search optimization (GEO), local SEO (GBP, citations, reviews, map pack), maps intelligence, and strategic planning across all industries.",
55
"author": {
66
"name": "AgriciDaniel",
@@ -25,6 +25,11 @@
2525
"google-search-console",
2626
"pagespeed",
2727
"crux",
28-
"ga4"
28+
"ga4",
29+
"backlinks",
30+
"moz",
31+
"bing-webmaster",
32+
"common-crawl",
33+
"backlink-verification"
2934
]
3035
}

CLAUDE.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This repository contains **Claude SEO**, a Tier 4 Claude Code skill for comprehensive
66
SEO analysis across all industries. It follows the Agent Skills open standard and the
77
3-layer architecture (directive, orchestration, execution). 17 core sub-skills (+ 3
8-
extensions), 10 core subagents (+ 2 extension agents), and an extensible reference
8+
extensions), 11 core subagents (+ 2 extension agents, 13 total), and an extensible reference
99
system cover technical SEO, content quality,
1010
schema markup, image optimization, sitemap architecture, AI search optimization,
1111
local SEO (GBP, citations, reviews, map pack), and maps intelligence (geo-grid
@@ -17,12 +17,12 @@ rank tracking, GBP auditing, review intelligence, competitor radius mapping).
1717
claude-seo/
1818
CLAUDE.md # Project instructions (this file)
1919
.claude-plugin/
20-
plugin.json # Plugin manifest (v1.7.2)
20+
plugin.json # Plugin manifest (v1.8.0)
2121
marketplace.json # Marketplace catalog for distribution
2222
skills/ # 19 skills (auto-discovered)
2323
seo/ # Main orchestrator skill
2424
SKILL.md # Entry point, routing table, core rules
25-
references/ # On-demand knowledge files (10 files)
25+
references/ # On-demand knowledge files (12 files)
2626
seo-audit/SKILL.md # Full site audit with parallel agents
2727
seo-page/SKILL.md # Deep single-page analysis
2828
seo-technical/SKILL.md # Technical SEO (9 categories)
@@ -45,7 +45,7 @@ claude-seo/
4545
seo-image-gen/ # AI image generation for SEO assets (extension mirror)
4646
SKILL.md
4747
references/ # Image gen reference files (7 files)
48-
agents/ # 12 subagents (auto-discovered)
48+
agents/ # 13 subagents (auto-discovered)
4949
seo-technical.md # Crawlability, indexability, security
5050
seo-content.md # E-E-A-T, readability, thin content
5151
seo-schema.md # Structured data validation
@@ -56,12 +56,18 @@ claude-seo/
5656
seo-local.md # GBP, NAP, citations, reviews, local schema
5757
seo-maps.md # Geo-grid, GBP audit, reviews, competitor radius
5858
seo-google.md # Google API analyst (CrUX, GSC, GA4)
59+
seo-backlinks.md # Backlink profile analyst (Moz, Bing, CC, verify)
5960
seo-dataforseo.md # DataForSEO data analyst
6061
seo-image-gen.md # SEO image audit analyst
6162
hooks/ # Quality gate hooks
6263
hooks.json # PostToolUse schema validation
63-
scripts/ # Python execution scripts (15 tracked + 1 dev-only)
64+
scripts/ # Python execution scripts (20 tracked + 2 dev-only)
6465
google_auth.py # Credential management (OAuth, SA, API key, 4-tier detection)
66+
backlinks_auth.py # Backlink API credential management (Moz, Bing)
67+
moz_api.py # Moz Link Explorer API (DA/PA, spam, domains, anchors)
68+
bing_webmaster.py # Bing Webmaster Tools API (links, competitor comparison)
69+
commoncrawl_graph.py # Common Crawl web graph parser (PageRank, in-degree)
70+
verify_backlinks.py # Backlink existence verification crawler
6571
pagespeed_check.py # PSI v5 + CrUX API
6672
crux_history.py # CrUX History API (25-week trends)
6773
gsc_query.py # Search Console (queries, pages, sitemaps, sites)
@@ -104,7 +110,9 @@ claude-seo/
104110
| `/seo maps [command] [args]` | Maps intelligence (geo-grid, GBP audit, reviews, competitors) |
105111
| `/seo hreflang <url>` | International SEO / hreflang audit |
106112
| `/seo google [command] [url]` | Google SEO APIs (GSC, PageSpeed, CrUX, Indexing, GA4) |
107-
| `/seo backlinks <url>` | Backlink profile analysis (requires DataForSEO extension) |
113+
| `/seo backlinks <url>` | Backlink profile analysis (free: Moz, Bing, CC; premium: DataForSEO) |
114+
| `/seo backlinks setup` | Setup instructions for free backlink APIs |
115+
| `/seo backlinks verify <url>` | Verify known backlinks still exist |
108116
| `/seo firecrawl [command] <url>` | Full-site crawling and site mapping (extension) |
109117
| `/seo dataforseo [command]` | Live SEO data via DataForSEO MCP (extension) |
110118
| `/seo image-gen [use-case] <desc>` | AI image generation for SEO assets (extension) |
@@ -125,7 +133,7 @@ claude-seo/
125133
- **URL validation**: All scripts that accept user URLs must call `validate_url()` from `google_auth.py` before making API calls. This blocks private IPs, loopback, and GCP metadata endpoints (SSRF protection).
126134
- **OAuth tokens**: Never store `client_secret` in the token file. Read it from the client_secret.json file at runtime.
127135
- **No hardcoded paths**: Use `os.path.dirname(os.path.abspath(__file__))` for relative paths, never `/home/username/...`
128-
- **Config location**: `~/.config/claude-seo/google-api.json` (user-space, not in repo)
136+
- **Config location**: `~/.config/claude-seo/google-api.json` and `~/.config/claude-seo/backlinks-api.json` (user-space, not in repo)
129137

130138
## Report Generation Rules
131139

agents/seo-backlinks.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
name: seo-backlinks
3+
description: Backlink profile analyst using free and paid sources. Fetches data from Moz API, Bing Webmaster Tools, Common Crawl web graphs, and verification crawler. Merges multi-source data with confidence-weighted scoring.
4+
model: sonnet
5+
maxTurns: 20
6+
tools: Read, Bash, Write, Glob, Grep
7+
---
8+
9+
You are a backlink profile analyst. When delegated tasks during an SEO audit:
10+
11+
1. Check credentials: `python scripts/backlinks_auth.py --check --json`
12+
2. Determine tier (0 = CC+verify, 1 = +Moz, 2 = +Bing, 3 = +DataForSEO)
13+
3. Run all available sources for the target domain
14+
4. Merge results with confidence weighting
15+
5. Format output to match claude-seo conventions
16+
17+
## Tier-Based Workflow
18+
19+
### Tier 0 (Always Available — No Config Needed)
20+
- Common Crawl domain metrics: `python scripts/commoncrawl_graph.py <domain> --json`
21+
- In-degree, PageRank, harmonic centrality, top referring domains
22+
- If known backlinks provided, verify them: `python scripts/verify_backlinks.py --target <url> --links <file> --json`
23+
- Report domain-level metrics with **confidence: 0.50** note
24+
- At Tier 0, fewer than 4 scoring factors have data — report **INSUFFICIENT DATA**, not a numeric score
25+
- Never produce a misleading numeric score when most factors lack data sources
26+
27+
### Tier 1 (+ Moz API)
28+
- All Tier 0 checks
29+
- Moz URL metrics: `python scripts/moz_api.py metrics <url> --json`
30+
- DA, PA, Spam Score, link counts, referring domains
31+
- Moz referring domains: `python scripts/moz_api.py domains <url> --json`
32+
- Moz anchor text: `python scripts/moz_api.py anchors <url> --json`
33+
- Moz top pages: `python scripts/moz_api.py pages <domain> --json`
34+
- **Rate limit:** 1 request per 10 seconds (built into script). Plan calls carefully.
35+
- Report metrics with **confidence: 0.85** note
36+
37+
### Tier 2 (+ Bing Webmaster)
38+
- All Tier 1 checks
39+
- Bing inbound links: `python scripts/bing_webmaster.py links <url> --json`
40+
- For competitor gap: `python scripts/bing_webmaster.py compare <url1> <url2> --json`
41+
- Report with **confidence: 0.70** for Bing data
42+
- Bing's unique competitor comparison is especially valuable for gap analysis
43+
44+
### Tier 3 (+ DataForSEO — Premium)
45+
- If DataForSEO MCP tools are available, use them for highest-fidelity data
46+
- DataForSEO data gets **confidence: 1.00**
47+
- Combine with free source data for cross-validation
48+
- When DataForSEO and Moz disagree, trust DataForSEO but note the discrepancy
49+
50+
## Confidence-Weighted Scoring
51+
52+
Apply source confidence when calculating the Backlink Health Score (0-100):
53+
54+
| Factor | Weight | Sources (by preference) |
55+
|--------|--------|------------------------|
56+
| Referring domain count | 20% | DataForSEO > Moz > CC in-degree |
57+
| Domain quality distribution | 20% | DataForSEO > Moz DA distribution |
58+
| Anchor text naturalness | 15% | DataForSEO > Moz anchors > Bing anchors |
59+
| Toxic link ratio | 20% | DataForSEO > Moz spam score > verify crawler |
60+
| Link velocity trend | 10% | DataForSEO only (free sources lack this) |
61+
| Follow/nofollow ratio | 5% | DataForSEO > Bing link details |
62+
| Geographic relevance | 10% | DataForSEO > Bing country data |
63+
64+
If a factor has no data source available, redistribute its weight proportionally
65+
across remaining factors. Always note which factors were scored and which were skipped.
66+
67+
## Cross-Skill Delegation
68+
69+
- For toxic link patterns beyond basic Moz Spam Score, load `references/backlink-quality.md`
70+
- For anchor text industry benchmarks, load `references/backlink-quality.md`
71+
- Do NOT duplicate seo-content analysis. Recommend `/seo content <url>` for E-E-A-T.
72+
- Do NOT duplicate seo-technical analysis. Recommend `/seo technical <url>` for crawlability.
73+
74+
## Output Format
75+
76+
Match existing claude-seo patterns:
77+
- Tables for metrics with pass/warn/fail ratings
78+
- Scores as XX/100 with source confidence noted
79+
- Priority: Critical > High > Medium > Low
80+
- Note data source for every metric: "Moz API (confidence: 0.85)" or "Common Crawl (domain-level, confidence: 0.50)"
81+
- Include data freshness notes (Moz: ~3 days, Bing: near-realtime, CC: quarterly)
82+
83+
## Pre-Delivery Review (MANDATORY)
84+
85+
Before returning results, run the automated validator AND manual checks.
86+
87+
### Step 1: Automated validation
88+
Save all collected data to a JSON file and run:
89+
```bash
90+
python scripts/validate_backlink_report.py --report report_data.json --json
91+
```
92+
The validator checks: schema claims, JS false negatives, H1 accuracy, reciprocal links,
93+
CC interpretation, and health score sufficiency. If status is "FAIL", fix errors before proceeding.
94+
95+
### Step 2: Manual checks (not automatable)
96+
1. **Every claim has a source label**: "Parsed (0.95)", "CC (0.50)", "Verify (0.95)".
97+
2. **No inferences presented as facts**: If you didn't directly observe it, don't state it as certain.
98+
3. **Platform detection**: Confirm by checking actual HTML signals (wp-content, shopify CDN, etc.), not guessing.
99+
4. **Outbound vs inbound consistency**: Homepage outbound count should match what you actually observed.
100+
101+
If any check fails, fix the report before returning it.
102+
103+
## Error Handling
104+
105+
- If Moz rate-limits mid-analysis, return partial data and note "rate_limited: true"
106+
- If Common Crawl download times out, skip CC metrics and note the timeout
107+
- If no sources return data, report: "No backlink data available. Run `/seo backlinks setup`."
108+
- Never fail silently — always report what succeeded and what failed
109+
- If all free sources fail, suggest DataForSEO extension: `./extensions/dataforseo/install.sh`

0 commit comments

Comments
 (0)