/digital-marketing-pro:backlink-gap skill

Find referring domains that link to your competitors but not to you, ranked by an outreach-priority score (0.40 DR + 0.25 link-overlap + 0.20 traffic + 0.15 topical relevance) — outputs a four-gate quality scorecard, a 30-prospect outreach shortlist, broken-link candidates, and pre-filled outreach templates.

by indranilbanerjee·MIT license·★ 834 Stars on the repo·GitHub ↗

Use now
SKILL.md · the author's own words
# /digital-marketing-pro:backlink-gap

## Purpose

Identify the highest-leverage backlink prospects — domains that link to multiple competitors but not to you — and rank them by an opinionat…

## Context efficiency

Heavy skill. **Grep before Read** any referenced file, then `Read` only matched ranges with `offset` + `limit`. List `${CLAUDE_PLUGIN_DATA}…

## When to Use

- Quarterly backlink audit — "where did our competitors grow links this quarter and we didn't?"
- Pre-launch link-building plan for a new product or content hub
- Digital PR qualification — separating "would-link-to-anyone" prospects from "high-confidence-will-link-to-our-space"
- Competitive recovery — a competitor displaced you and you want to know which links moved

Word-for-word excerpt, not a result. Read the full SKILL.md ↓

Files of /digital-marketing-pro:backlink-gap

indranilbanerjee/main1 file shown
SKILL.md
Show the full text150 lines

Purpose

Identify the highest-leverage backlink prospects — domains that link to multiple competitors but not to you — and rank them by an opinionated priority score that combines authority, link-overlap signal, downstream traffic, and topical relevance. Produces a numbered output bundle ready for outreach handoff.

Context efficiency

Heavy skill. Grep before Read any referenced file, then Read only matched ranges with offset + limit. List ${CLAUDE_PLUGIN_DATA}/<brand>/ before opening files. On re-invocation mid-session, skip files already in context.

When to Use

  • Quarterly backlink audit — "where did our competitors grow links this quarter and we didn't?"
  • Pre-launch link-building plan for a new product or content hub
  • Digital PR qualification — separating "would-link-to-anyone" prospects from "high-confidence-will-link-to-our-space"
  • Competitive recovery — a competitor displaced you and you want to know which links moved
  • Onboarding a new client and need a "first 50 link targets" backlog

Don't use when you just need backlink quantity numbers (use the brand's connected backlink MCP directly) or when you need anchor-text analysis of your own profile (that's a separate audit — covered in seo-audit).

Brand context (auto-applied)

  1. Read ~/.claude-marketing/brands/_active-brand.json for the active slug, then load ~/.claude-marketing/brands/{slug}/profile.json
  2. If no brand exists: ask "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults
  3. Apply skills/context-engine/industry-profiles.md for industry-specific link-quality thresholds (YMYL industries should set higher --min-dr)
  4. Apply skills/context-engine/compliance-rules.md to filter out blocked publishers (e.g., PBN-style or paid-link networks the brand has explicitly banned)

Inputs

Input Source Required?
Our backlinks CSV Export from connected backlink MCP (Ahrefs / Semrush / SE Ranking / Moz) for the brand's primary domain yes
Competitor backlinks CSVs (2+) Same exporter, one per competitor (2 minimum for the link-overlap signal; 3-5 is the sweet spot) yes
Min DR / DA filter CLI flag, brand-profile default, or industry standard optional
Top-N count How many prospects to surface optional

One competitor is allowed (the script warns rather than errors) but the resulting "shared signal" is noise — single-competitor gap analysis is really just "who links to them" rather than "who consistently links in our space."

Process (10 steps, numbered-file output)

All outputs go to ${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{YYYY-MM-DD}/.

  1. 00-input.md — capture our domain, competitor list (with rationale: why these N?), filter parameters, run timestamp
  2. 01-data-pull.md — pull backlinks for {brand}.tld and each competitor via brand's connected backlink MCP. Budget guard: if the MCP exposes credit cost, sum estimated cost and ask "Continue? (y/N — default N)" before fetching when total > 200 credits.
  3. 02-ours.csv — our backlink export (raw)
  4. 03-comp-{competitor}.csv — one CSV per competitor (raw)
  5. 04-gap-run.json — run the script:
    python "${CLAUDE_PLUGIN_ROOT}/scripts/backlink_gap.py" \
        --ours "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/02-ours.csv" \
        --competitors \
          "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/03-comp-competitor1.csv" \
          "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/03-comp-competitor2.csv" \
        --min-dr {brand.profile.min_link_dr or 20} \
        --top 100 \
        --out "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/04-gap-run.json"
    
    --competitors takes an explicit space-separated list of CSV paths (nargs="+") — enumerate each 03-comp-*.csv file; the script does not expand a * glob, so a quoted 03-comp-*.csv would fail with FileNotFoundError. List one path per competitor.
  6. 05-quality-scorecard.md — read quality_scorecard from 04-gap-run.json. If status: needs_review, diagnose:
    • data_freshness: fail → input CSV(s) older than 90 days. Re-pull data; backlink graphs decay fast.
    • sample_size: fail → any input < 50 unique referring domains. Either the domain is too new or the export was truncated. Re-export with no row limit.
    • competitor_coverage: warn → only 1 competitor. Add at least 1 more for genuine overlap signal.
    • link_overlap_signal: fail → fewer than 5 referring domains link to ≥2 competitors. Either competitors are poorly chosen (they don't share a content space with each other) or the data is incomplete. Re-choose competitors.
  7. 06-prospect-shortlist.md — top 30 prospects, formatted for outreach handoff: domain, DR, link count across competitors, suggested outreach angle (guest post, broken-link, resource-page mention)
  8. 07-broken-link-candidates.md — subset where one or more competitor links return 4xx (run a quick HTTP HEAD pass on competitor backlink URLs — use the brand's connected web-fetch MCP). These are "easy wins" — pitch your URL as the replacement.
  9. 08-outreach-templates.md — three template variants: (a) cold-pitch resource-page, (b) broken-link replacement, (c) competitor mention. Each pre-filled with brand voice from the brand profile's voice fields + skills/context-engine/guidelines-framework.md.
  10. PLAN.md — single-page summary: stats + scorecard + top 10 prospects with outreach angle + recommended cadence (3-5 pitches/week for sustainable outreach quality).

Output format

${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/2026-06-04/
├── 00-input.md
├── 01-data-pull.md
├── 02-ours.csv
├── 03-comp-{competitor1}.csv
├── 03-comp-{competitor2}.csv
├── ...
├── 04-gap-run.json
├── 05-quality-scorecard.md
├── 06-prospect-shortlist.md
├── 07-broken-link-candidates.md
├── 08-outreach-templates.md
└── PLAN.md

Quality scorecard (the four gates)

Gate What it checks Why it matters
data_freshness All input CSVs have mtime within 90 days Backlink graphs decay fast — stale data sends you chasing dead links
sample_size Each input has ≥ 50 unique referring domains Below this, the gap math has too little signal to rank
competitor_coverage ≥ 2 competitor CSVs supplied The "shared signal" is what separates real prospects from noise
link_overlap_signal ≥ 5 referring domains link to ≥ 2 of the competitors If no domains shared, your competitors aren't actually competing in the same content space

status: ready requires all four gates pass (competitor_coverage: warn does not block — it's a soft signal).

Priority score (0–1, displayed in 04-gap-run.json)

priority = 0.40 × DR_normalised
         + 0.25 × link_count_normalised  (how many competitors this domain links to)
         + 0.20 × traffic_normalised
         + 0.15 × topical_relevance

Why link_count is weighted higher than traffic: a domain that links to 3/3 competitors is unambiguously in your space and willing to link. A high-traffic domain that only links to 1 might just be a tier-1 publisher who happens to have covered one of you in passing.

Chain handoffs

This skill is a producer in a longer chain:

  1. /digital-marketing-pro:competitor-analysis — picks the right competitors
  2. /digital-marketing-pro:backlink-gap — this skill
  3. /digital-marketing-pro:digital-pr — consumes 06-prospect-shortlist.md + 08-outreach-templates.md
  4. /digital-marketing-pro:pr-pitch — drafts individual pitches per prospect
  5. /digital-marketing-pro:performance-report — quarterly re-runs of this skill feed the "links gained" KPI

Tips & caveats

  • More competitors ≠ better. Three to five focused competitors beats ten random ones. The "shared signal" gate works best when all competitors are in the same content space.
  • DR/DA from different exporters aren't comparable. Don't mix an Ahrefs export with a Moz export — the script doesn't know to normalise across exporters. Pick one provider per audit.
  • Topical relevance is the weakest signal in most exports because few exporters provide it well. The script defaults to 0.5 if absent, which is the right neutral. Override only if you have a curated topical-relevance score.
  • Don't outreach 100 prospects in one week. The output is a backlog, not a queue. Sustainable cadence: 3-5 highly personalised pitches per week per outreach lead.
  • Broken-link candidates tend to have the highest hit rate (broken-link replacement pitches typically out-reply cold pitches by a wide margin — the "30-60% vs 5-15%" figures are an illustrative rule of thumb, not measured; validate against your own outreach data) — always work the 07-broken-link-candidates.md list first.
  • Re-run quarterly, not monthly. Backlink data moves slowly enough that monthly runs mostly produce noise.
  • YMYL industries (health, finance, legal) should set --min-dr 40 to filter out low-authority publishers that could damage E-E-A-T.

Agents used

  • seo-specialist (primary) — interpretation of prospect quality
  • competitive-intel — competitor-set selection rationale (Step 1)
  • pr-outreach — outreach template drafting (Step 8)
  • brand-guardian — banned-publisher filter at Step 6

See also

  • /digital-marketing-pro:competitor-analysis — pick the competitors for this audit
  • /digital-marketing-pro:digital-pr — runs the actual outreach
  • /digital-marketing-pro:seo-drift — re-run quarterly to track delta
  • /digital-marketing-pro:seo-audit — broader site-level audit including own-profile health
  • scripts/backlink_gap.py — the underlying gap engine
1---
2name: backlink-gap
3description: "Find referring domains that link to your competitors but not to you, ranked by an outreach-priority score (0.40 DR + 0.25 link-overlap + 0.20 traffic + 0.15 topical relevance) — outputs a four-gate quality scorecard, a 30-prospect outreach shortlist, broken-link candidates, and pre-filled outreach templates. Triggers on \"/digital-marketing-pro:backlink-gap\", \"where are competitors getting links we aren't\", \"plan a link-building campaign\", \"quarterly backlink audit\", \"first 50 link targets for a new client\". Consumes backlink CSV exports from the brand's connected backlink MCP, runs scripts/backlink_gap.py, reads the brand profile for DR thresholds and voice, and hands off to /digital-marketing-pro:digital-pr and /digital-marketing-pro:pr-pitch."
4argument-hint: "[brand-name]"
5user-invocable: true
6---
7 
8# /digital-marketing-pro:backlink-gap
9 
10## Purpose
11 
12Identify the highest-leverage backlink prospects — domains that link to multiple competitors but not to you — and rank them by an opinionated priority score that combines authority, link-overlap signal, downstream traffic, and topical relevance. Produces a numbered output bundle ready for outreach handoff.
13 
14## Context efficiency
15 
16Heavy skill. **Grep before Read** any referenced file, then `Read` only matched ranges with `offset` + `limit`. List `${CLAUDE_PLUGIN_DATA}/<brand>/` before opening files. On re-invocation mid-session, skip files already in context.
17 
18## When to Use
19 
20- Quarterly backlink audit — "where did our competitors grow links this quarter and we didn't?"
21- Pre-launch link-building plan for a new product or content hub
22- Digital PR qualification — separating "would-link-to-anyone" prospects from "high-confidence-will-link-to-our-space"
23- Competitive recovery — a competitor displaced you and you want to know which links moved
24- Onboarding a new client and need a "first 50 link targets" backlog
25 
26**Don't use** when you just need backlink *quantity* numbers (use the brand's connected backlink MCP directly) or when you need *anchor-text* analysis of your own profile (that's a separate audit — covered in `seo-audit`).
27 
28## Brand context (auto-applied)
29 
301. Read `~/.claude-marketing/brands/_active-brand.json` for the active slug, then load `~/.claude-marketing/brands/{slug}/profile.json`
312. If no brand exists: ask "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults
323. Apply `skills/context-engine/industry-profiles.md` for industry-specific link-quality thresholds (YMYL industries should set higher `--min-dr`)
334. Apply `skills/context-engine/compliance-rules.md` to filter out blocked publishers (e.g., PBN-style or paid-link networks the brand has explicitly banned)
34 
35## Inputs
36 
37| Input | Source | Required? |
38|---|---|---|
39| Our backlinks CSV | Export from connected backlink MCP (Ahrefs / Semrush / SE Ranking / Moz) for the brand's primary domain | yes |
40| Competitor backlinks CSVs (2+) | Same exporter, one per competitor (2 minimum for the link-overlap signal; 3-5 is the sweet spot) | yes |
41| Min DR / DA filter | CLI flag, brand-profile default, or industry standard | optional |
42| Top-N count | How many prospects to surface | optional |
43 
44**One competitor is allowed** (the script warns rather than errors) but the resulting "shared signal" is noise — single-competitor gap analysis is really just "who links to them" rather than "who consistently links in our space."
45 
46## Process (10 steps, numbered-file output)
47 
48All outputs go to `${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{YYYY-MM-DD}/`.
49 
501. **`00-input.md`** — capture our domain, competitor list (with rationale: why these N?), filter parameters, run timestamp
512. **`01-data-pull.md`** — pull backlinks for `{brand}.tld` and each competitor via brand's connected backlink MCP. **Budget guard**: if the MCP exposes credit cost, sum estimated cost and ask "Continue? (y/N — default N)" before fetching when total > 200 credits.
523. **`02-ours.csv`** — our backlink export (raw)
534. **`03-comp-{competitor}.csv`** — one CSV per competitor (raw)
545. **`04-gap-run.json`** — run the script:
55 ```bash
56 python "${CLAUDE_PLUGIN_ROOT}/scripts/backlink_gap.py" \
57 --ours "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/02-ours.csv" \
58 --competitors \
59 "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/03-comp-competitor1.csv" \
60 "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/03-comp-competitor2.csv" \
61 --min-dr {brand.profile.min_link_dr or 20} \
62 --top 100 \
63 --out "${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/04-gap-run.json"
64 ```
65 `--competitors` takes an explicit space-separated list of CSV paths (`nargs="+"`) — **enumerate each `03-comp-*.csv` file; the script does not expand a `*` glob**, so a quoted `03-comp-*.csv` would fail with FileNotFoundError. List one path per competitor.
666. **`05-quality-scorecard.md`** — read `quality_scorecard` from `04-gap-run.json`. If `status: needs_review`, diagnose:
67 - `data_freshness: fail` → input CSV(s) older than 90 days. Re-pull data; backlink graphs decay fast.
68 - `sample_size: fail` → any input < 50 unique referring domains. Either the domain is too new or the export was truncated. Re-export with no row limit.
69 - `competitor_coverage: warn` → only 1 competitor. Add at least 1 more for genuine overlap signal.
70 - `link_overlap_signal: fail` → fewer than 5 referring domains link to ≥2 competitors. Either competitors are poorly chosen (they don't share a content space with each other) or the data is incomplete. Re-choose competitors.
717. **`06-prospect-shortlist.md`** — top 30 prospects, formatted for outreach handoff: domain, DR, link count across competitors, suggested outreach angle (guest post, broken-link, resource-page mention)
728. **`07-broken-link-candidates.md`** — subset where one or more competitor links return 4xx (run a quick HTTP HEAD pass on competitor backlink URLs — use the brand's connected web-fetch MCP). These are "easy wins" — pitch your URL as the replacement.
739. **`08-outreach-templates.md`** — three template variants: (a) cold-pitch resource-page, (b) broken-link replacement, (c) competitor mention. Each pre-filled with brand voice from the brand profile's voice fields + `skills/context-engine/guidelines-framework.md`.
7410. **`PLAN.md`** — single-page summary: stats + scorecard + top 10 prospects with outreach angle + recommended cadence (3-5 pitches/week for sustainable outreach quality).
75 
76## Output format
77 
78```
79${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/2026-06-04/
80├── 00-input.md
81├── 01-data-pull.md
82├── 02-ours.csv
83├── 03-comp-{competitor1}.csv
84├── 03-comp-{competitor2}.csv
85├── ...
86├── 04-gap-run.json
87├── 05-quality-scorecard.md
88├── 06-prospect-shortlist.md
89├── 07-broken-link-candidates.md
90├── 08-outreach-templates.md
91└── PLAN.md
92```
93 
94## Quality scorecard (the four gates)
95 
96| Gate | What it checks | Why it matters |
97|---|---|---|
98| **data_freshness** | All input CSVs have mtime within 90 days | Backlink graphs decay fast — stale data sends you chasing dead links |
99| **sample_size** | Each input has ≥ 50 unique referring domains | Below this, the gap math has too little signal to rank |
100| **competitor_coverage** | ≥ 2 competitor CSVs supplied | The "shared signal" is what separates real prospects from noise |
101| **link_overlap_signal** | ≥ 5 referring domains link to ≥ 2 of the competitors | If no domains shared, your competitors aren't actually competing in the same content space |
102 
103`status: ready` requires all four gates pass (`competitor_coverage: warn` does not block — it's a soft signal).
104 
105## Priority score (0–1, displayed in 04-gap-run.json)
106 
107```
108priority = 0.40 × DR_normalised
109 + 0.25 × link_count_normalised (how many competitors this domain links to)
110 + 0.20 × traffic_normalised
111 + 0.15 × topical_relevance
112```
113 
114**Why link_count is weighted higher than traffic:** a domain that links to 3/3 competitors is unambiguously in your space and willing to link. A high-traffic domain that only links to 1 might just be a tier-1 publisher who happens to have covered one of you in passing.
115 
116## Chain handoffs
117 
118This skill is a producer in a longer chain:
119 
1201. `/digital-marketing-pro:competitor-analysis` — picks the right competitors
1212. **`/digital-marketing-pro:backlink-gap`** — *this skill*
1223. `/digital-marketing-pro:digital-pr` — consumes `06-prospect-shortlist.md` + `08-outreach-templates.md`
1234. `/digital-marketing-pro:pr-pitch` — drafts individual pitches per prospect
1245. `/digital-marketing-pro:performance-report` — quarterly re-runs of this skill feed the "links gained" KPI
125 
126## Tips & caveats
127 
128- **More competitors ≠ better.** Three to five focused competitors beats ten random ones. The "shared signal" gate works best when all competitors are in the same content space.
129- **DR/DA from different exporters aren't comparable.** Don't mix an Ahrefs export with a Moz export — the script doesn't know to normalise across exporters. Pick one provider per audit.
130- **Topical relevance is the weakest signal in most exports** because few exporters provide it well. The script defaults to 0.5 if absent, which is the right neutral. Override only if you have a curated topical-relevance score.
131- **Don't outreach 100 prospects in one week.** The output is a backlog, not a queue. Sustainable cadence: 3-5 highly personalised pitches per week per outreach lead.
132- **Broken-link candidates tend to have the highest hit rate** (broken-link replacement pitches typically out-reply cold pitches by a wide margin — the "30-60% vs 5-15%" figures are an illustrative rule of thumb, not measured; validate against your own outreach data) — always work the `07-broken-link-candidates.md` list first.
133- **Re-run quarterly,** not monthly. Backlink data moves slowly enough that monthly runs mostly produce noise.
134- **YMYL industries** (health, finance, legal) should set `--min-dr 40` to filter out low-authority publishers that could damage E-E-A-T.
135 
136## Agents used
137 
138- `seo-specialist` (primary) — interpretation of prospect quality
139- `competitive-intel` — competitor-set selection rationale (Step 1)
140- `pr-outreach` — outreach template drafting (Step 8)
141- `brand-guardian` — banned-publisher filter at Step 6
142 
143## See also
144 
145- `/digital-marketing-pro:competitor-analysis` — pick the competitors for this audit
146- `/digital-marketing-pro:digital-pr` — runs the actual outreach
147- `/digital-marketing-pro:seo-drift` — re-run quarterly to track delta
148- `/digital-marketing-pro:seo-audit` — broader site-level audit including own-profile health
149- `scripts/backlink_gap.py` — the underlying gap engine
150 

Discussion

Alternatives

Agentic Browsing ReadinessAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).Marketing · MITBacklink Profile AnalysisBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.Marketing · MIT/setup-cmsConnect a CMS to notfair SEO tools. Guides users through configuring WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes credentials to .env.local. Once set up, seo-analysis automatically cross- references CMS content against Google Search Console data. Use whenever the user says "connect my CMS", "set up WordPress", "configure Strapi", "add Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks why no CMS data appears in a seo-analysis report. · MITBacklink checkBacklink profile for any domain — referring domains, authority, anchors, new/lost links, and a side-by-side vs a competitor. Use when asked "check my backlinks", "backlink profile of X", "who links to them", or "link gap vs competitor".Marketing · MIT