Loading...
Loading...
Validate markdown link portability in skills. TRIGGERS - check links, validate portability, fix broken links, relative paths.
npx skill4agent add terrylica/cc-skills link-validator| Path Type | Example | Works When Installed? |
|---|---|---|
| Absolute repo | | No - path doesn't exist |
| Relative | | Yes - always resolves |
| Relative parent | | Yes - always resolves |
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 fixed1. 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 plugin1. 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# 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 .| Code | Meaning |
|---|---|
| 0 | All links valid (relative paths) |
| 1 | Violations found (absolute repo paths) |
| 2 | Error (invalid path, no markdown files) |
/skills/foo/SKILL.md/docs/guide.md./references/guide.md../sibling/SKILL.mdhttps://example.com#section| Issue | Cause | Solution |
|---|---|---|
| Script not found | Path or plugin not installed | Verify plugin installed with |
| 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 |
| Anchor link flagged | Script treating | Anchor links ( |
| Relative path still fails | Wrong relative direction | Use |
| 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 |