Alterlab Link Health logo

Alterlab Link Health

Community
AlterLab-IEU
alterlab-link-health

Audits and repairs Markdown link health across a skills repo via a four-tier pipeline (config hardening, intra-repo file-ref fixes, external URL substitutions, residual exclusions) and enforces a Tier 3 substitution guardrail that prevents regressions of previously-passing links; designed for lychee-based GitHub Actions link checkers but generalizes to markdown-link-check and similar tools. Use when the request mentions link audit, dead links, link health, lychee, broken links, link checker, markdown link audit, link-health audit, 404 audit, check-links failing, CI link-check, or 連結健檢, 死鏈, 失效連結, 斷鏈檢查. Part of the AlterLab Academic Skills suite.

Overview

PublisherAlterLab-IEU
RepositoryAlterLab-Academic-Skills
Skill namealterlab-link-health
Stars
84
Forks
16
Bundled files
10
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AlterLab-IEU on GitHub. Read the source before you install it.

Installation

Install the Alterlab Link Health AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/core/alterlab-link-health
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git /tmp/AlterLab-Academic-Skills
mkdir -p .claude/skills
cp -r /tmp/AlterLab-Academic-Skills/skills/core/alterlab-link-health .claude/skills/alterlab-link-health
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alterlab Link Health in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alterlab Link Health on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alterlab Link Health is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Link Health — Repo-wide Markdown Link Audit Methodology

A reusable methodology for bringing a broken docs-heavy repo's link checker to green. Codified from a real audit that took AlterLab-IEU/AlterLab-Academic-Skills from 1208 errors out of 1966 links to 0 errors out of 1912 links across 8 commits, with an auto-detected Tier 3 regression that validated the guardrail rule.

Quick Start

Full audit (fresh repo, failing link checker):

Audit and repair the link health of <owner/repo>. Run the full four-tier pipeline.

→ Dispatch the 10-agent audit from playbooks/full-audit.md, then the tiered APPLY phase.

Targeted residual pass (first dispatch reduced errors but some remain):

The link checker is down from 1208 to 67 errors. Close the residuals.

→ Dispatch the 3-agent followup pass from playbooks/followup-pass.md.

Post-merge cleanup (PR is green, need to finalize human-decision items):

Finalize the post-merge cleanup: resolve pending human-decision items, file follow-up issues, document link debt.

→ Dispatch the 4-agent post-merge pass from playbooks/post-merge.md.


When to Use This Skill

  • A weekly Check Links (or similar lychee / markdown-link-check) workflow has been failing.
  • The user mentions a large error count (hundreds+) that they suspect is mostly config-driven false positives.
  • The user wants to refactor broken intra-repo file references across many skills / docs.
  • The user wants a reusable process for link debt maintenance going forward.

Trigger keywords — English: link audit, dead links, link health, lychee, broken links, link checker, markdown link audit, link-health audit, 404 audit, check-links failing, CI link-check. 繁體中文: 連結健檢, 死鏈, 失效連結, 斷鏈檢查, 連結審計.

Does NOT Trigger

ScenarioUse Instead
Verify that cited works exist (DOI/author resolution, fabricated or hallucinated references, retractions)alterlab-citation-verifier — link-health only repairs hyperlinks; it never validates that a cited work exists
Fix a single broken link in a single fileA direct edit — no pipeline needed
Audit repo structure beyond links (schema, frontmatter, metadata)A separate schema-drift audit (out of scope here)

Pipeline Overview (4 Tiers)

Each tier is a single reviewable commit. Run them in order — each unlocks the next by making the error signal cleaner.

