markdown-validator

TotalClaw 作者 totalclaw

验证 Markdown 文件是否存在损坏的本地链接。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~wanng-ide-markdown-validator
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~wanng-ide-markdown-validator/file -o wanng-ide-markdown-validator.md
## 概述(中文)

验证 Markdown 文件是否存在损坏的本地链接。

## 原文

# Markdown Validator

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

## Usage

```bash
# 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

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