validate-md-ref

Solid

检查 Markdown 文档中的引用是否可定位、URL 或锚点是否可访问,并整理供后续判断引用真实性与适切性的结构化证据。当用户要求核查引用、检查文档链接,或确认引用是否支持正文论断时使用。

Data & Documents 48 stars 7 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
56
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# validate-md-ref ## 目标 检查 Markdown 文档中的引用是否可定位、URL 或锚点是否可访问,并整理供后续判断引用真实性与适切性的结构化证据。当用户要求核查引用、检查文档链接,或确认引用是否支持正文论断时使用。 ## 流程 ### 输入 #### 范围与边界 - 输入:一个 Markdown 文件,可选一个 YAML 配置文件。 - 检查:Markdown 行内链接、HTML `<a href>` 链接、当前文档内的 `#anchor`,以及外部 HTTP(S) 链接的可达性。 - 输出:结构化 JSON,逐条保留引用位置、验证状态和失败或跳过原因。 - 不做:不修改原文;URL 可达性不等于来源支持论断;不代替用户决定修复方式。 - 运行时能力:使用 `bensz.document.markdown-link-integrity` 检查链接事实,并保留 `bensz.evidence.citation-truth-fit` 的语义复核状态;两者版本独立记录,旧 ID 仅作兼容 alias。 ### 执行步骤 #### 强制运行门禁 每次执行必须经过 Bensz Skill Kernel 状态机并调用指定版本的链接完整性 Verifier。任一环节不可用或失败,任务即未完成并须说明原因;不得降级为普通脚本或手工检查。 状态机使用 `bensz.workspace.ready` 作为系统入口,并依次进入 `bensz.validate-md-ref.input-ready`、`bensz.validate-md-ref.checking` 和 `bensz.validate-md-ref.reported`;旧 State ID 仅作兼容 alias。 AI 应使用本 Skill 的执行器或封装入口,不得手工模拟状态转移、拼接事件账本或复制 Verifier 规则。命令、上下文和事件契约见: - [`references/state-machine.md`](references/state-machine.md) - [`references/verifiers.md`](references/verifiers.md) #### 流程 1. 确认 Markdown 存在并只读处理;需限制网络请求时加载默认或指定 YAML。 2. 提取并分类检查:站内锚点在当前文档定位;HTTP(S) 按安全策略验证可达性;白/黑名单命中则跳过。 3. 保留链接 Verifier 标准结果;真实性或适切性仅保留语义 Verifier 的 `unchecked`/`manual_review`,无证据不得判通过。 4. 汇总总数、有效、无效、跳过项,逐条披露位置、状态、失败原因和语义边界。 网络 DNS、连接失败���超时属于 `unresolved`/`timed_out` 观测不确定性,不得当作确定性链接失效;只有 HTTP 明确错误、本地 anchor 缺失或越界文件才计入 `invalid`。 命令行入口以 kernel `bensz.document.markdown-link-integrity` Pack 返回的 `facts.summary` 与 `facts.references` 为唯一链接事实来源;不要将旧兼容函数的本地 探测结果与 Verifier 结果合并或互相覆盖。 #### 工具 - `scripts/validate_links.py`:读取 Markdown 及可选 ...

Details

Author
huangwb8
Repository
huangwb8/skills
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

markdown-validation

Validate Markdown syntax, formatting, and links using markdownlint-cli2 and markdown-link-check. Use when committing docs changes, checking broken links, or validating Markdown in pull requests.

1 Updated today
y-miyazaki
Web & Frontend Listed

docs-validating-links

Comprehensive link validation methodology for markdown links including format requirements, path validation, broken link detection, external link verification, and checker implementation patterns

3 Updated 2 weeks ago
wahidyankf
AI & Automation Listed

doc-consistency

Check a long document against itself — dangling cross-references, numbering gaps and duplicates, TOC-vs-body mismatch, missing standard sections, terminology drift, leftover placeholders (TODO/TBD/XXX), stale years, and paragraphs lost in a merge. Reads .docx / .md / .txt and emits a located findings list plus a re-check command you can put in a contract. Runs fully offline with zero dependencies: no network, no upload, no model calls, so the document never leaves the machine. Use when the user asks to proofread, QA, sanity-check, or verify the internal consistency of a textbook, manuscript, bid or RFP response, manual, thesis, or contract set; or asks for a cross-reference audit, numbering audit, continuity check, or editorial consistency check; or says 长文档一致性 / 交叉引用 / 编号跳号 / 重号 / 术语不统一 / 合稿丢段 / 目录对不上 / 标书自检 / 稿件体检 / 定稿前检查 / 教材编号核对.

0 Updated 1 months ago
dongsheng123132