Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计提醒

bmad-shard-docbmad 碎片文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

2,942

周安装

119

GitHub Stars

45,915

下载量

923
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bmad-shard-doc(bmad 碎片文档)
来源仓库:https://github.com/bmad-code-org/bmad-method
仓库路径:skills/bmad-shard-doc
安装命令:
npx skills add https://github.com/bmad-code-org/bmad-method --skill bmad-shard-doc
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bmad-code-org/bmad-method --skill bmad-shard-doc

简介

bmad-shard-doc 将大型 Markdown 文档按二级标题拆分为多个小文件。

  • 适用于 Codex、Claude、Cursor、Gemini CLI,提升文档可读性与维护性。
  • 使用 npx @kayvan/markdown-tree-parser 实现结构化拆分。
  • 安装前请确认权限、维护状态及是否执行外部命令或文件写入。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Shard Document

Goal: Split large markdown documents into smaller, organized files based on level 2 sections using npx @kayvan/markdown-tree-parser.

CRITICAL RULES

  • MANDATORY: Execute ALL steps in the EXECUTION section IN EXACT ORDER
  • DO NOT skip steps or change the sequence
  • HALT immediately when halt-conditions are met
  • Each action within a step is a REQUIRED action to complete that step

EXECUTION

Step 1: Get Source Document

  • Ask user for the source document path if not provided already
  • Verify file exists and is accessible
  • Verify file is markdown format (.md extension)
  • If file not found or not markdown: HALT with error message

Step 2: Get Destination Folder

  • Determine default destination: same location as source file, folder named after source file without.md extension

- Example: /path/to/architecture.md --> /path/to/architecture/

  • Ask user for the destination folder path ([y] to confirm use of default: [suggested-path], else enter a new path)
  • If user accepts default: use the suggested destination path
  • If user provides custom path: use the custom destination path
  • Verify destination folder exists or can be created
  • Check write permissions for destination
  • If permission denied: HALT with error message

Step 3: Execute Sharding

  • Inform user that sharding is beginning
  • Execute command: npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]
  • Capture command output and any errors
  • If command fails: HALT and display error to user

Step 4: Verify Output

  • Check that destination folder contains sharded files
  • Verify index.md was created in destination folder
  • Count the number of files created
  • If no files created: HALT with error message

Step 5: Report Completion

  • Display completion report to user including:

- Source document path and name - Destination folder path - Number of section files created - Confirmation that index.md was created - Any tool output or warnings

  • Inform user that sharding completed successfully

Step 6: Handle Original Document

Critical: Keeping both the original and sharded versions defeats the purpose of sharding and can cause confusion.

Present user with options for the original document:

What would you like to do with the original document [source-document-name]? Options: - [d] Delete - Remove the original (recommended - shards can always be recombined) - [m] Move to archive - Move original to a backup/archive location - [k] Keep - Leave original in place (NOT recommended - defeats sharding purpose) Your choice (d/m/k):

If user selects d (delete)

  • Delete the original source document file
  • Confirm deletion to user: "Original document deleted: [source-document-path]"
  • Note: The document can be reconstructed from shards by concatenating all section files in order

If user selects m (move)

  • Determine default archive location: same directory as source, in an archive subfolder

- Example: /path/to/architecture.md --> /path/to/archive/architecture.md

  • Ask: Archive location ([y] to use default: [default-archive-path], or provide custom path)
  • If user accepts default: use default archive path
  • If user provides custom path: use custom archive path
  • Create archive directory if it does not exist
  • Move original document to archive location
  • Confirm move to user: "Original document moved to: [archive-path]"

If user selects k (keep)

  • Display warning to user:

- Keeping both original and sharded versions is NOT recommended - The discover_inputs protocol may load the wrong version - Updates to one will not reflect in the other - Duplicate content taking up space - Consider deleting or archiving the original document

  • Confirm user choice: "Original document kept at: [source-document-path]"

HALT CONDITIONS

  • HALT if npx command fails or produces no output files

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.61%
按下载量换算347

Claude

28.96%
按下载量换算267

Cursor

17.54%
按下载量换算162

Gemini CLI

9.89%
按下载量换算91

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills