bmad-shard-doc

Split large markdown documents into `##`-based section files with index.md.

4|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/curdx/curdx-flow --skill bmad-shard-doc-curdx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/curdx/curdx-flow/tree/main/.agents/skills/bmad-shard-doc
Command: npx skills add https://github.com/curdx/curdx-flow --skill bmad-shard-doc-curdx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Large markdown files become hard to navigate, review, and reuse, so this Skill turns one bulky document into smaller, section-based files that are easier to manage and reference.

Core Features & Use Cases

  • Automatic sharding by level-2 sections: Splits a markdown document into multiple organized files based on ## headings (default behavior).
  • Deterministic tooling execution: Uses npx @kayvan/markdown-tree-parser explode to create the shard structure and an index.md entry.
  • Original document handling options: Lets you delete, archive, or keep the original to prevent duplicated source-of-truth confusion.

Quick Start

Use the bmad-shard-doc Skill to shard your file /path/to/architecture.md into /path/to/architecture/.

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 sections?

Splitting a large markdown file into smaller section files is done by sharding it based on `##` headings. This process creates an `index.md` entry and organized fragments to reduce navigation friction and make documentation maintenance easier.

What is the best way to break down a markdown knowledge base for incremental updates?

The best way to break down a markdown knowledge base for incremental updates is by sharding documents into structured `##`-based fragments. This allows you to manage and reuse individual sections without reviewing a bulky file.

Does markdown sharding keep the original file or delete it?

Markdown sharding includes options to delete, archive, or keep the original file after creating the new section files. This flexibility prevents duplicated source-of-truth confusion when you split your document.

How do I shard markdown documents using the CLI?

Sharding markdown documents using the CLI involves executing `npx @kayvan/markdown-tree-parser explode` with verified input and output paths. This deterministic tooling execution generates an organized shard structure in your destination directory.

When do I need to shard a markdown file?

You need to shard a markdown file when it becomes hard to navigate, review, and reuse. Splitting one bulky document into smaller section-based files makes maintaining and referencing your documentation significantly easier.