360 Secure SkillHub
360 安全技能中心

Markdown Validator

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

wanng-ide
wanng-ide
热度 78.46
最近更新 2026-05-11 17:25:49
分类:效率依赖:代码执行 / 读写文件应用场景:校对润色 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add markdown-validator
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
      }
    ]
  }
]