backlink-gap

backlink-gap is a command for Claude Code from indranilbanerjee/digital-marketing-pro. It costs 35 tokens per session (738 once invoked), scanned A, original, MIT.

A command for finding websites that link to your competitors but not to your site, then ranking those possible linking partners.

In plain words
What is it for?
Use it for backlink-gap audits, digital PR target lists, and finding broken-link replacement opportunities. It requires your domain, competitors, and a connected backlink-data service.
Why use it?
It removes the manual work of comparing competitor backlinks and sorting potential outreach targets. It also applies stated quality checks to help filter the list.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is If you see unfamiliar placeholders or need to check which backlink data sources are connected, see [CONNECTORS.md](../CONNECTORS.md)..

Part of the digital-marketing-pro plugin — 154 skills, 18 commands, 24 agents shipped together

Good fit Use it for backlink-gap audits, digital PR target lists, and finding broken-link replacement opportunities. It requires your domain, competitors, and a connected backlink-data service.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro
agentmods
npx agentmods add commands/indranilbanerjee/digital-marketing-pro/backlink-gap

Made for: Claude Code.

Or install digital-marketing-pro, the plugin that ships this one along with the rest of its 154 skills, 18 commands, 24 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backlink-gap

README.md
[![agentmods](https://agentmods.dev/badge/commands/indranilbanerjee/digital-marketing-pro/backlink-gap/github.svg)](https://agentmods.dev/commands/indranilbanerjee/digital-marketing-pro/backlink-gap)
Your own site
<a href="https://agentmods.dev/commands/indranilbanerjee/digital-marketing-pro/backlink-gap"><img src="https://agentmods.dev/badge/commands/indranilbanerjee/digital-marketing-pro/backlink-gap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backlink-gap

Your own site · 80×15
<a href="https://agentmods.dev/commands/indranilbanerjee/digital-marketing-pro/backlink-gap"><img src="https://agentmods.dev/badge/commands/indranilbanerjee/digital-marketing-pro/backlink-gap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 738 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00738
Opus 5 $0.00017 $0.00369
Sonnet 5 $0.00007 $0.00148
Haiku 4.5 $0.00003 $0.00074

Measured 10d ago against content hash 4524e4498021, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

backlink-gap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/backlink-gap.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

If you see unfamiliar placeholders or need to check which backlink data sources are connected, see CONNECTORS.md.

Identifies the highest-leverage backlink prospects — domains that link to multiple competitors but not to you — and ranks them by an opinionated priority score combining authority, link-overlap signal, downstream traffic, and topical relevance. Routes to skills/backlink-gap/SKILL.md.

Trigger

User runs /digital-marketing-pro:backlink-gap or asks for:

  • "Find link prospects from my competitors"
  • "Where did my competitors gain links?"
  • "Backlink-gap audit"
  • "Run a digital PR target list"
  • "Find broken-link replacement opportunities"

Inputs

  1. Your domain — the brand's primary domain
  2. Competitors — 2 minimum (1 allowed but warns), 3–5 is the sweet spot. Auto-fetched from /digital-marketing-pro:competitor-analysis if a fresh run exists.
  3. Backlink data source — Ahrefs / Semrush / SE Ranking / Moz MCP. Connector must be configured.
  4. Minimum DR filter (optional) — default 20; YMYL industries should set 40

Process

  1. Load brand context
  2. Pick competitors (re-use latest competitor-analysis PLAN.md if fresh)
  3. Pull backlinks for own domain + each competitor via connected backlink MCP (with budget guard at 200 credits)
  4. Run scripts/backlink_gap.py to compute gap + priority scores
  5. Validate the four quality gates (data_freshness / sample_size / competitor_coverage / link_overlap_signal)
  6. Build prospect shortlist with outreach angles (guest post / broken-link / resource-page)
  7. HTTP-HEAD scan competitor backlinks for 4xx — these are broken-link replacement candidates (highest hit rate)
  8. Draft 3 outreach template variants pre-filled with brand voice
  9. Write PLAN.md to ${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{date}/

Output

Numbered intermediate files under ${CLAUDE_PLUGIN_DATA}/{brand}/seo/backlink-gap/{YYYY-MM-DD}/:

  • 00-input.md, 01-data-pull.md, 02-ours.csv, 03-comp-*.csv
  • 04-gap-run.json (raw script output), 05-quality-scorecard.md
  • 06-prospect-shortlist.md, 07-broken-link-candidates.md, 08-outreach-templates.md
  • PLAN.md (the deliverable)

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 58 lines · 35 tokens per session scan A 4524e4498021

Subscribe to this mod's changes

backlink-gap is a command published in the GitHub repository indranilbanerjee/digital-marketing-pro (801 stars, last pushed 2d ago), licensed MIT. It adds 35 tokens to every session and 738 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.