bmad-shard-doc

Split large markdown documents into shard files by level-2 sections.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/ldk-hub/broke-shopping --skill bmad-shard-doc-ldk-hub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/ldk-hub/broke-shopping/tree/main/.claude/skills/bmad-shard-doc
Command: npx skills add https://github.com/ldk-hub/broke-shopping --skill bmad-shard-doc-ldk-hub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Splits large markdown documents into smaller, organized files by level 2 sections to improve readability and navigation.

Core Features & Use Cases

  • Splits a single document into multiple shard files based on level 2 headings.
  • Generates an index.md to map shards and preserve order.
  • Enforces an execution order and validates inputs to prevent partial outputs.

Quick Start

Provide the path to the source markdown document and run the sharding workflow to create shard files.

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 organized files?

Yes, the sharding process generates an index.md file to map the extracted shards and preserve the original sequential order. This ensures you can navigate the split markdown sections easily and reconstruct the document structure if needed.

What is the best way to automate breaking down markdown documentation by headings?

The markdown sharding process relies on npx @kayvan/markdown-tree-parser to process the source file. It enforces an exact execution sequence with strict validation to ensure the level-2 sections are correctly extracted without partial outputs.

Do I need any specific dependencies to shard markdown files?

Yes, you need npx and the @kayvan/markdown-tree-parser package to shard markdown files. The workflow relies on this parser to process the source document structure and extracts level-2 headings into individual files within a destination folder.

Why does my markdown split result in partial output files?

Partial output files during a markdown split occur when the strict execution sequence is interrupted or validation fails. This Skill prevents partial outputs by enforcing input validation and an exact execution order before creating the shard files.

Can I split markdown sections by headings other than level 2?

No, this Skill specifically splits markdown documents by extracting level-2 sections. It does not support splitting by other heading levels and focuses solely on organizing files based on these level-2 boundaries.