terrylica/cc-skills

link-validation

Offline markdown link validation with lychee (tasks/link-check.sh, moon run repo:link-check).

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/terrylica/cc-skills --skill link-validation

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

Link Validation Skill

Validates markdown links in your workspace using lychee.

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.

When to Use This Skill

Use this skill when:

  • Checking for broken links in markdown files
  • Validating link paths before committing documentation
  • Proving a doc change left no dangling internal link

How to Run It

The working path is the offline lychee check in tasks/link-check.sh. Inside the cc-skills repository it is part of the quality gate:

bash
moon run repo:link-check     # this check alone
moon run repo:check          # the whole gate, link-check included
bash tasks/link-check.sh     # the same script without moon

In any other workspace, run the same lychee command from the repository root:

bash
lychee --offline --no-progress --root-dir "$(git rev-parse --show-toplevel)" './**/*.md'

Add --config lychee.toml when the repository has one; lychee also loads ./lychee.toml by itself.

What the Check Does

tasks/link-check.sh:

  1. cds to the working-tree root (git rev-parse --show-toplevel, so it is correct inside a worktree too)
  2. Runs bunx lychee --config lychee.toml --offline --no-progress --root-dir <repo root> './**/*.md'
  3. Excludes plugins/statusline-tools/tests/fixtures, whose links are broken on purpose
  4. Prints lychee's summary line, then ✓ every internal link resolves or ✗ broken internal links found (lychee exit N), and exits with lychee's exit code

It checks relative links, root-relative links (/docs/adr/x.md, resolved through --root-dir) and #anchor fragments. It is offline by design: external URL liveness depends on the network and on other sites' uptime, so it is not checked. Nothing is written to disk except lychee's own .lycheecache; the result is the terminal output and the exit code.

A path that exists on one machine only (~/..., another repository) cannot pass. Write it as inline code instead of a link.

Requirements

  • lychee: tasks/link-check.sh runs it through bunx, so Bun is enough there; elsewhere install it (brew install lychee)

Configuration

cc-skills keeps one lychee config, lychee.toml at the repository root. It holds the path and URL exclusions and include_fragments = "anchor-only" (lychee 0.24 rejects the old boolean true). The statusline-tools Stop hook reads the same file when it exists.

Related Checks

  • Link portability in skills (absolute repo paths that break once installed): the link-validator skill
  • Path policy at session end: the statusline-tools Stop hook runs lint-relative-paths and lychee, and writes .lychee-results.json for the status line

History

This skill used to describe a Stop hook, hooks/stop-link-check.py, that wrote .link-check-results.md. link-tools never had a hooks.json, so the hook never ran; it was deleted in issue #33.

References


Troubleshooting

IssueCauseSolution
lychee not foundNot installedbrew install lychee, or run through bunx lychee
Config fails to loadinclude_fragments = trueUse include_fragments = "anchor-only" (lychee 0.24 and later)
Every /docs/... link failsNo --root-dirPass --root-dir with the absolute repository root
A link to ~/... failsPath exists on one machine onlyWrite it as inline code, not a link
A fixture's broken link failsFixture not excludedAdd it to --exclude-path or the config's exclude_path

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.

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
terrylica
Społeczność

academic-pdf-to-gfm

Convert academic PDF papers to GitHub-renderable GFM markdown with math equations. TRIGGERS - PDF, GitHub markdown, math

Instalacje / 1h
1
GitHub Stars
2
Aktualizacja
5 lis
terrylica
Społeczność

adr-code-traceability

Add ADR references to code for traceability. TRIGGERS - ADR traceability, code reference, document decision in code.

Instalacje / 1h
1
GitHub Stars
2
Aktualizacja
5 lis
terrylica
Społeczność

arxiv-source-first-paper-ingest

Read an arXiv paper faithfully by fetching the authors' own LaTeX source instead of OCR-ing the PDF. Extracts every display equation with its label, environment and enclosing proposition, renders each to MathML, and proves usability by compiling each formula with a real TeX engine. Use when you need a paper's formulas exactly — to replicate a method, implement a loss function or custom objective, verify a quoted number, or check a claim against what the authors actually wrote. TRIGGERS - read th

Instalacje / 1h
1
GitHub Stars
2
Aktualizacja
5 lis
terrylica
Społeczność

azure-provision

Bootstrap Azure automation when interactive az login is blocked by a Conditional Access policy (error 530035, "Device state: Unregistered"). Mints a service principal through the Azure Portal session ONCE — using Microsoft Graph over a captured token, not DOM clicking — then provisions resource groups, Cognitive Services / AI Language / Speech resources and their keys entirely via az/REST, writing key AND endpoint together into the SCS vault. Use when az login fails but the portal works, when mo

Instalacje / 1h
1
GitHub Stars
2
Aktualizacja
5 lis