bmad-shard-doc

Splits large markdown documents into section files using markdown-tree-parser.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/unbakedcosmos/thumbnailer --skill bmad-shard-doc-unbakedcosmos
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/unbakedcosmos/thumbnailer/tree/main/.claude/skills/bmad-shard-doc
Command: npx skills add https://github.com/unbakedcosmos/thumbnailer --skill bmad-shard-doc-unbakedcosmos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @kayvan/markdown-tree-parser.

What problem does it solve? Large monolithic markdown documents are hard to navigate, edit, and load into AI context windows. This Skill breaks a big markdown file into smaller, organized section files so each part can be managed and referenced independently. ## Core Features & Use Cases - Automated Sharding: Runs npx @kayvan/markdown-tree-parser explode to split a markdown document by level 2 headings into individual files with a generated index.md. - Guided Workflow: Walks through source selection, destination confirmation, output verification, and completion reporting with strict halt conditions on errors. - Original File Handling: Offers delete, archive, or keep options for the source document after sharding to avoid duplicate content. - Use Case: You have a 2,000-line architecture.md from a BMAD planning session. Shard it into per-section files so each section can be loaded on demand instead of the whole document. ## Quick Start Shard the document docs/architecture.md into smaller section files using the default destination folder.

Frequently Asked Questions about bmad-shard-doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split a large markdown file into smaller files?▼

Provide the source markdown path and confirm a destination folder, then the skill runs npx @kayvan/markdown-tree-parser explode to split the document by level 2 sections. It verifies the output files and generated index.md before reporting completion.

What tool splits markdown documents by headings?▼

The @kayvan/markdown-tree-parser npm package splits markdown documents into section files using its explode command. It creates one file per section plus an index.md in the destination folder.

What happens to the original markdown file after sharding?▼

You choose to delete it, move it to an archive subfolder, or keep it in place. Deleting or archiving is recommended because keeping both versions can cause duplicate content and confusion about which version to load.

Why does markdown sharding fail or produce no output?▼

Sharding halts if the source file is missing, is not a .md file, the destination lacks write permissions, or the npx command fails. The skill checks each condition and stops with an error message instead of continuing.

Can sharded markdown files be recombined into the original document?▼

Yes, the original document can be reconstructed by concatenating all section files in order. This is why deleting the original after sharding is considered safe.