link-validator
Validate markdown link portability in skills. TRIGGERS - check links, validate portability, fix broken links, relative paths.
What this skill does
# 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 in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.