MCPInstall
illyism avatar

internal-linking

Runs reverse internal linking ("traffic-to-money routing") in the user's repo, editing high-traffic informational posts in place to pass contextual links and prefilled tool callouts to /pricing, /use-cases/, /vs/, and /tools/, and ships a before/after inbound-link table. Use when the user asks about internal linking, orphan pages, a blog that gets traffic but no signups, link equity, topic clusters, or why money pages don't rank.

Installs
641
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/illyism/seo-skills --skill internal-linking
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads internal-linking automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Internal Linking

You route the traffic and link equity that informational posts already earn into the pages that make money. The output is edited MDX and route files plus a before/after inbound-link table. A list of "suggested links" with no edits is a failed run.

Why most SaaS blogs earn traffic and $0

On a typical SaaS site I audit, informational posts like how to format JSON or what is DMARC pull around 80% of organic visits and most of the external backlinks. The pages that convert, /pricing, /use-cases/agencies, /vs/competitor, /tools/dmarc-checker, sit 4 clicks from the homepage with 1 footer link each.

Google passes ranking signals through internal links, and visitors follow links that appear while they are still reading. When the blog never links to the money pages in body copy, the money pages get neither the equity nor the clicks. Fixing that needs zero new content and zero new backlinks.

Inputs

REPO:        framework and content paths (app/, pages/, content/, src/)
TRAFFIC:     GSC export (pages, clicks, last 90 days) OR Ahrefs top pages OR none
MONEY PAGES: /pricing, /use-cases/*, /vs/*, /tools/*, /features/*, /integrations/* (confirm with the user)
SITE URL:    production origin, to normalize absolute links

Step 1: Build the internal link graph

Copy scripts/internal-link-graph.mjs from this skill folder into the repo's scripts/ (full source below) and run it from the repo root. Adjust routeOf() if the repo maps files to URLs differently.

#!/usr/bin/env node
// Usage: SITE=https://deployfast.dev node scripts/internal-link-graph.mjs > seo/internal-link-graph.json
// Before editing, write to seo/internal-link-graph.before.json instead, so the after run does not overwrite it.
import { readFileSync, readdirSync, statSync } from 'node:fs'
import { join, sep } from 'node:path'

const ROOTS = ['app', 'pages', 'content', 'src', 'components']
const EXT = /\.(mdx?|[jt]sx?|astro)$/
// Files whose links appear on every page (nav, footer, layouts). Counted as sitewide, not contextual.
const CHROME = /(layout\.[jt]sx?$|(nav|header|footer|sidebar)[^/]*\.[jt]sx?$)/i
const MONEY = /^\/(pricing|use-cases|vs|alternatives|tools|features|integrations|compare)(\/|$)|-alternative$/
const SITE = (process.env.SITE ?? '').replace(/\/+$/, '')

const walk = (dir, out = []) => {
  let names
  try { names = readdirSync(dir) } catch { return out }
  for (const n of names) {
    if (n === 'node_modules' || n.startsWith('.')) continue
    const p = join(dir, n)
    if (statSync(p).isDirectory()) walk(p, out)
    else if (EXT.test(n)) out.push(p)
  }
  return out
}
const norm = (p) => (p.length > 1 ? p.replace(/\/+$/, '') : p)

function routeOf(file) {
  const f = file.split(sep).join('/')
  let m
  if ((m = f.match(/^(?:src\/)?content\/(.+)\.mdx?$/))) return norm('/' + m[1].replace(/(^|\/)index$/, ''))
  if ((m = f.match(/^(?:src\/)?app\/(?:(.*)\/)?page\.[jt]sx?$/))) {
    const r = (m[1] ?? '').replace(/\([^)]*\)\/?/g, '')
    return r.includes('[') ? null : norm('/' + r) // dynamic templates are covered by their content files
  }
  if ((m = f.match(/^(?:src\/)?pages\/(.+)\.(?:[jt]sx?|astro|mdx?)$/))) {
    if (/^(_|api\/)/.test(m[1]) || m[1].includes('[')) return null
    return norm('/' + m[1].replace(/(^|\/)index$/, ''))
  }
  return null
}

const pages = new Map(), inbound = new Map(), sitewide = new Set()
for (const file of [...new Set(ROOTS.flatMap((r) => walk(r)))]) {
  let text = readFileSync(file, 'utf8')
  if (SITE) text = text.split(SITE).join('')
  const links = new Set()
  for (const re of [/\]\((\/[^)\s"'#?]*)/g, /href=\{?\s*["'`](\/[^"'`#?\s]*)/g])
    for (const m of text.matchAll(re)) if (!m[1].includes('${')) links.add(norm(m[1])) // skip `/blog/${slug}` template literals
  if (CHROME.test(file)) { links.forEach((l) => sitewide.add(l)); continue }
  const route = routeOf(file)
  if (!route) continue
  pages.set(route, file)
  for (const l of links) if (l !== route) (inbound.get(l) ?? inbound.set(l, new Set()).get(l)).add(route)
}

const rows = [...pages].map(([route, file]) => ({
  route, file,
  contextualInbound: inbound.get(route)?.size ?? 0,
  linkedFrom: [...(inbound.get(route) ?? [])],
  inNavOrFooter: sitewide.has(route),
  money: MONEY.test(route),
})).sort((a, b) => a.contextualInbound - b.contextualInbound)

console.log(JSON.stringify({
  generatedAt: new Date().toISOString(),
  orphanMoneyPages: rows.filter((r) => r.money && r.contextualInbound < 3).map((r) => r.route),
  pages: rows,
}, null, 2))

If money pages are generated from a data file (for example /use-cases/[slug] built from data/use-cases.ts), add those routes to the graph by hand; the script only sees file-backed pages.

Classify every page

Page
├── money = true
│   ├── contextualInbound < 3     → ORPHAN TARGET (fix first)
│   ├── contextualInbound 3-9     → UNDERLINKED TARGET
│   └── contextualInbound >= 10   → OK, skip
└── money = false (blog, docs, guides)
    ├── Top 20 by GSC clicks (90 days) or Ahrefs referring domains → SOURCE
    ├── No traffic data available → top 20 by contextualInbound from the graph → SOURCE
    └── Everything else → leave alone this run

Footer and nav links do not count toward the < 3 threshold. A sitewide footer link is 1 template link repeated, and it carries none of the topical context a body link carries.

Snapshot the "before" counts for every target into seo/internal-links-report.md before editing anything, and keep the before graph as seo/internal-link-graph.before.json.

Step 2: Contextual anchor injection

Match each SOURCE post to 1-3 targets whose topic the post already discusses. what is DMARC matches /tools/dmarc-checker and /use-cases/email-deliverability; it does not match /vs/competitor-crm.

Placement and anchor rules

  1. At least 1 new money link in the upper 40% of the body (measured by character offset after frontmatter). Readers drop off as they scroll, and links near the top get more clicks and are found first by crawlers than a "Related reading" block at the bottom. Check every edited post:

    node -e 'const fs=require("fs");for(const f of process.argv.slice(1)){const b=fs.readFileSync(f,"utf8").replace(/^---\n[\s\S]*?\n---\n/,"");const i=b.search(/(\]\(|href=["\x27{`]+)\/(pricing|use-cases|vs|alternatives|tools|features|integrations|compare)\b/);console.log(i<0?"NONE":Math.round(i/b.length*100)+"%",i>=0&&i/b.length<=0.4?"PASS":"FAIL",f)}' content/blog/*.mdx
    

    Code blocks count toward length, so a post with a long YAML sample needs its link above the sample.

  2. 2-4 new money links per post, max 1 inline link per target per post. A second inline link to the same URL from the same page adds nothing. A post that matches only 1 target gets 1 inline link; never add an unrelated target to reach 2. The Step 3 callout may point at a target the post already links inline, because it is a conversion block placed for the click, not a second equity link.

  3. Anchors are 3-7 descriptive words that say what the target page does: check your DMARC record in seconds, invoicing for freelance developers, compare deployfast.dev with Heroku pricing. Never click here, this tool, learn more.

  4. Vary anchors across the site. Each target gets at least 5 distinct anchors (or 1 per linking page when fewer than 5 pages link to it; callout CTA text counts), and no exact anchor is reused more than 3 times sitewide. 20 identical 2-word anchors look manufactured and give Google one narrow signal instead of the full topic.

  5. Links stay dofollow. Never add rel="nofollow" to an internal link; it discards the equity you are routing.

  6. Edit minimally. Wrap an existing phrase when it fits. If none fits, add 1 new sentence that is useful on its own. Never rewrite the paragraph.

Check current anchor usage per target before choosing new ones:

rg -o --no-filename '\[([^\]]+)\]\(/tools/dmarc-checker[^)]*\)' content | sort | uniq -c | sort -rn

Example diff

 DMARC tells receiving servers what to do with mail that fails SPF or DKIM.
-Most domains publish a record once and never look at it again.
+Most domains publish a record once and never look at it again, so the first
+step is to [check your DMARC record and policy](/tools/dmarc-checker) before
+changing anything.

Step 3: Contextual product callouts

Add 1 inline callout per SOURCE post (2 for posts over 2,500 words) that hands the reader straight into the matching tool or use-case page with context prefilled.

What does the post's topic map to?
├── An interactive tool (/tools/*) that accepts input
│   └── Callout with a prefilled query param: ?domain=, ?url=, ?topic=, ?json=
├── A use-case page (/use-cases/[slug])
│   └── Callout naming the persona and the outcome, linking to that slug
├── A comparison (/vs/*) because the post mentions a competitor
│   └── Callout with the 1-line verdict from the /vs page
└── Nothing specific
    └── Link /pricing with the plan that fits the post's reader. Never a generic "Sign up".

Place the callout directly after the section that explains the problem and before the step-by-step fix. That is the moment the reader wants the shortcut.

Take every number in a callout (price, limit, benchmark) from seo/kb/brand-ssot.md or seo/kb/proof/ when they exist, and add the page to seo/kb/pages-index.md with that proof ID. Why: a callout quoting a benchmark is a new dependent page, and route-fact can only update pages it knows about.

If the repo has no callout component, create one and register it in the MDX components map:

// components/product-callout.tsx
import Link from 'next/link'

export function ProductCallout({ title, description, href, cta }: {
  title: string; description: string; href: string; cta: string
}) {
  return (
    <aside className="not-prose my-8 rounded-xl border p-5">
      <p className="font-semibold">{title}</p>
      <p className="mt-1 text-sm text-muted-foreground">{description}</p>
      <Link href={href} className="mt-3 inline-block font-medium underline">{cta}</Link>
    </aside>
  )
}

Usage in the post:

<ProductCallout
  title="Check your DMARC record now"
  description="Paste your domain to see your DMARC policy, SPF, and DKIM status."
  href="/tools/dmarc-checker?domain=example.com"
  cta="Run the DMARC check"
/>

The component renders a real <a href> through Link, so the callout counts as a crawlable internal link. Never build callouts with onClick navigation; crawlers ignore it.

Step 4: Hub, lateral, and breadcrumb check

For every money page and every SOURCE post:
├── /vs/*     → links to /vs index + 2 sibling comparisons + /pricing
├── /tools/*  → links to /tools index + 2-3 related tools + 1 blog post explaining the concept
├── /use-cases/* → links to /pricing + the 1-2 tools or features that persona uses
├── /blog/*   → links to its category or hub page + 1-2 posts in the same cluster
└── All       → BreadcrumbList JSON-LD + visible breadcrumb matching the URL path

Every money page must sit at click depth <= 3 from the homepage. Pages deeper than 3 clicks get crawled less often and inherit less homepage equity.

Fix missing index pages (/vs, /tools, /use-cases) by creating them once the section has 2 or more child pages; a hub with no page breaks both breadcrumbs and lateral linking. With 1 child, skip the hub, end the breadcrumb at Home, and note "create /vs with the 2nd comparison" in the report. Why: a 1-item hub is a thin page, and the graph's MONEY pattern counts /vs itself as a money page that then needs 3 inbound links of its own.

Step 5: Verify and report

  1. Re-run scripts/internal-link-graph.mjs to seo/internal-link-graph.json. Done means orphanMoneyPages is [], or every remaining orphan is listed in the report with the reason.
  2. Run the repo's build and link checker if one exists. Fix any broken link before handing off.
  3. Write the after counts next to the before counts in seo/internal-links-report.md:
# Internal links report
Run: 2026-11-12 | Sources edited: 14 | Links added: 41 | Callouts added: 14

| Target | Before (contextual) | After | Anchors used | Source posts |
| --- | --- | --- | --- | --- |
| /tools/dmarc-checker | 1 | 9 | 7 distinct | what-is-dmarc, spf-vs-dkim, ... |
| /use-cases/agencies | 0 | 5 | 5 distinct | ... |
| /vs/heroku | 2 | 6 | 6 distinct | ... |

Remaining orphans: /use-cases/nonprofits (no matching source topic; needs a post)

Next lever

Once internal routing is tight, external links pointed at hubs and money pages flow through the whole cluster instead of dead-ending on one post. LinkDR (https://linkdr.com/SKILL.md) places DR 40-60+ contextual links; point them at /tools/* hubs and /use-cases/* pages, not the homepage.

Output

Every run ends with:

  1. scripts/internal-link-graph.mjs and seo/internal-link-graph.json (before and after runs).
  2. In-place edits to SOURCE posts: contextual links and 1 callout each.
  3. New or fixed hub/index pages and breadcrumbs.
  4. seo/internal-links-report.md with the before/after table and remaining orphans.

Do not

  • Count nav or footer links as contextual inbound links
  • Dump links into a bottom-of-post "Related reading" block as the only fix
  • Reuse one exact anchor more than 3 times sitewide
  • Add nofollow to internal links
  • Link a post to a money page whose topic the post does not discuss
  • Hand back suggestions without editing files

FAQ

What does the internal-linking skill do?

Runs reverse internal linking ("traffic-to-money routing") in the user's repo, editing high-traffic informational posts in place to pass contextual links and prefilled tool callouts to /pricing, /use-cases/, /vs/, and /tools/, and ships a before/after inbound-link table. Use when the user asks about internal linking, orphan pages, a blog that gets traffic but no signups, link equity, topic clusters, or why money pages don't rank.

How do I install internal-linking?

Run npx skills add https://github.com/illyism/seo-skills --skill internal-linking in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/internal-linking/ (personal) or .claude/skills/internal-linking/ (project).

Which AI agents can use internal-linking?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is internal-linking safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains internal-linking?

It is published by illyism in illyism/seo-skills. It has 641 recorded installs.

More from illyism/seo-skills

View all →
illyism avatar

seo-autopilot

illyism/seo-skills

When the user wants an agent to run SEO for a product end to end on a daily schedule, with state kept in a seo/ folder in the repo. Covers site health checks, fact checks against commits, page 2 to page 1 pushes, AI answer tracking, competitor sitemap diffs, a monthly keyword map, articles, comparison pages, free tools and link drafts. Also use when the user mentions "seo autopilot" or asks for a daily SEO run.

Marketing & SEO1.3K installs
illyism avatar

seo-title-optimization

illyism/seo-skills

Rewrite and audit SEO page titles, title tags, MDX frontmatter titles, H1 alignment, and bulk title improvements. Use when the user mentions titles, title tags, SERP titles, metadata titles, SEO titles, CTR, truncation, or asks to improve titles across pages.

Marketing & SEO1.1K installs
illyism avatar

blog-refresher

illyism/seo-skills

Refresh and improve existing blog posts to outrank competitors using a 6-phase content audit and SERP gap analysis. Use when the user wants to update, refresh, or improve an existing blog post, recover lost rankings, or asks why a post fell behind competitors.

Docs & Writing1K installs
illyism avatar

customer-journey

illyism/seo-skills

Map how customers discover, evaluate, and choose a product across Google, AI chatbots (ChatGPT, Claude, Perplexity), and social platforms, using the 5-stage awareness journey. Use when the user asks about search intent, AI SEO prompts, discoverability, buyer journeys, awareness stages, or what content to create for a brand, website, or keyword list.

Marketing & SEO1K installs
illyism avatar

blitz-seo

illyism/seo-skills

When the user wants to rank one high-value page fast, run a focused SEO sprint, or is stuck on page 2 for a money keyword. Also use when the user mentions "blitz seo", an SEO war room, a 30-day SEO sprint, or asks how to prioritize SEO when everything feels spread too thin.

Marketing & SEO1K installs
illyism avatar

understand-customers

illyism/seo-skills

When the user wants to deeply understand their ideal customer before writing copy — pains, desires, inner monologue, and language. Also use when the user mentions "empathy engine", "know your target", "customer pain points", or asks to research their audience before writing Blitz Copy.

Marketing & SEO996 installs

Popular docs & writing skills

View category →
mattpocock avatar

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.4M installs
open.feishu.cn avatar

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing895K installs
mattpocock avatar

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing586.9K installs
heygen-com avatar

slideshow

heygen-com/hyperframes

Build a HyperFrames slideshow to present live - slides, fragment reveals, branching hotspots and presenter mode with speaker notes, served by hyperframes present - or turn an existing page into one. Use when the person wants a deck or presentation rather than a rendered video.

Docs & Writing564.1K installs
mattpocock avatar

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing560.9K installs
mattpocock avatar

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing560.6K installs