Docsbook
← Back to catalog
analysis

docs-navigation-linking

Fix the dead ends and orphan pages in your docs. Walks the full doc graph to find broken internal links, pages nothing links to, generic anchor text ("click here"), over-deep hierarchies and missing next-step links between related pages. Cross-file — requires the whole graph, not one page.

Install & use this skill

Pick your AI client — install this single skill and call it.

1. Install
npx skills add Docsbook-io/docs-skills --skill docs-navigation-linking -a claude-code
2. Use
/docs-navigation-linking

Invoke as a slash command in chat.

Or: runtime discovery via Docsbook MCP

Already connected to the Docsbook MCP server? Skip install — ask your agent to load this skill on demand.

@docsbook find_skill "docs-navigation-linking"

docs-navigation-linking — Navigation and Linking Analysis

Workflow#

  1. Gather the docs — get the list of pages in scope and read their content. If a semantic/graph search tool over the markdown is available (self-hosted markdown-lsp, or a connected Docsbook workspace), prefer it — faster and cheaper than scanning files; otherwise read the files directly with grep/find. Prioritize Tier 1 pages (quick-start, pricing, auth, install) first. This skill requires the full doc graph — do not run on a single page in isolation.
  2. Build link sets — extract all href values from every page; compare to the full page list to identify orphans and broken links.
  3. Apply checklist — check internal links, orphan pages, anchor text quality, navigation hierarchy, next steps / cross-references, and external links.
  4. Produce report — return one JSON issue object per finding, sorted by severity.

Guardrails#

Inputs#

This skill needs two things, by whatever means are available:

Acceleration (optional). Graph/semantic search over the docs makes navigation faster and cheaper than scanning files. You can self-host it with markdown-lsp, or get the same capability in the cloud by connecting a Docsbook workspace. With nothing connected, plain file reads and grep/find work fine.

Checklist#

Orphan Pages#

Anchor Text Quality#

Next Steps and Cross-References#

Orphan Detection Pattern#

Using the doc graph (the page tree + links):

  1. Build a set of all page paths: all_pages = {page.path for page in graph}
  2. Build a set of linked pages: linked = {href for page in graph for href in page.links}
  3. Orphans: all_pages - linked - {homepage}

What to Look For#

Severity Problem Detection
critical Broken internal link — referenced page does not exist Compare link hrefs to doc graph pages
critical Broken anchor link — heading does not exist on target page Parse anchors vs. actual headings
high Orphan page — no inbound links Find pages with zero references in graph
high "Click here" / "read more" anchor text grep \[click here|\[read more|\[here\]
high Navigation depth > 4 levels Count levels in doc graph tree
medium Tier 1 page (quick-start, pricing) not in top navigation Not reachable in 1 click from homepage
medium Tutorial has no "Next steps" section Missing at end of tutorial pages
medium Full URL used as anchor text grep for \[https://
low External link to unstable source (blog post, forum) Non-official domain in external links
low Related pages not cross-linked Thematically adjacent pages with no links between them

Output Format#

{
  "file": "docs/guides/advanced-auth.md",
  "line": null,
  "severity": "high",
  "rule": "orphan-page",
  "found": "docs/guides/advanced-auth.md has no inbound links from any other documentation page. It is unreachable through navigation — only discoverable via direct URL or search.",
  "suggestion": "Add a link from docs/guides/authentication.md: 'For token rotation and HMAC signatures, see [Advanced authentication](../advanced-auth.md)'. Also add to the sidebar navigation."
}
{
  "file": "docs/quick-start.md",
  "line": 67,
  "severity": "critical",
  "rule": "broken-internal-link",
  "found": "Line 67: [Connect your GitHub repo](../setup/github-integration.md) — the target file docs/setup/github-integration.md does not exist in the doc graph.",
  "suggestion": "Either: (1) Restore the missing page, or (2) Update the link to the correct path. Check git history for a rename or deletion."
}
{
  "file": "docs/api/workspaces.md",
  "line": 23,
  "severity": "high",
  "rule": "poor-anchor-text",
  "found": "Line 23: 'For more information, [click here](../guides/workspaces.md).' — 'click here' provides no context about the destination.",
  "suggestion": "Replace with descriptive anchor: 'See the [workspace configuration guide](../guides/workspaces.md) for full details.'"
}
{
  "file": "docs/tutorials/first-deploy.md",
  "line": null,
  "severity": "medium",
  "rule": "missing-next-steps",
  "found": "Tutorial 'Deploy your first site' ends abruptly with no 'Next steps' section. Users who complete it have no guided path forward.",
  "suggestion": "Add a 'Next steps' section at the end: '## Next steps\\n- [Set up a custom domain](../guides/custom-domain.md)\\n- [Enable AI chat](../guides/ai-chat.md)\\n- [View your analytics](../analytics/overview.md)'"
}

Acceptance Criteria#

View source on GitHub →Browse full catalog repo →
Keywords
navigationlinksorphanbroken-linksanchorhierarchy