Bmad shard doc

From lorenzogm/bmad-ui · View interactive version

Bmad shard doc is an AI agent skill from the GitHub repository lorenzogm/bmad-ui. Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document

How to use this skill

Skill file

Shard Document

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

CRITICAL RULES

EXECUTION

Step 1: Get Source Document

Step 2: Get Destination Folder

Step 3: Execute Sharding

Step 4: Verify Output

Step 5: Report Completion

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)
If user selects `m` (move)
If user selects `k` (keep)

HALT CONDITIONS

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.