From claude-seo
Analyzes SEO backlink profiles: referring domains, anchor text distribution, toxic links, competitor gaps. Uses free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO.
npx claudepluginhub agricidaniel/claude-seo --plugin claude-seoThis skill uses the workspace's default tool permissions.
Before analysis, detect available data sources:
Guides strict Test-Driven Development (TDD): write failing tests first for features, bugfixes, refactors before any production code. Enforces red-green-refactor cycle.
Guides systematic root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Guides A/B test setup with mandatory gates for hypothesis validation, metrics definition, sample size calculation, and execution readiness checks.
Before analysis, detect available data sources:
dataforseo_backlinks_summary tool is availablepython scripts/backlinks_auth.py --check moz --jsonpython scripts/backlinks_auth.py --check bing --jsonRun python scripts/backlinks_auth.py --check --json to detect all sources at once.
If no sources are configured beyond the always-available tier:
/seo backlinks setup to add free Moz and Bing API keys for richer data"| Command | Purpose |
|---|---|
/seo backlinks <url> | Full backlink profile analysis (uses all available sources) |
/seo backlinks gap <url1> <url2> | Competitor backlink gap analysis |
/seo backlinks toxic <url> | Toxic link detection and disavow recommendations |
/seo backlinks new <url> | New and lost backlinks (DataForSEO only) |
/seo backlinks verify <url> --links <file> | Verify known backlinks still exist |
/seo backlinks setup | Show setup instructions for free backlink APIs |
Produce all 7 sections below. Each section lists data sources in preference order.
DataForSEO: dataforseo_backlinks_summary → total backlinks, referring domains, domain rank, follow ratio, trend.
Moz API: python scripts/moz_api.py metrics <url> --json → Domain Authority, Page Authority, Spam Score, linking root domains, external links.
Common Crawl: python scripts/commoncrawl_graph.py <domain> --json → in-degree (referring domain count), PageRank, harmonic centrality.
Scoring:
| Metric | Good | Warning | Critical |
|---|---|---|---|
| Referring domains | >100 | 20-100 | <20 |
| Follow ratio | >60% | 40-60% | <40% |
| Domain diversity | No single domain >5% | 1 domain >10% | 1 domain >25% |
| Trend | Growing or stable | Slow decline | Rapid decline (>20%/quarter) |
DataForSEO: dataforseo_backlinks_anchors
Moz API: python scripts/moz_api.py anchors <url> --json
Bing Webmaster: python scripts/bing_webmaster.py links <url> --json (extract anchor text from link details)
Healthy distribution benchmarks:
| Anchor Type | Target Range | Over-Optimization Signal |
|---|---|---|
| Branded (company/domain name) | 30-50% | <15% |
| URL/naked link | 15-25% | N/A |
| Generic ("click here", "learn more") | 10-20% | N/A |
| Exact match keyword | 3-10% | >15% |
| Partial match keyword | 5-15% | >25% |
| Long-tail / natural | 5-15% | N/A |
Flag if exact-match anchors exceed 15% -- this is a Google Penguin risk signal.
DataForSEO: dataforseo_backlinks_referring_domains
Moz API: python scripts/moz_api.py domains <url> --json → domains with DA scores
Common Crawl: python scripts/commoncrawl_graph.py <domain> --json → top referring domains (domain-level, no authority scores)
Analyze:
DataForSEO: dataforseo_backlinks_bulk_spam_score + toxic patterns from reference
Moz API: Spam Score from python scripts/moz_api.py metrics <url> --json (1-17% scale, >11% = high risk)
Verification Crawler: python scripts/verify_backlinks.py --target <url> --links <file> --json (verify suspicious links still exist)
High-risk indicators (flag immediately):
Medium-risk indicators (review manually):
Load references/backlink-quality.md for the full 30 toxic patterns and disavow criteria.
DataForSEO: dataforseo_backlinks_backlinks with target type "page"
Moz API: python scripts/moz_api.py pages <domain> --json
Find:
DataForSEO: dataforseo_backlinks_referring_domains for both domains, then compare
Bing Webmaster (unique!): python scripts/bing_webmaster.py compare <url1> <url2> --json — the only free tool with built-in competitor comparison
Moz API: Compare DA/PA between domains via python scripts/moz_api.py metrics <url> --json for each
Output:
DataForSEO only: dataforseo_backlinks_backlinks with date filters for 30/60/90 day changes
Verification Crawler: For known links, verify current status with python scripts/verify_backlinks.py
Note: Free sources cannot track new/lost links over time. If this section is requested without DataForSEO, inform the user: "Link velocity tracking requires the DataForSEO extension. Free sources provide point-in-time snapshots only."
Red flags:
Calculate a 0-100 score. When mixing sources, apply confidence weighting:
| Factor | Weight | Sources (preference order) | Confidence |
|---|---|---|---|
| Referring domain count | 20% | DataForSEO > Moz > CC in-degree | 1.0 / 0.85 / 0.50 |
| Domain quality distribution | 20% | DataForSEO > Moz DA distribution | 1.0 / 0.85 |
| Anchor text naturalness | 15% | DataForSEO > Moz > Bing anchors | 1.0 / 0.85 / 0.70 |
| Toxic link ratio | 20% | DataForSEO > Moz spam score | 1.0 / 0.85 |
| Link velocity trend | 10% | DataForSEO only | 1.0 |
| Follow/nofollow ratio | 5% | DataForSEO > Bing details | 1.0 / 0.70 |
| Geographic relevance | 10% | DataForSEO > Bing country | 1.0 / 0.70 |
Data sufficiency gate: Count how many of the 7 factors have at least one data source available.
Backlink Health Score: INSUFFICIENT DATA (X/7 factors scored)
Show individual factor scores that ARE available with their source and confidence.
Recommend: "Configure Moz API (free) for a scoreable profile. Run /seo backlinks setup"When only CC is available, cap maximum score at 70/100. A numeric score with fewer than 4 data sources is misleading — it implies poor health when the reality is we simply lack data.
| Section | Status | Score | Data Source |
|---|---|---|---|
| Profile Overview | pass/warn/fail | XX/100 | Moz (0.85) |
| Anchor Distribution | pass/warn/fail | XX/100 | Moz (0.85) |
| Referring Domain Quality | pass/warn/fail | XX/100 | CC (0.50) |
| Toxic Links | pass/warn/fail | XX/100 | Moz Spam (0.85) |
| Top Pages | info | N/A | Moz (0.85) |
| Link Velocity | pass/warn/fail | XX/100 | DataForSEO only |
| Error | Cause | Resolution |
|---|---|---|
| No sources configured | No API keys, no DataForSEO | Run /seo backlinks setup |
| Moz rate limit | Free tier: 1 req/10s | Wait 10 seconds, retry. Built into script. |
| Bing site not verified | Site not verified in Bing | Verify at https://www.bing.com/webmasters |
| CC download timeout | Large graph file, slow connection | Use --timeout 180 flag |
| DataForSEO unavailable | Extension not installed | Run ./extensions/dataforseo/install.sh |
| No backlink data returned | Domain too new or very small | Note: small sites may have <10 backlinks |
Fallback cascade:
/seo backlinks setup to configure free APIs"Before presenting any backlink analysis to the user, run this checklist internally. Do NOT skip this step. Fix any issues found before showing the report.
@type for each block? If any @type is missing,
re-check — it may use @graph wrapper (valid JSON-LD, not malformed).unverifiable_js, say so — never
report a JS-rendered page as "link removed" (that's a false negative).h1_suspicious list? If so, note they are likely
counters/stats, not semantic headings.unverifiable_js (not link_removed)If ANY check fails, fix the finding before presenting. Never present inferred data as fact.
After completing any backlink analysis command, always offer:
"Generate a professional PDF report? Use /seo google report"
Load on demand (do NOT load at startup):
skills/seo/references/backlink-quality.md -- Detailed toxic link patterns and scoring methodology (shared reference, load when analyzing toxic links or spam scores)skills/seo/references/free-backlink-sources.md -- Source comparison, confidence weighting, setup guides (shared reference, load when configuring free backlink APIs)