md-link-audit

Markdown 链接体检器 — README 里链接一堆 404、改了路径没人发现,CI 上还老因为外网检查超时误报(零依赖,确定性输出,rc=0/1/2,--json 机器可读)。

Install

openclaw skills install @zhaoxinghua09-cell/md-link-audit

凡自治之物 · LGD 治理学 · 创造术家族 | 评测协议:skill-quality-gate

English

Markdown Link Auditor

When to use

  1. Before publishing local docs, quickly self-check README/Wiki/technical manuals for dead links.
  2. In CI/CD, replace traditional link checkers that false-positive on external-network timeouts.
  3. After a project path refactor, verify doc references point to the new locations.

How to use

Run python scripts/md_link_audit.py <input_file>; it also reads stdin. Add --json for machine-readable output. Use the return code (rc 0/1/2) to set strictness and the pass threshold.

Workflow

  1. Prepare the Markdown path and runtime.
  2. Pass the file argument or pipe stdin into auto-parse mode.
  3. Run the auditor and wait for results/log.
  4. Check console output for link status and errors.
  5. Inspect rc to judge whether the result meets zero-fault expectations.
  6. If non-zero, record dead paths and fix or skip.

Evidence & safety

  • Evidence: TBD; Version: 1.0.1; Security: no independent scan (TBD).

中文

Markdown 链接体检器

何时用

  1. 本地文档发布前,快速自查 README、Wiki 或技术手册中是否存在失效链接。
  2. CI/CD 构建场景中,替换易受外部网络波动影响且导致超时误报的传统检测工具。
  3. 项目路径重构时,验证历史及新代码中的文档引用是否准确指向新位置。

用法

执行 python scripts/md_link_audit.py <input_file>,支持读标准输入流;加 --json 输出机器可读格式;用返回码 rc(0/1/2) 定义检查严格程度与通过阈值。

流程

准备文件路径 → 传入参数或 stdin 自动解析 → 运行审计 → 核对链接状态与错误详情 → 按 rc 判断是否零故障 → 非零则记录失效路径并修正。

证据与安全声明

  • 证据:TBD;版本:1.0.1;安全:未做独立安全扫描(TBD)。