| name | ctx-link-check |
| description | Audit docs for dead links. Use before releases, after restructuring docs, or when running a documentation audit. |
| allowed-tools | Bash(curl:*), Read, Grep, Glob |
Scan Markdown files for broken links. Two passes:
internal (file targets) and external (HTTP URLs).
Scope Discovery
Determine which directories to scan:
- If the user specifies a path, use that
- Otherwise, glob for common doc directories:
docs/, doc/,
documentation/, site/
- If none exist, fall back to scanning all
.md files in the
project root (excluding node_modules/, .git/, vendor/)
Report which directories are being scanned at the start of output.
When to Use
- Before releases or doc deployments
- After renaming, moving, or deleting doc pages
- After restructuring documentation directories or nav
- When
/_ctx-audit runs (audit check #12)
- When a user reports a 404 on the site
When NOT to Use
- When editing a single doc (just eyeball links in that file)
- When offline and only external checks would matter
Execution
Pass 1: Internal Links
Scan every .md file in the discovered scope for Markdown links
pointing to other files: [text](target.md),
[text](../path/file.md), [text](path/file.md#anchor).