Agent skill

Internal Linking Optimizer

by Affitor in Affitor/affiliate-skills

Analyze site's internal link structure and optimize for hub-and-spoke SEO architecture.

MITAuto-check passedMarketing & SEO

Install Internal Linking Optimizer

skills CLI
$ npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Affitor/affiliate-skills internal-linking-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Affitor/affiliate-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/analytics/internal-linking-optimizer .claude/skills/internal-linking-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
internal-linking-optimizer
GitHub stars
699
Token cost
~2.4k tokens
SKILL.md length
822 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Analyze site's internal link structure and optimize for hub-and-spoke SEO architecture.

  • Works in 5 steps: Discover Site Structure → Analyze Current Link Structure → Identify Issues → …
  • : optimize internal links
  • SKILL.md covers Stage, When to Use, Input Schema and Workflow, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Internal Linking Optimizer is an agent skill from Affitor/affiliate-skills. Analyze site's internal link structure and optimize for hub-and-spoke SEO architecture. Triggers on: "optimize internal links", "internal linking", "link structure", "hub and spoke links", "orphan pages", "link equity", "internal link audit", "fix my internal links", "link architecture", "site structure optimization", "internal linking strategy", "link flow", "improve site structure", "find orphan pages", "maximize link equity", "internal link map".

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Claude Code, ChatGPT, Gemini CLI, Cursor, Windsurf, OpenClaw, any AI agent

It sits in Marketing & SEO, covering On-page SEO. The repository describes itself as: 50 AI agent skills for affiliate marketing. Research trending content, write data-backed posts, generate infographics, build landing pages, deploy — full flywheel with social… The licence is MIT.

When your agent uses it

  • : optimize internal links
  • Internal linking
  • Hub and spoke links
  • Internal link audit

Example prompts

  • “optimize internal links”
  • “internal linking”
  • “link structure”
  • “/internal-linking-optimizer”

Requirements

  • Compatibility (from SKILL.md): Claude Code, ChatGPT, Gemini CLI, Cursor, Windsurf, OpenClaw, any AI agent

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Discover Site Structure
  2. Analyze Current Link Structure
  3. Identify Issues
  4. Generate Linking Instructions
  5. Self-Validation

What it can do on your machine

Read from SKILL.md and the folder at commit e43bfae. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code, ChatGPT, Gemini CLI, Cursor, Windsurf, OpenClaw, any AI agent

    From compatibility in the SKILL.md frontmatter.

Context cost

Internal Linking Optimizer loads about 2.4k tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 822 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Affitor/affiliate-skills at commit e43bfae, republished under its MIT licence (© Affitor). 822 words, ~2,364 tokens.

