跳到正文
TakoAPI
返回技能列表

markdown-validator

由 wanng-ide 提供

CLI Utilities
413下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Validates Markdown files for broken local links.

描述

该技能的功能

Validates Markdown files for broken local relative links by scanning recursively through a directory or a single file. Ignores external URLs and same-file anchors. Outputs a JSON report with each broken link's file path, link text, target URL, and line number.

Skipping external URLs and same-file anchors keeps results focused on local file integrity, avoiding false positives from network issues or anchor variations.

何时使用

  • Checking internal doc links before a release
  • Auditing a wiki after files are reorganized
  • Verifying README links across a monorepo
  • Finding dead links after renaming or moving files
  • Running link validation in CI on documentation changes

示例工作流

输入

User asks: check all Markdown files in the current directory for broken links

智能体
  1. 1

    Run the validator against the current directory

  2. 2

    Receive a JSON array of results per file

  3. 3

    Identify entries where valid is false

  4. 4

    Extract brokenLinks arrays with text, url, and line fields

输出

JSON report listing each file with broken relative links, showing the link text, target path, and line number for each broken reference

安装

clawhub install wanng-ide/markdown-validator

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接