Skip to main content

This skill may not reflect the latest upstream change

Google Search Central Blog update on 2026-11-16 may affect this skill Last checked Nov 26, 2026.

AnalysisOfficialCertifiedAI reviewed Jul 21, 2026

Internal Link Graph

Build the internal link graph for a site, run PageRank-style authority distribution, detect orphan pages, and recommend new internal links via embedding-based semantic similarity (not keyword matching)..

v1.0.11 install

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install internal-link-graph
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/internal-link-graph/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

Internal Link Graph & Semantic Linking

You build the internal link graph and recommend new internal links based on semantic content fit, not keyword density. Internal linking is the highest-leverage SEO control surface that doesn't require new content — and it's typically under-managed because manual audits don't scale past 500 pages.


=== PRE-FLIGHT ===


  • Site URL + sitemap: https://example.com/sitemap.xml or root URL for sitemap discovery.
  • Crawl budget: number of pages (typical 500-50,000). Above 50k, plan for distributed crawl (Scrapy-cluster or Cloudflare Browser Rendering API).
  • Output target: actionable internal linking opportunities + site architecture report.
  • Embedding model: text-embedding-3-small (OpenAI, $0.02/1M tokens) OR self-hosted all-mpnet-base-v2 (sentence-transformers).
  • JavaScript rendering: required for SPAs / heavy CSR sites. Use Playwright. CPU-bound; budget accordingly.

Recovery:

  • No sitemap: discover via robots.txt + /sitemap.xml + /sitemap_index.xml + linked-from-root crawl.
  • Crawl blocked: respect — surface and stop. Don't try to bypass.

=== PHASE 1: CRAWL ===


Generate crawler.py using httpx + selectolax for HTML parsing (faster than BS4):

class Crawler:
    def __init__(self, site_root: str, max_pages: int, render_js: bool = False):
        self.site_root = normalize(site_root)
        self.max_pages = max_pages
        self.render_js = render_js  # Playwright if True
        self.seen: set[str] = set()
    
    async def crawl(self) -> dict[str, PageData]:
        seeds = await self._sitemap_urls()
        results = {}
        async for url in self._bfs(seeds):
            html = await self._fetch(url)
            results[url] = self._extract(url, html)
            if len(results) >= self.max_pages: break
        return results
    
    def _extract(self, url, html) -> PageData:
        return PageData(
            url=url,
            title=...,
            h1=...,
            word_count=...,
            internal_links=[normalize(href) for href in ... if same_domain(href)],
            content_text=...,             # for embedding
            content_paragraphs=[...],     # for link-position recommendation
        )

Respect robots.txt. Default crawl-delay 1s. User-agent: Mozilla/5.0 ... (link-graph-builder; contact: support@yourdomain).

VALIDATION: Crawl completes within budget. Internal link extraction includes ≥ 95% of <a href="..."> elements visible in source.


=== PHASE 2: GRAPH CONSTRUCTION ===


Generate graph.py:

import networkx as nx

def build(pages: dict[str, PageData]) -> nx.DiGraph:
    G = nx.DiGraph()
    for url, p in pages.items():
        G.add_node(url, 
                   title=p.title, 
                   word_count=p.word_count,
                   indexed=p.indexed,
                   noindex=p.noindex)
    for url, p in pages.items():
        for target in p.internal_links:
            if target in pages:
                if G.has_edge(url, target):
                    G[url][target]["count"] += 1
                else:
                    G.add_edge(url, target, count=1)
    return G

# PageRank with edge weights (multi-link from same source counts more)
pr = nx.pagerank(G, alpha=0.85, weight="count")

VALIDATION: Graph node count == crawled-page count. Edges count > nodes (typical: 10-50 edges per node).


=== PHASE 3: AUDIT METRICS ===


For each page:

  • PageRank (internal authority).
  • In-degree (unique pages linking IN).
  • Out-degree (unique internal pages linked TO).
  • Avg path depth from homepage (BFS shortest path).
  • Click depth from homepage (BFS — important: Google crawls deepest pages least often).

Generate flags:

FlagDefinitionAction
OrphanIn-degree = 0 (no inbound internal links)Add ≥ 2 contextual links from related pages
Near-orphanIn-degree = 1 from a low-PR pageAdd 2-3 inbound links from cluster
Authority sinkHigh PR + low out-degreeAdd outbound links to deeper cluster pages
Dead-endOut-degree = 0 (rare for non-leaf pages)Add related-content section
Too deepClick depth > 4 from homepageRestructure nav or add internal-link shortcut
Over-linkedOut-degree > 200Possible footer/template noise diluting equity

Output link_graph_audit.csv with all flags.

VALIDATION: Audit identifies orphans + authority sinks against fixture site.


=== PHASE 4: SEMANTIC LINK RECOMMENDATION ===


The real differentiator: recommend NEW internal links based on semantic similarity, not keyword matching.

For each candidate target page (priority = orphans, high-intent pages, conversion pages):

  1. Embed the target page's title + H1 + summary.
  2. Embed each paragraph of every source page (one embedding per paragraph).
  3. Find paragraph-level cosine matches ≥ 0.72 (tunable).
  4. Rank candidate source paragraphs by similarity × source PageRank.
  5. For the top 10 paragraphs per target, propose an anchor-text + insertion point.

Generate link_recommendations.md:

## Target: /pricing
Current in-degree: 2

### Recommended new inbound links:

1. **From `/blog/pricing-models`** (PR: 0.0042, similarity: 0.81)
   - Suggested anchor: "our transparent pricing"
   - Insertion point: 3rd paragraph, after "...different pricing models exist."
   - Context: "Most SaaS uses per-seat pricing. [our transparent pricing] uses usage-based..."

2. **From `/blog/saas-buyer-guide`** ...

Limit recommendations to 5-10 per target — anything more pollutes naturalness.

VALIDATION: For a sample target page, recommended links are demonstrably relevant (not "/about" linking to "/pricing" via "click here").


=== PHASE 5: SILO / CLUSTER ANALYSIS ===


Detect topical clusters via:

  • Community detection (Louvain or Leiden algorithm on the link graph).
  • Or semantic clustering (k-means on page embeddings).
  • Reconcile: a healthy cluster has high internal cohesion AND high embedding similarity.

Output topical_clusters.md:

  • Cluster N: {topic label generated from top 5 highest-PR pages' titles}
    • Pillar candidate: page with highest within-cluster PageRank
    • Supporting pages: rest of cluster
    • Recommended pillar-to-supporting links: any missing
    • Recommended cross-cluster bridges: 1-2 per cluster (not more — diffuses focus)

VALIDATION: Cluster labels are recognizable to a human looking at the URLs.


=== PHASE 6: IMPLEMENTATION HELPER ===


For each recommended link, generate either:

  • A markdown patch if the source page is in a markdown CMS (Hugo, Jekyll, Astro, Next.js MDX).
  • A CMS-specific snippet if WordPress / Webflow / Squarespace.
  • A JSON manifest for the editorial team to insert via their CMS UI.

Output link_patches/ directory with one file per source page containing all queued link insertions.

VALIDATION: Patches are syntactically valid (markdown renders, JSON parses).


=== PHASE 7: REPORTS ===


internal-link-graph/
├── README.md
├── data/
│   ├── crawl.db
│   └── graph.gexf             # importable to Gephi for visual analysis
├── reports/
│   ├── audit_summary.md
│   ├── link_graph_audit.csv
│   ├── orphan_pages.csv
│   ├── authority_sinks.csv
│   ├── link_recommendations.md
│   ├── topical_clusters.md
│   └── pagerank_distribution.png
└── patches/
    └── {hash}.patch.md

VALIDATION: All reports render. GEXF opens in Gephi correctly.


=== SELF-REVIEW ===


  • Complete: Crawl + graph + audit + semantic linking + cluster + patches?
  • Robust: Respects robots, handles JS-rendered sites, scales to 50k pages?
  • Clean: Recommendations have specific anchor text + insertion points, not just URL pairs?
  • SEO-credible: Would a technical SEO who's read SEO Theory recognize this as legit?

Common gap: keyword-anchor-text repetition (linking 50 pages to /pricing with anchor "pricing" looks manipulative). Vary anchor text from the surrounding context.


=== LEARNINGS CAPTURE ===


~/.claude/skills/internal-link-graph/LEARNINGS.md.


=== STRICT RULES ===


  • Never propose 50+ new internal links pointing to the same target with identical anchor text. Anchor diversification is a real ranking signal.
  • Never recommend links from unrelated pages just to lift in-degree. Topical fit > raw link count.
  • Never crawl past robots.txt. Respect.
  • Always preserve the crawl history. The graph is a longitudinal artifact — month-over-month changes inform architecture decisions.
  • Always include both PageRank-weighted AND semantic recommendations. PR-only = old-school; semantic-only = misses authority flow.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.79 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.62 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.57 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.57 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..56 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..50 installs
View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.198 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.167 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..133 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..126 installs
Browse category →
web-research-agentA comprehensive autonomous web research agent that performs targeted searches, fetches and parses web content, summarizes findings, and generates structured reports, adhering to industry best practices for accuracy, security, and robustness.238 installsrecallReconstructs the development cycle from git history, distills sequential/parallel patterns, and produces actionable insights for improving future iterations. Triggers: recall, retrospective, development analysis, what happened, dev cycle analysis.20 installsseoAutonomous SEO + AI-search optimization agent for 2026. Audits and fixes technical SEO, on-page metadata, structured data, Core Web Vitals (LCP/INP/CLS), llms.txt, Generative Engine Optimization (GEO) for ChatGPT/Perplexity/AI Overviews, E-E-A-T author signals.10 installsapp-size-optimizerAnalyzes mobile app binary size -- asset audit for unused images and font subsetting, code stripping with ProGuard and tree-shaking, on-demand resources, dynamic feature modules, and app thinning strategies..6 installsbilibili-comment-insights当用户需要做 B站评论分析、B站评论洞察、B站用户反馈分析、B站需求挖掘、痛点总结、购买顾虑整理、FAQ 提炼、口碑分析、评论回复观察或内容讨论复盘时使用。基于用户提供的 B站视频、专栏、动态链接或对应内容 ID 下的评论结果,面向内容运营、产品调研、品牌调研和创作者。由社媒数据助手 SocialDataX 提供。5 installsbundle-analysisAnalyze frontend bundle size, detect heavy dependencies, find duplicates, evaluate tree-shaking, recommend code splitting, and generate size budget configs. Triggers: phrases: "analyze bundle size", "why is my bundle so big", "find heavy dependencies", "reduce bundle size".5 installs
What does the internal-link-graph skill do?

Build the internal link graph for a site, run PageRank-style authority distribution, detect orphan pages, and recommend new internal links via embedding-based semantic similarity (not keyword matching).. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the internal-link-graph skill?

Run `npx @skills-hub-ai/cli install internal-link-graph` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/internal-link-graph/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does internal-link-graph work with?

internal-link-graph runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the internal-link-graph skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use internal-link-graph after installing it?

In Claude Code, type `/internal-link-graph` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the internal-link-graph skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.