# Internal Linking Optimizer

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

- Repository: https://github.com/Affitor/affiliate-skills (757 stars)
- Category: Marketing
- License: MIT
- Last updated: 2026-10-19
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -g -a claude-code -y`
Codex: `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -g -a codex -y`
Cursor: `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -g -a cursor -y`
Gemini CLI: `npx skills add Affitor/affiliate-skills --skill internal-linking-optimizer -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Affitor/affiliate-skills`

## 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".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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)

The rest: https://github.com/Affitor/affiliate-skills/blob/HEAD/skills/analytics/internal-linking-optimizer/SKILL.md
