360 Secure SkillHub
360 安全技能中心

Markdown Linter

该 Skill 是 Node.js 编写的 Markdown 检查器,可递归扫描工作区文档,报告本地链接失效、标题层级异常和代码块缺少语言标识等问题,并以 JSON 输出结果。它不校验外部链接,也不自动修复。

wanng-ide
wanng-ide
热度 81.24
最近更新 2026-05-17 12:07:01
分类:效率依赖:代码执行 / 读写文件应用场景:校对润色 / 工作流 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add markdown-linter
Metadata
name
markdown-linter
description
Validates Markdown files in the workspace for broken local links, missing file references, and basic syntax issues. Use to maintain documentation integrity and prevent broken references in MEMORY.md or SKILL.md files.

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

const linter = require('./index');
const results = await linter.scan('.'); // Scans current directory recursively
console.log(JSON.stringify(results, null, 2));

Output Format

{
  "totalFiles": 15,
  "brokenLinks": [
    {
      "file": "docs/README.md",
      "line": 10,
      "link": "./missing-image.png",
      "error": "File not found"
    }
  ],
  "syntaxErrors": []
}