link-validator
Validate markdown link portability in skills. TRIGGERS - check links, validate portability, fix broken links, relative paths.
Best use case
link-validator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Validate markdown link portability in skills. TRIGGERS - check links, validate portability, fix broken links, relative paths.
Teams using link-validator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/link-validator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How link-validator Compares
| Feature / Agent | link-validator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Validate markdown link portability in skills. TRIGGERS - check links, validate portability, fix broken links, relative paths.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Link Validator Validates markdown links in Claude Code skills for portability across installation locations. > **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues. ## The Problem Skills with absolute repo paths break when installed elsewhere: | Path Type | Example | Works When Installed? | | --------------- | ----------------------- | ----------------------- | | Absolute repo | `/skills/foo/SKILL.md` | No - path doesn't exist | | Relative | `./references/guide.md` | Yes - always resolves | | Relative parent | `../sibling/SKILL.md` | Yes - always resolves | ## When to Use This Skill - Before distributing a skill/plugin - After creating new markdown links in skills - When CI reports link validation failures - To audit existing skills for portability issues --- ## TodoWrite Task Templates ### Template A: Validate Single Skill ``` 1. Identify skill path to validate 2. Run: uv run scripts/validate_links.py <skill-path> 3. Review violation report (if any) 4. For each violation, apply suggested fix 5. Re-run validator to confirm all fixed ``` ### Template B: Validate Plugin (Multiple Skills) ``` 1. Identify plugin root directory 2. Run: uv run scripts/validate_links.py <plugin-path> 3. Review grouped violations by skill 4. Fix violations skill-by-skill 5. Re-validate entire plugin ``` ### Template C: Fix Violations ``` 1. Read violation report output 2. Locate file and line number 3. Review suggested relative path 4. Apply fix using Edit tool 5. Re-run validator on file ``` --- ## Post-Change Checklist After modifying this skill: 1. [ ] Script remains in sync with latest patterns 2. [ ] References updated if new patterns added 3. [ ] Tested on real skill with violations --- ## Quick Start ```bash # Validate a single skill uv run scripts/validate_links.py ~/.claude/skills/my-skill/ # Validate a plugin with multiple skills uv run scripts/validate_links.py ~/.claude/plugins/my-plugin/ # Dry-run in current directory uv run scripts/validate_links.py . ``` ## Exit Codes | Code | Meaning | | ---- | --------------------------------------- | | 0 | All links valid (relative paths) | | 1 | Violations found (absolute repo paths) | | 2 | Error (invalid path, no markdown files) | ## What Gets Checked **Flagged as Violations:** - `/skills/foo/SKILL.md` - Absolute repo path - `/docs/guide.md` - Absolute repo path **Allowed (Pass):** - `./references/guide.md` - Relative same directory - `../sibling/SKILL.md` - Relative parent - `https://example.com` - External URL - `#section` - Anchor link ## Reference Documentation - [Link Patterns Reference](./references/link-patterns.md) - Detailed pattern explanations and fix strategies --- ## Troubleshooting | Issue | Cause | Solution | | ------------------------- | ----------------------------- | ------------------------------------------------- | | Script not found | Path or plugin not installed | Verify plugin installed with `claude plugin list` | | Exit code 2 | Invalid path or no .md files | Check target path exists and contains markdown | | False positive on URL | Regex matched external link | URLs starting with `http` should be ignored | | Anchor link flagged | Script treating `#` as path | Anchor links (`#section`) are allowed by design | | Relative path still fails | Wrong relative direction | Use `./` for same dir, `../` for parent | | Validation passes locally | CI uses different working dir | Ensure CI runs from correct repo root | | Too many violations | Legacy codebase | Fix incrementally, prioritize high-impact files | | Can't determine fix | Complex path structure | Read link-patterns.md for detailed fix strategies | ## Post-Execution Reflection After this skill completes, check before closing: 1. **Did the command succeed?** — If not, fix the instruction or error table that caused the failure. 2. **Did parameters or output change?** — If the underlying tool's interface drifted, update Usage examples and Parameters table to match. 3. **Was a workaround needed?** — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround. Only update if the issue is real and reproducible — not speculative.
Related Skills
plugin-validator
Validate plugin structure and silent failures. TRIGGERS - plugin validation, check plugin, hook audit.
link-validation
Universal link validation using lychee for Claude Code sessions. Detect broken links and path policy violations on demand.
pr-gfm-validator
Validate and fix GFM links in PR descriptions. TRIGGERS - PR links, gh pr create, GFM validation, broken PR links.
ascii-diagram-validator
Validate ASCII diagram alignment in markdown. TRIGGERS - diagram alignment, ASCII art, box-drawing diagrams.
voice-quality-audition
Audition Kokoro TTS voices to compare quality and grade. TRIGGERS - audition voices, kokoro voices, voice comparison, tts voice, voice quality, compare voices.
settings-and-tuning
Configure TTS voices, speed, timeouts, queue depth, and bot settings. TRIGGERS - configure tts, change voice, tts speed, queue depth, tts timeout, bot config, tune settings, adjust parameters.
full-stack-bootstrap
One-time bootstrap for Kokoro TTS engine, Telegram bot, and BotFather setup. TRIGGERS - setup tts, install kokoro, botfather, bootstrap tts-tg-sync, configure telegram bot, full stack setup.
diagnostic-issue-resolver
Diagnose and resolve TTS and Telegram bot issues. TRIGGERS - tts not working, bot not responding, kokoro error, audio not playing, lock stuck, telegram bot troubleshoot, diagnose issue.
component-version-upgrade
Upgrade Kokoro model, bot dependencies, or TTS components. TRIGGERS - upgrade kokoro, update model, upgrade bot, update dependencies, version bump, component update.
clean-component-removal
Remove TTS and Telegram sync components cleanly. TRIGGERS - uninstall tts, remove telegram bot, uninstall kokoro, clean tts, teardown, component removal.
send-message
Use when user wants to send a text message on Telegram as their personal account via MTProto, text someone, or message a contact by username, phone, or chat ID.
send-media
Use when user wants to send or upload a file, photo, video, voice note, or document on Telegram via their personal account.