templates/skills/link-validation/SKILL.md
Validate markdown links and cross-references to ensure documentation integrity. Detects broken links, missing anchors, and invalid cross-reference paths in markdown files. Use proactively when auditing documentation, reviewing PRs that touch markdown files, or checking shared-docs for broken links.
npx skillsauth add everyone-needs-a-copilot/claude-copilot link-validationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Validate markdown links and cross-references to ensure documentation integrity.
Broken links in shared-docs waste Claude's time and tokens. This skill finds and fixes broken internal links, missing anchors, and incorrect cross-references.
| Type | Pattern | Example |
|------|---------|---------|
| Relative file | [text](./path.md) | [Overview](./00-overview.md) |
| Anchor | [text](#heading) | [Setup](#installation) |
| File + anchor | [text](./file.md#section) | [Auth](./60-security.md#auth) |
| Parent path | [text](../other/file.md) | [Index](../00-INDEX.md) |
| Absolute (external) | https://... | Skip or warn |
find . -name "*.md" -type f -not -path "./_archive/*"
Use grep to find markdown links:
grep -oE '\[([^\]]+)\]\(([^\)]+)\)' file.md
For each link:
http): Skip or optionally validate#heading): Validate heading exists in same fileFor relative paths:
# From the file's directory, check if target exists
target_file="resolved/path/to/target.md"
if [ -f "$target_file" ]; then
echo "OK: $target_file"
else
echo "BROKEN: $target_file"
fi
Anchors should match headings (lowercase, hyphens for spaces):
# Extract headings from target file
grep -E '^#{1,6} ' target.md | sed 's/^#* //' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g'
For broken links, search for likely correct targets:
| Broken Link | Search Strategy |
|-------------|-----------------|
| ./old-name.md | Find files with similar names |
| #old-heading | Find similar headings in file |
| ../wrong/path.md | Search for filename in other directories |
## Link Validation Report
### Summary
- Files scanned: N
- Total links: N
- Valid: N
- Broken: N
- Warnings: N
### Broken Links
| File | Line | Link | Issue | Suggested Fix |
|------|------|------|-------|---------------|
| docs/setup.md | 45 | `./old-guide.md` | File not found | `./10-guide.md` |
| docs/api.md | 23 | `#authenication` | Anchor not found | `#authentication` |
### Warnings
| File | Link | Warning |
|------|------|---------|
| docs/intro.md | `https://old.example.com` | External link (not validated) |
### Fixes Applied
- docs/setup.md:45 - Changed `./old-guide.md` to `./10-guide.md`
If 00-links.md exists in a directory, validate all links defined there:
## Internal Links
- ecosystem: ../00-ecosystem-overview.md
- glossary: ../../03-ai-enabling/03-operations/12-shared-glossary.md
Frontmatter may reference external docs:
source_of_truth: ../../insights-copilot/docs/04-architecture/system-design.md
Validate these paths exist (may be outside current repo).
| Issue | Cause | Fix |
|-------|-------|-----|
| File moved | Renamed with number prefix | Update link with new prefix |
| Heading changed | Wording updated | Update anchor text |
| Case mismatch | GitHub case-sensitive | Match exact case |
| Missing extension | .md omitted | Add .md extension |
testing
Pytest testing patterns, anti-patterns, and quality rules
testing
STRIDE threat modeling and DREAD severity scoring for security review
development
Python idiomatic patterns and best practices
data-ai
UX patterns for task flows, service blueprints, wireframes, and user interactions with comprehensive state coverage. Covers interaction design, user journeys, error states, empty states, and WCAG accessibility. Use proactively when designing task flows, creating wireframes, mapping user journeys, or reviewing interaction patterns.