TierScopeTypical Delta
1 — ConfigIntroduce .lychee.toml with an explicit accept set (it replaces lychee's defaults, so list 200..=299), a .lycheeignore for permanent noise hosts, and a hardened CI workflow.Biggest single win — often -70% to -90% of errors. Fixes the "--accept 403 replaces the default set" gotcha.
2 — Intra-repo refsRepair [ERROR] file:// entries: singular/plural directory typos, missing path prefixes, YAML frontmatter bugs. Wrap pedagogical placeholder paths as inline code.Eliminates the bulk of real breakage — usually 200-400 entries collapse to zero.
3 — URL substitutionsReplace MOVED external URLs with verified-live substitutes; replace DEAD_INFRA URLs with replacement resources. Never substitute without verification.Reduces residuals to the low dozens.
4 — ExclusionsEverything left that cannot be fixed: bot-hostile hosts, pedagogical placeholders, expired upstream infrastructure, chronically flaky academic sites.Gets to 0 errors or stable single-digit residuals.

See references/tier1-config.md through references/tier4-exclusions.md for the decision rules in each tier.


The Tier 3 Guardrail

After any URL substitution pass, re-run the link checker and diff against the baseline success set. Any URL that returned 200 OK in baseline and is non-200 after substitution is a regression; revert it before committing.

Self-check:

bash
diff <(grep "^\[200\]" baseline.log | sort -u) \
     <(grep "^\[200\]" post.log | sort -u)

Output should show no deletions, only additions. Deletions mean a substitution regressed a previously-working URL.

This rule exists because during the source audit, broad sed prefix substitutions silently concatenated onto more-specific paths (e.g. /v3/ → /v3/docs turned an already-correct /v3/docs into /v3/docsdocs). The guardrail caught it on the second CI dispatch, not the commit itself. Assume your Tier 3 pass will have regressions. Verify.

Full detail: references/tier3-substitution.md.


The Verification-First Rule

Probe-verify before any URL substitution. Unverified substitutions are how phantom URLs land in public skills. Before every [old] → [new] replacement:

  1. For GitHub repos: gh api repos/owner/name — status must be 200 (repo exists, not archived).
  2. For HTTP URLs: curl -sSI -L --max-time 15 '<new>' — final status must be 200 (after redirects).
  3. For PyPI / npm / crates packages: check the registry API or landing page directly.

If verification fails, exclude the dead target via .lycheeignore with a commented reason rather than guessing a replacement. An excluded dead link is honest; a substituted wrong link is a time bomb.

Full detail: references/tier3-substitution.md § "Verification rules".


Playbooks

Three ready-to-dispatch prompt bundles that call this skill's tiers in the right order.

PlaybookWhen to UseAgents
playbooks/full-audit.mdFresh audit, failing CI, no prior work.10 parallel subagents + synthesis
playbooks/followup-pass.mdErrors significantly reduced but residuals remain.3 targeted subagents
playbooks/post-merge.mdPR green, time to resolve pending human-decision items.4 parallel subagents

All three follow the same shape: pre-flight → parallel dispatch → synthesize → commit/PR/merge → verify.


References

FileContent
references/tier1-config.md.lychee.toml schema, workflow YAML, accept-code gotchas
references/tier2-intra-repo.mdIntra-repo path audit, singular/plural directory patterns, frontmatter fixes
references/tier3-substitution.mdURL substitution rules, the guardrail, sed-safety patterns
references/tier4-exclusions.mdWhen to exclude vs substitute, .lycheeignore category rubric
references/known-debt-template.mdThe 5-category KNOWN_LINK_DEBT.md layout for maintainers

Examples

  • examples/pr-1-retrospective.md — the source audit that generated this skill. 1208 → 0 errors, 8 commits, auto-detected Tier 3 regression in commit 5 (9cbd801), merged as 93a72fe.

Scope Discipline

This skill fixes link health. It does NOT:

  • Standardize SKILL.md schemas across the repo. File schema drift as a separate issue.
  • Refactor skill content, examples, or prose. Only touches link URLs and the CI config.
  • Modify .lychee.toml's accept list to mask real breakage. Flaky upstream 5xx / timeouts get excluded per-host with rationale, not blanket-accepted.

Scope discipline keeps the PR reviewable and the link-check signal honest.

Part of the AlterLab Academic Skills suite.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Alterlab Link Health AI skill do?

Audits and repairs Markdown link health across a skills repo via a four-tier pipeline (config hardening, intra-repo file-ref fixes, external URL substitutions, residual exclusions) and enforces a Tier 3 substitution guardrail that prevents regressions of previously-passing links; designed for lychee-based GitHub Actions link checkers but generalizes to markdown-link-check and similar tools. Use when the request mentions link audit, dead links, link health, lychee, broken links, link checker, markdown link audit, link-health audit, 404 audit, check-links failing, CI link-check, or 連結健檢, 死鏈,...

Why use Alterlab Link Health on TypingMind?

Because you install it once and use it with any model. Alterlab Link Health is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alterlab Link Health in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/core/alterlab-link-health. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Alterlab Link Health?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alterlab Link Health?

As many as you like. As long as a model supports skills, you can use Alterlab Link Health with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alterlab Link Health AI skill free?

Yes. It is published on GitHub by AlterLab-IEU under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