bmad-shard-doc

Split Markdown documents into section files with an index using markdown-tree-parser.

Updated Sep 27, 2025
One-click install
npx skills add https://github.com/Cbanzaime23/Booking-System --skill bmad-shard-doc-cbanzaime23
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/Cbanzaime23/Booking-System/tree/main/.agent/skills/bmad-shard-doc
Command: npx skills add https://github.com/Cbanzaime23/Booking-System --skill bmad-shard-doc-cbanzaime23

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Splits large Markdown documents into smaller, organized files based on level 2 sections using npx @kayvan/markdown-tree-parser to create a navigable shard structure.

Core Features & Use Cases

  • Splits content into individual section files organized by level 2 headings.
  • Generates an index.md and a directory of shard files for easy navigation and maintenance.
  • Ideal for long manuals, knowledge bases, and large documentation projects that need modularization.

Quick Start

Provide the path to the source Markdown file to initiate sharding and specify the destination folder when prompted.

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 document into smaller files by section?

To split a large Markdown document into smaller files by section, provide the source file path and destination folder. The tool parses level 2 headings to generate an index.md and navigable shard files for modular documentation.

Can I automate breaking down long manuals into modular Markdown files?

Yes, you can automate breaking down long manuals into modular Markdown files by running npx @kayvan/markdown-tree-parser explode with a source file and destination folder, which organizes content by level 2 headings with validation and error handling.

Does this Markdown sharding tool require any dependencies to run?

No external dependencies are required to run this Markdown sharding tool. It operates by executing the npx @kayvan/markdown-tree-parser package directly, handling the source file explosion and index generation without needing a separate installation step.

What is the best way to organize a large knowledge base using Markdown?

The best way to organize a large knowledge base using Markdown is to shard the content into an index and directory of files based on level 2 headings. This creates a navigable structure ideal for modular documentation projects.

How are the split Markdown files organized after sharding?

After sharding, the split Markdown files are organized into a directory of individual section files based on level 2 headings, accompanied by a generated index.md file to provide easy navigation and maintenance for the documentation.

What happens if the source Markdown file has validation errors during sharding?

If the source Markdown file encounters validation errors during sharding, the process includes built-in error handling to manage the failure. This ensures the npx markdown-tree-parser explode command executes safely without corrupting the destination folder.