Download SKILL.mdSave it as .claude/skills/internal-linking-optimizer/SKILL.md (or your agent's skills folder).
name
internal-linking-optimizer
description
Analyze site's internal link structure and optimize for hub-and-spoke SEO architecture. Triggers on: "optimize internal links", "internal linking", "link structure", "hub and spoke links", "orphan pages", "link equity", "internal link audit", "fix my internal links", "link architecture", "site structure optimization", "internal linking strategy", "link flow", "improve site structure", "find orphan pages", "maximize link equity", "internal link map".
compatibility
Claude Code, ChatGPT, Gemini CLI, Cursor, Windsurf, OpenClaw, any AI agent
license
MIT
version
1.0.0
tags
affiliate-marketing, analytics, optimization, tracking, internal-links, site-structure
metadata.author
affitor
metadata.version
1.0
metadata.stage
S6-Analytics

Internal Linking Optimizer

Analyze your site's internal link structure and generate an optimized hub-and-spoke linking plan. Finds orphan pages (no internal links pointing to them), identifies link equity bottlenecks, and creates specific linking instructions to maximize SEO impact.

Stage

S6: Analytics & Optimization — This is analytics/audit work on existing content. Internal linking is the most underutilized SEO lever — it's 100% in your control and costs nothing.

When to Use

  • User wants to improve their site's SEO through better internal linking
  • User asks about "orphan pages", "link structure", "hub and spoke"
  • User says "internal linking", "link audit", "link equity"
  • After publishing new content — new pages need internal links within 48 hours
  • After keyword-cluster-architect — cluster structure defines the ideal link architecture
  • Monthly maintenance task alongside content-decay-detector

Input Schema

yaml
site_url: string              # REQUIRED — site to analyze
                              # e.g., "myblog.com"

pages: object[]               # OPTIONAL — known pages with their topics
  - url: string
    title: string
    topic_cluster: string     # Which topical cluster it belongs to
    is_hub: boolean           # Is this a hub page?

hub_pages: string[]           # OPTIONAL — URLs of your hub/pillar pages
                              # Default: auto-detected

new_pages: string[]           # OPTIONAL — recently published pages needing links
                              # Default: none

Chaining from S3 keyword-cluster-architect: Use keyword_clusters.hub and keyword_clusters.clusters to define ideal link architecture.

Workflow

Step 1: Discover Site Structure
  1. web_search: site:[site_url] — discover indexed pages
  2. Map pages to topic clusters (if not provided)
  3. Identify current hub pages (pages that link to many others)
  4. Note orphan pages (pages with few/no internal links pointing to them)

Read shared/references/seo-strategy.md for internal linking rules.

For each page group:

  • Count internal links TO this page (inlinks)
  • Count internal links FROM this page (outlinks)
  • Check link depth from homepage (should be ≤ 3 clicks)
  • Identify the anchor text used
Step 3: Identify Issues

Flag:

  1. Orphan pages — no or few internal links pointing to them
  2. Hub pages with weak linking — hub should link to ALL spokes in its cluster
  3. Missing spoke-to-spoke links — related spokes should link to each other
  4. Broken contextual flow — pages that should link to each other but don't
  5. Over-linked pages — too many outlinks dilute link equity
  6. Missing reverse links — spoke links to hub but hub doesn't link back
Step 4: Generate Linking Instructions

For each issue, provide specific instructions:

Page: [URL]
Action: Add internal link to [target URL]
Anchor text: "[suggested anchor]"
Location: [where in the content to add it]
Priority: [P0/P1/P2]
Reason: [why this link matters]
Step 5: Self-Validation
  • Instructions are specific (exact URLs, anchor text, location)
  • Hub-and-spoke architecture is logical
  • Anchor text is natural and keyword-relevant
  • No recommendations to over-link (max 3-5 internal links per 1000 words)
  • New pages have at least 2-3 internal links pointing to them

Output Schema

yaml
output_schema_version: "1.0.0"
internal_links:
  site: string
  pages_analyzed: number
  issues_found: number
  links_to_add: number

  orphan_pages: string[]        # Pages with zero/few inlinks
  hub_pages: string[]           # Identified hub pages

  link_actions:
    - source_url: string        # Page to add the link ON
      target_url: string        # Page to link TO
      anchor_text: string       # Suggested anchor text
      location: string          # Where in the content
      priority: string          # "P0" | "P1" | "P2"
      reason: string

  link_structure:               # Current state summary
    total_pages: number
    avg_inlinks: number
    avg_outlinks: number
    max_depth: number

chain_metadata:
  skill_slug: "internal-linking-optimizer"
  stage: "analytics"
  timestamp: string
  suggested_next:
    - "seo-audit"
    - "content-decay-detector"
    - "affiliate-blog-builder"

Output Format

## Internal Link Audit: [Site]

### Structure Overview
- **Pages analyzed:** XX
- **Orphan pages:** XX (need links urgently)
- **Hub pages:** XX
- **Links to add:** XX
- **Average inlinks per page:** X.X

### Orphan Pages (P0 — fix immediately)
These pages have no/few internal links and are invisible to Google:
1. [URL] — [title] — 0 inlinks
2. [URL] — [title] — 1 inlink

### Link Actions

#### P0 — Critical
| Source Page | → | Target Page | Anchor Text | Location |
|---|---|---|---|---|
| [source] | → | [target] | "[anchor]" | After paragraph about [topic] |

#### P1 — High
[same table]

#### P2 — Maintenance
[same table]

### Hub-and-Spoke Health
| Hub Page | Expected Spokes | Linked Spokes | Missing Links |
|---|---|---|---|
| [hub] | XX | XX | [list missing] |

### Quick Wins
1. [Easiest high-impact link to add]
2. [Second easiest]
3. [Third]

Error Handling

  • No site URL: "I need your site URL to analyze internal links."
  • Site not indexed: "This site doesn't appear to be indexed. Check robots.txt and sitemap."
  • Too few pages: "With only [X] pages, focus on creating more content first. Internal linking becomes powerful at 10+ pages."
  • No hub pages identifiable: "I can't identify clear hub pages. Run keyword-cluster-architect first to define your topic structure."

Examples

Example 1: "Audit my blog's internal links" → Discover pages, map structure, find orphan pages, generate specific linking instructions with anchor text and placement.

Example 2: "I just published a new article, what should I link to it?" → Identify 3-5 existing pages that should link to the new article, with specific anchor text and paragraph locations.

Example 3: "Optimize internal links based on my keyword clusters" (after keyword-cluster-architect) → Use cluster structure to define ideal hub-spoke links. Compare current vs ideal. Generate gap-filling instructions.

Show full SKILL.md (312 more words)Show less

Revenue & Action Plan

Expected Outcomes
  • Revenue potential: Internal linking directly increases organic traffic to your money pages (pages with affiliate links). Fixing orphan pages typically increases their organic traffic by 30-100% within 4-6 weeks. If an orphan page earns $100/month, proper linking can push it to $130-200/month
  • Benchmark: Sites with optimized internal linking rank 20-40% higher for target keywords. Every hub-spoke connection you add is a signal to Google that your content is authoritative
  • Key metric to track: Organic traffic to money pages (pages containing affiliate links) — measure before and after internal link optimization. Target: 30%+ traffic increase within 6 weeks
Do This Right Now (15 min)
  1. Fix the top 3 P0 (Critical) links first — these are orphan money pages getting zero internal link juice
  2. Open each source page, find the suggested paragraph, and add the internal link with the recommended anchor text
  3. Submit the updated pages to Google Search Console for re-indexing: Inspect URL → Request Indexing
  4. Set a monthly reminder to re-run this audit
Track Your Results

After 4 weeks: check Google Search Console for the orphan pages. Did impressions/clicks increase? After 8 weeks: did rankings improve for target keywords? Internal linking compounds — each optimization makes the next one more powerful.

Next step — copy-paste this prompt: "Run an SEO audit on my site to find more optimization opportunities" → runs seo-audit

Flywheel Connections

Feeds Into
  • content-decay-detector (S3) — pages with weak link structure may be decaying
  • seo-audit (S6) — link structure is a key SEO factor
  • affiliate-blog-builder (S3) — new articles need immediate internal links
Fed By
  • keyword-cluster-architect (S3) — cluster structure defines ideal link architecture
  • affiliate-blog-builder (S3) — new content that needs linking
  • seo-audit (S6) — identifies pages with link structure issues
Feedback Loop
  • seo-audit (S6) tracks ranking changes after link optimization → measure impact of internal linking changes

References

  • shared/references/seo-strategy.md — Hub-and-spoke linking rules, anchor text rules, link equity flow
  • shared/references/flywheel-connections.md — Master connection map

© Affitor, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/analytics/internal-linking-optimizer of Affitor/affiliate-skills.

Open the folder on GitHubat commit e43bfae

Compare with similar skills

Internal Linking Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Internal Linking Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Internal Linking Optimizer this skillAffitor/affiliate-skills699—~2.4kAutomated safety check: PassMIT
SEO Keyword ClusteringAgriciDaniel/claude-seo18k2 repos~3.3kAutomated safety check: PassMIT
SEO Content Brief GeneratorAgriciDaniel/claude-seo18k2 repos~2.6kAutomated safety check: PassMIT
Nemoclaw Maintainer Normalize Title TagsNVIDIA/NemoClaw23k—~693Automated safety check: PassApache-2.0
AI Citability Scorerzubair-trabzada/geo-seo-claude11k2 repos~3.7kAutomated safety check: NotesMIT
SEO Drift MonitorAgriciDaniel/claude-seo18k1 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • SEO Keyword Clustering

    AgriciDaniel/claude-seo

    Clusters keywords by how much their search results overlap and designs a hub-and-spoke content plan with an internal link matrix and an interactive cluster map.

    18k GitHub starsUsed in 2 repos~3.3k tokens
    Marketing & SEOAuto-check passed
  • SEO Content Brief Generator

    AgriciDaniel/claude-seo

    Builds research-backed SEO content briefs with competitor scoring, per-section word counts and page-type templates, for new pages or improving existing ones.

    18k GitHub starsUsed in 2 repos~2.6k tokens
    Marketing & SEOAuto-check passed
  • Remove bracketed NemoClaw tags from GitHub issue and PR titles.

    23k GitHub stars~693 tokensUpdated today
    Marketing & SEOAuto-check passed
  • AI Citability Scorer

    zubair-trabzada/geo-seo-claude

    Scores how likely AI assistants are to quote passages from a web page and suggests rewrites that make those passages easier to extract.

    11k GitHub starsUsed in 2 repos~3.7k tokens
    Marketing & SEOAuto-check: notes
  • SEO Drift Monitor

    AgriciDaniel/claude-seo

    Captures baselines of a page's SEO-critical elements, compares later snapshots against them and flags regressions by severity, like version control for on-page SEO.

    18k GitHub starsUsed in 1 repo~1.9k tokens
    Marketing & SEOAuto-check passed
  • Meta Tags Optimizer

    nowork-studio/notfair-plugin

    Writes and improves title tags, meta descriptions, Open Graph and Twitter card tags for click-through, with character counts and A/B test variants.

    3.9k GitHub starsUsed in 1 repo~2.7k tokens
    Marketing & SEOAuto-check passed

More from Affitor/affiliate-skills

All 50 skills in this repo
  • Performance Report

    Affitor/affiliate-skills

    Generate affiliate performance reports with KPIs and recommendations.

    699 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Affiliate Check

    Affitor/affiliate-skills

    Live affiliate program data from openaffiliate.dev. An agent skill from Affitor/affiliate-skills.

    699 GitHub stars~808 tokensUpdated 23 days ago
    Auto-check: notes
  • Affiliate Program Search

    Affitor/affiliate-skills

    Research and evaluate affiliate programs to find the best ones to promote.

    699 GitHub stars~2.4k tokensUpdated 23 days ago
    Auto-check passed
  • Bio Link Deployer

    Affitor/affiliate-skills

    Create a Linktree-style bio link hub page as a single self-contained HTML file.

    699 GitHub stars~3k tokensUpdated 23 days ago
    Auto-check passed
  • Conversion Tracker

    Affitor/affiliate-skills

    Set up affiliate conversion tracking with UTM parameters and link tagging.

    699 GitHub stars~2.1k tokensUpdated 23 days ago
    Auto-check passed
  • Product Showcase Page

    Affitor/affiliate-skills

    Build a single-product deep-dive showcase page as a self-contained HTML file.

    699 GitHub stars~3.6k tokensUpdated 23 days ago
    Auto-check passed

Categories

Questions about Internal Linking Optimizer

What does Internal Linking Optimizer do?

Analyze site's internal link structure and optimize for hub-and-spoke SEO architecture. Internal Linking Optimizer is an agent skill from Affitor/affiliate-skills. Analyze site's internal link structure and optimize for hub-and-spoke SEO architecture.

When should I use Internal Linking Optimizer?

Internal Linking Optimizer fits situations like: : optimize internal links; internal linking; hub and spoke links; internal link audit.

How do I install Internal Linking Optimizer in Claude Code?

Run `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -a claude-code`. Or copy the skill folder (skills/analytics/internal-linking-optimizer in Affitor/affiliate-skills) into .claude/skills/internal-linking-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Internal Linking Optimizer in Codex?

Run `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -a codex`. Or copy the skill folder (skills/analytics/internal-linking-optimizer in Affitor/affiliate-skills) into .agents/skills/internal-linking-optimizer in your project. Codex loads it when a task matches its description.

Can I use Internal Linking Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/internal-linking-optimizer, .gemini/skills/internal-linking-optimizer, .github/skills/internal-linking-optimizer and .opencode/skills/internal-linking-optimizer in your project.

What does Internal Linking Optimizer need to run?

SKILL.md names no scripts, command-line tools or credentials: Internal Linking Optimizer is instructions for the agent only. Compatibility (from SKILL.md): Claude Code, ChatGPT, Gemini CLI, Cursor, Windsurf, OpenClaw, any AI agent.

Does Internal Linking Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Internal Linking Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Internal Linking Optimizer use?

Internal Linking Optimizer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Internal Linking Optimizer use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Internal Linking Optimizer?

Skills that share tags, products or a category with Internal Linking Optimizer: SEO Keyword Clustering (AgriciDaniel/claude-seo, 18k stars), SEO Content Brief Generator (AgriciDaniel/claude-seo, 18k stars), Nemoclaw Maintainer Normalize Title Tags (NVIDIA/NemoClaw, 23k stars) and AI Citability Scorer (zubair-trabzada/geo-seo-claude, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Internal Linking Optimizer?

Affitor (a GitHub organization) maintains it in Affitor/affiliate-skills, which has 699 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on September 15, 2026.

Source: Affitor/affiliate-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.