link-validation

link-validation is a skill for Claude Code, Codex from Everyone-Needs-A-Copilot/claude-copilot. It costs 56 tokens per session (1,038 once invoked), scanned A, original, MIT.

A documentation check that finds broken Markdown links, missing headings used as anchors, and invalid paths between files. Markdown is a plain-text format commonly used for project documentation.

In plain words
What is it for?
It is for checking documentation, cross-references, and pull requests that change Markdown files.
Why use it?
It prevents readers and coding tools from following links to missing files or sections.

Skill for Claude CodeCodex

Part of the claude-copilot plugin — 72 skills, 17 commands, 17 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/everyone-needs-a-copilot/claude-copilot/link-validation
Any agent
npx skills add Everyone-Needs-A-Copilot/claude-copilot --skill link-validation
Clone the repo
git clone --depth 1 https://github.com/Everyone-Needs-A-Copilot/claude-copilot

Made for: Claude Code, Codex.

Or install claude-copilot, the plugin that ships this one along with the rest of its 72 skills, 17 commands, 17 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for link-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/link-validation.svg)](https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/link-validation)
Your own site
<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/link-validation"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/link-validation.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01038
Opus 5 $0.00028 $0.00519
Sonnet 5 $0.00011 $0.00208
Haiku 4.5 $0.00006 $0.00104

Measured today against content hash a1c34a2a181f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

link-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/skills/link-validation/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Validate markdown links and cross-references to ensure documentation integrity.

Purpose

Broken links in knowledge-copilot 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

Procedure

1. Find All Markdown Files

find . -name "*.md" -type f -not -path "./_archive/*"

2. Extract Links from Each File

Use grep to find markdown links:

grep -oE '\[([^\]]+)\]\(([^\)]+)\)' file.md

3. Categorize Links

For each link:

  • External (starts with http): Skip or optionally validate
  • Anchor only (#heading): Validate heading exists in same file
  • Relative file: Resolve path and check file exists
  • File + anchor: Check both file and heading exist

4. Validate Internal Links

For 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

5. Validate Anchors

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'

6. Attempt Auto-Fix

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

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 147 lines · 56 tokens per session scan A a1c34a2a181f

Subscribe to this mod's changes

link-validation is a skill published in the GitHub repository Everyone-Needs-A-Copilot/claude-copilot (13 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 1,038 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.