markdown-linter
验证工作区中的 Markdown 文件是否存在损坏的本地链接、丢失的文件引用和基本语法问题。用于维护文档完整性并防止 MEMORY.md 或 SKILL.md 文件中的引用损坏。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~wanng-ide-markdown-lintercURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~wanng-ide-markdown-linter/file -o wanng-ide-markdown-linter.md## 概述(中文)
验证工作区中的 Markdown 文件是否存在损坏的本地链接、丢失的文件引用和基本语法问题。用于维护文档完整性并防止 MEMORY.md 或 SKILL.md 文件中的引用损坏。
## 原文
# Markdown Linter
A lightweight tool to validate Markdown files in the workspace. It focuses on ensuring internal consistency, particularly broken file links and missing references.
## Capabilities
- **Link Validation**: Checks `[link](path)` references to ensure the target file exists locally.
- **Header Check**: Verifies that headers follow a logical hierarchy (e.g., H1 -> H2).
- **Code Block Check**: Ensures code blocks have language identifiers where appropriate.
## Usage
```javascript
const linter = require('./index');
const results = await linter.scan('.'); // Scans current directory recursively
console.log(JSON.stringify(results, null, 2));
```
## Output Format
```json
{
"totalFiles": 15,
"brokenLinks": [
{
"file": "docs/README.md",
"line": 10,
"link": "./missing-image.png",
"error": "File not found"
}
],
"syntaxErrors": []
}
```