凡自治之物 · LGD 治理学 · 创造术家族 | 评测协议:skill-quality-gate
English
Markdown Link Auditor
When to use
- Before publishing local docs, quickly self-check README/Wiki/technical manuals for dead links.
- In CI/CD, replace traditional link checkers that false-positive on external-network timeouts.
- 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
- Prepare the Markdown path and runtime.
- Pass the file argument or pipe stdin into auto-parse mode.
- Run the auditor and wait for results/log.
- Check console output for link status and errors.
- Inspect rc to judge whether the result meets zero-fault expectations.
- If non-zero, record dead paths and fix or skip.
Evidence & safety
- Evidence: TBD; Version: 1.0.1; Security: no independent scan (TBD).
中文
Markdown 链接体检器
何时用
- 本地文档发布前,快速自查 README、Wiki 或技术手册中是否存在失效链接。
- CI/CD 构建场景中,替换易受外部网络波动影响且导致超时误报的传统检测工具。
- 项目路径重构时,验证历史及新代码中的文档引用是否准确指向新位置。
用法
执行 python scripts/md_link_audit.py <input_file>,支持读标准输入流;加 --json 输出机器可读格式;用返回码 rc(0/1/2) 定义检查严格程度与通过阈值。
流程
准备文件路径 → 传入参数或 stdin 自动解析 → 运行审计 → 核对链接状态与错误详情 → 按 rc 判断是否零故障 → 非零则记录失效路径并修正。
证据与安全声明
- 证据:TBD;版本:1.0.1;安全:未做独立安全扫描(TBD)。
