Internal Linking Stinger
You are equipping internal-linking-wasp-drone, part of the Website
Auditor by Legion Code Inc. plugin. Full scope and acceptance criteria:
prd-011-internal-linking.
This pair's research archive is unusually deep for this plugin: five raw
sources specifically on link-graph mechanics (graph-theoretic methodology,
a practitioner audit checklist, PageRank-mechanics worked math with
concrete thresholds, and an anchor-text-quality rubric), plus two
tangential sources retained for narrow, explicitly-scoped relevance. Use
that depth. Do not fall back to generic "check your internal links" advice
when the archive gives you BFS mechanics, a real power-iteration formula,
and a four-dimension anchor rubric to apply instead.
Purpose
Build a directed internal link graph from site-data/ (already crawled,
read-only) and produce the run's 03-seo/internal-linking.md sub-audit:
which pages are orphaned, how many clicks from a defined entry-point set
every page sits at, how strong each page's inbound anchor-text signal is
(and whether any anchor text is cannibalized across destinations), and how
link equity is structurally distributed across the site via an
internal-PageRank-style proxy. Also produces a short deep-linking handoff
summary for technical-seo-wasp-drone so that Drone does not re-derive the
graph.
When to use
- Wave W5 of every audit run, once
site-crawler-wasp-drone has finished
writing site-data/
- Any time a downstream Drone (
technical-seo-wasp-drone,
audit-scoring-wasp-drone) needs a link-graph fact and should read this
Stinger's output rather than re-deriving it
- Diagnosing why an important page is not ranking or not getting indexed
when the cause might be structural (buried too deep, orphaned, starved
of equity) rather than a content problem
When not to use
- Crawling the site or fetching a page not already in
site-data/. This
Stinger never crawls; that is site-crawler-wasp-drone's job
(PRD-007). A link pointing outside site-data/ is reported as
external or uncrawled, never fetched.
- Judging copy quality, reading level, or ICP relevancy of a page's
content. That is
content-semantics-stinger's scope.
- Judging external backlink profile or off-site authority. The equity
computation here is internal-graph-only by construction (see guide 4);
it explicitly excludes external backlinks.
- Re-deriving the full internal link graph inside
technical-seo-wasp-drone's
deep-linking sub-check. Read this Stinger's handoff summary instead.
Procedure
- Confirm
site-data/ is populated (read-only), then build the graph and
compute every metric in one deterministic pass via
references/scripts/link-graph.py. See
guides/01-graph-construction-and-orphan-detection.md.
- Cross-reference the script's orphan candidates against every other
known-URL source available to the run and classify each by reachability
state before recommending a fix; report dead-ends as a separate, less
severe finding. See
guides/01-graph-construction-and-orphan-detection.md.
- Define the entry-point set explicitly (never homepage-only by default)
and interpret the BFS click-depth output, including path diversity and
unreachable pages, against the site's own navigation philosophy. See
guides/02-click-depth-bfs.md.
- Score every page's inbound anchor-text profile across the four cited
dimensions (generic ratio, diversity, topical relevance, length), both
all-inbound and contextual-only, and resolve any anchor-text
cannibalization found. See
guides/03-anchor-text-scoring.md.
- Interpret the internal-PageRank-style equity distribution: classify
every page, compute the Gini-coefficient distribution shape, and state
the computation's explicit boundary (no external backlinks, no
link-context quality, no history, not Google's real ranking layers)
every time this section is used. See
guides/04-link-equity-pagerank.md.
- Assemble
03-seo/internal-linking.md from
references/templates/internal-linking-report-template.md, fill the
findings-register rows with the mandatory numeric value, evidence
pointer, and one-line justification per row, log any
rejected/reframed candidate, and produce the deep-linking handoff
summary for technical-seo-wasp-drone. See
guides/05-report-assembly-and-handoff.md.
References map
references/research/distilled-internal-linking.md, load when a claim
needs verification, a specific threshold's provenance needs checking, or
a dispute needs settling. This is the single most load-bearing file in
this Stinger; it names exactly which numbers are single-vendor
heuristics versus corroborated across sources.
- Source research archive (not shipped with the plugin): the shipped distillation summarizes it; do not require it.
its primary source, or when the distillation's citation feels thin and
you want the original context.
references/scripts/link-graph.py, run once per audit after
site-data/ is complete; do not hand-compute BFS depth, anchor scores,
or PageRank-style equity, this script exists so those numbers are
reproducible. Its docstring carries the full grounding note per number
it produces, including which two things (composite-score weights,
URL-to-slug matching) are this Stinger's own judgment call rather than a
sourced figure.
references/templates/internal-linking-report-template.md, load when
assembling 03-seo/internal-linking.md; mirrors the script's JSON
output field for field.
references/templates/edge-record-template.md, load when inspecting or
hand-verifying a specific edge rather than the full graph.
references/templates/deep-linking-handoff-summary-template.md, load
when producing the summary technical-seo-wasp-drone reads instead of
re-deriving the graph.
guides/01-graph-construction-and-orphan-detection.md through
guides/05-report-assembly-and-handoff.md, load in order for a full
pass; each maps to one section of the report template.
Related drones and stingers
- content-semantics-stinger - Subjective
copy interpretation and reading-level scoring for the same crawled page
set. Runs alongside this Stinger in wave W5; the two do not overlap in
scope (content quality vs. link structure) and neither duplicates the
other's output.
- technical-seo-stinger - Owns the run's
broader technical-SEO sub-audit, including a deep-linking sub-check that
reads this Stinger's handoff summary rather than re-deriving the graph.
- icp-positioning-stinger - Owns the run's
ICP and conversion-action taxonomy, referenced (not duplicated) when
this Stinger judges which under-served pages are "important per
strategy" in the equity-flow section.
- site-crawler-stinger - Produces the
site-data/ this Stinger reads read-only. This Stinger never crawls;
if site-data/ is incomplete or missing, that is a site-crawler
dependency gap, not something to work around here.
- internal-linking-wasp-drone -
this Stinger's paired Drone.
Critical Directive
- You must read all files and context contained within your skill.
- In the event your core knowledge does not provide sufficient guidance you must make every attempt to search the internet, related knowledge base documentation files, and other available resources to supplement your knowledge prior to proceeding with your task.
- Additional related skills can be found here:
Ship Gate
Ship Gate removed: research-only stinger, produces no committable code.
This Stinger's output is a findings report (03-seo/internal-linking.md)
written to the target audit workspace outside this repository; it never
proposes a diff or a commit to this plugin's own tracked source, so the
security-stinger / quality-stinger / github-repo-health-stinger close-out
sequence does not apply.
1---2name: internal-linking-stinger-23description: "Internal link-graph analysis: orphan-page detection, click-depth via BFS, four-dimension anchor-text scoring plus cannibalization detection, internal-PageRank-style equity flow. Wave W5."4license: AGPL-3.0-or-later5compatibility: "Claude Code, Cursor, ChatGPT Codex, Claude Cowork."6metadata:7 source: https://skillmd.com/skills/legioncodeinc/internal-linking-stinger-28 hive-tier: stinger9 hive-drone: internal-linking-wasp-drone10 research-window: "2026-08-18 (three research rounds; round 3 closed the original link-graph-mechanics gap)"11 primary-surface: external-website-audit12---1314# Internal Linking Stinger1516You are equipping **internal-linking-wasp-drone**, part of the Website17Auditor by Legion Code Inc. plugin. Full scope and acceptance criteria:18[prd-011-internal-linking](../../library/requirements/backlog/prd-011-internal-linking/prd-011-internal-linking-index.md).1920This pair's research archive is unusually deep for this plugin: five raw21sources specifically on link-graph mechanics (graph-theoretic methodology,22a practitioner audit checklist, PageRank-mechanics worked math with23concrete thresholds, and an anchor-text-quality rubric), plus two24tangential sources retained for narrow, explicitly-scoped relevance. Use25that depth. Do not fall back to generic "check your internal links" advice26when the archive gives you BFS mechanics, a real power-iteration formula,27and a four-dimension anchor rubric to apply instead.2829## Purpose3031Build a directed internal link graph from `site-data/` (already crawled,32read-only) and produce the run's `03-seo/internal-linking.md` sub-audit:33which pages are orphaned, how many clicks from a defined entry-point set34every page sits at, how strong each page's inbound anchor-text signal is35(and whether any anchor text is cannibalized across destinations), and how36link equity is structurally distributed across the site via an37internal-PageRank-style proxy. Also produces a short deep-linking handoff38summary for `technical-seo-wasp-drone` so that Drone does not re-derive the39graph.4041## When to use4243- Wave W5 of every audit run, once `site-crawler-wasp-drone` has finished44 writing `site-data/`45- Any time a downstream Drone (`technical-seo-wasp-drone`,46 `audit-scoring-wasp-drone`) needs a link-graph fact and should read this47 Stinger's output rather than re-deriving it48- Diagnosing why an important page is not ranking or not getting indexed49 when the cause might be structural (buried too deep, orphaned, starved50 of equity) rather than a content problem5152## When not to use5354- Crawling the site or fetching a page not already in `site-data/`. This55 Stinger never crawls; that is `site-crawler-wasp-drone`'s job56 (PRD-007). A link pointing outside `site-data/` is reported as57 external or uncrawled, never fetched.58- Judging copy quality, reading level, or ICP relevancy of a page's59 content. That is `content-semantics-stinger`'s scope.60- Judging external backlink profile or off-site authority. The equity61 computation here is internal-graph-only by construction (see guide 4);62 it explicitly excludes external backlinks.63- Re-deriving the full internal link graph inside `technical-seo-wasp-drone`'s64 deep-linking sub-check. Read this Stinger's handoff summary instead.6566## Procedure67681. Confirm `site-data/` is populated (read-only), then build the graph and69 compute every metric in one deterministic pass via70 `references/scripts/link-graph.py`. See71 `guides/01-graph-construction-and-orphan-detection.md`.722. Cross-reference the script's orphan candidates against every other73 known-URL source available to the run and classify each by reachability74 state before recommending a fix; report dead-ends as a separate, less75 severe finding. See `guides/01-graph-construction-and-orphan-detection.md`.763. Define the entry-point set explicitly (never homepage-only by default)77 and interpret the BFS click-depth output, including path diversity and78 unreachable pages, against the site's own navigation philosophy. See79 `guides/02-click-depth-bfs.md`.804. Score every page's inbound anchor-text profile across the four cited81 dimensions (generic ratio, diversity, topical relevance, length), both82 all-inbound and contextual-only, and resolve any anchor-text83 cannibalization found. See `guides/03-anchor-text-scoring.md`.845. Interpret the internal-PageRank-style equity distribution: classify85 every page, compute the Gini-coefficient distribution shape, and state86 the computation's explicit boundary (no external backlinks, no87 link-context quality, no history, not Google's real ranking layers)88 every time this section is used. See `guides/04-link-equity-pagerank.md`.896. Assemble `03-seo/internal-linking.md` from90 `references/templates/internal-linking-report-template.md`, fill the91 findings-register rows with the mandatory numeric value, evidence92 pointer, and one-line justification per row, log any93 rejected/reframed candidate, and produce the deep-linking handoff94 summary for `technical-seo-wasp-drone`. See95 `guides/05-report-assembly-and-handoff.md`.9697## References map9899- `references/research/distilled-internal-linking.md`, load when a claim100 needs verification, a specific threshold's provenance needs checking, or101 a dispute needs settling. This is the single most load-bearing file in102 this Stinger; it names exactly which numbers are single-vendor103 heuristics versus corroborated across sources.104- Source research archive (not shipped with the plugin): the shipped distillation summarizes it; do not require it.105 its primary source, or when the distillation's citation feels thin and106 you want the original context.107- `references/scripts/link-graph.py`, run once per audit after108 `site-data/` is complete; do not hand-compute BFS depth, anchor scores,109 or PageRank-style equity, this script exists so those numbers are110 reproducible. Its docstring carries the full grounding note per number111 it produces, including which two things (composite-score weights,112 URL-to-slug matching) are this Stinger's own judgment call rather than a113 sourced figure.114- `references/templates/internal-linking-report-template.md`, load when115 assembling `03-seo/internal-linking.md`; mirrors the script's JSON116 output field for field.117- `references/templates/edge-record-template.md`, load when inspecting or118 hand-verifying a specific edge rather than the full graph.119- `references/templates/deep-linking-handoff-summary-template.md`, load120 when producing the summary `technical-seo-wasp-drone` reads instead of121 re-deriving the graph.122- `guides/01-graph-construction-and-orphan-detection.md` through123 `guides/05-report-assembly-and-handoff.md`, load in order for a full124 pass; each maps to one section of the report template.125126## Related drones and stingers127128- [content-semantics-stinger](../content-semantics-stinger) - Subjective129 copy interpretation and reading-level scoring for the same crawled page130 set. Runs alongside this Stinger in wave W5; the two do not overlap in131 scope (content quality vs. link structure) and neither duplicates the132 other's output.133- [technical-seo-stinger](../technical-seo-stinger) - Owns the run's134 broader technical-SEO sub-audit, including a deep-linking sub-check that135 reads this Stinger's handoff summary rather than re-deriving the graph.136- [icp-positioning-stinger](../icp-positioning-stinger) - Owns the run's137 ICP and conversion-action taxonomy, referenced (not duplicated) when138 this Stinger judges which under-served pages are "important per139 strategy" in the equity-flow section.140- [site-crawler-stinger](../site-crawler-stinger) - Produces the141 `site-data/` this Stinger reads read-only. This Stinger never crawls;142 if `site-data/` is incomplete or missing, that is a `site-crawler`143 dependency gap, not something to work around here.144- [internal-linking-wasp-drone](../../agents/internal-linking-wasp-drone.md) -145 this Stinger's paired Drone.146147## Critical Directive148149- You must read all files and context contained within your skill.150- In the event your core knowledge does not provide sufficient guidance you must make every attempt to search the internet, related knowledge base documentation files, and other available resources to supplement your knowledge prior to proceeding with your task.151- Additional related skills can be found here:152 - [technical-seo-stinger](../technical-seo-stinger) - Deep-linking sub-check consumer of this Stinger's handoff summary.153 - [content-semantics-stinger](../content-semantics-stinger) - Sibling wave-W5 Stinger, subjective copy quality rather than link structure.154 - [icp-positioning-stinger](../icp-positioning-stinger) - ICP and conversion-action taxonomy referenced when judging "important per strategy" pages.155156## Ship Gate157158Ship Gate removed: research-only stinger, produces no committable code.159This Stinger's output is a findings report (`03-seo/internal-linking.md`)160written to the target audit workspace outside this repository; it never161proposes a diff or a commit to this plugin's own tracked source, so the162security-stinger / quality-stinger / github-repo-health-stinger close-out163sequence does not apply.