360 Secure SkillHub
360 安全技能中心

Markdown Validator

递归扫描目录或指定 Markdown 文件,检查相对链接是否失效,忽略 http/https 外部链接与同文件锚点,输出含文件路径、行号的 JSON 报告。文档仅给出通过 openclaw exec 调用 Node 脚本的方式,未提供安装、许可等其他信息。

分类:效率
wanng-ide
wanng-ide
热度 47.69
最近更新 2026-05-11 17:25:49

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add wanng-ide/markdown-validator
兼容性
OpenClaw 专属
联网要求
不联网
数据出网
数据不出本机
Metadata
name
markdown-validator
description
Validates Markdown files for broken local links.

Markdown Validator

Validates Markdown files for broken local links. Use this skill to check internal documentation consistency.

Usage

# Validate current directory
openclaw exec node skills/markdown-validator/index.js .

# Validate specific file
openclaw exec node skills/markdown-validator/index.js README.md

Features

  • Scans recursively
  • Checks relative links
  • Ignores external URLs (http/https)
  • Ignores anchors within the same file (#anchor)
  • Outputs JSON report of broken links with line numbers

Example Output

[
  {
    "file": "/path/to/README.md",
    "valid": false,
    "brokenLinks": [
      {
        "text": "Link Text",
        "url": "./broken-link.md",
        "line": 10
      }
    ]
  }
]