doc-link-audit

Solid

Use before publishing documentation, merging a docs PR, or reporting a Markdown-heavy repo's navigation as complete — when you want ground-truth confirmation that internal links, heading anchors, and directory links resolve, without opening every file yourself.

Data & Documents 51 stars 15 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
57
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Doc Link Audit ## Overview A dependency-free Python script that parses every `.md` file in a repo, resolves every `[text](target)` link, and reports what's actually broken: a missing file, a heading anchor that doesn't exist, or a page nothing else links to. It replicates GitHub's heading-slug algorithm exactly (including the double-hyphen case an em-dash produces) rather than a simplified approximation. **Core principle:** A link checker that reports false positives on doc examples and fenced code blocks isn't worth reading a second time — teams turn it off. Excluding code spans and fenced blocks from the scan is not an optional nicety here, it's what makes the tool's output trustworthy enough to act on without re-verifying by hand. ## Usage ```bash python3 ${CLAUDE_SKILL_DIR}/scripts/check_links.py [root_dir] [--check-external] [--exclude PATTERN] ``` - Defaults to `.`. Exit code 0 = clean, 1 = findings, 2 = usage error. - `--exclude PATTERN` is a regex matched against each file path (e.g. `--exclude 'archive/|vendor/'`). - `--check-external` additionally HEAD-requests every `http(s)://` link found (off by default — slow, needs network, and a timeout or 403 from an otherwise-fine site is not the same as a broken link). ## What it reports | Section | Means | |---|---| | BROKEN LINKS | `[text](path)` where `path` doesn't resolve to a file, or `path#anchor` where the heading `anchor` doesn't exist in the target file | | ORPHAN PAGES | A `.md` file no other `.md` file...

Details

Author
Rtur2003
Repository
Rtur2003/Claude-Code-Promts-Skills
Created
8 months ago
Last Updated
6 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category