bmad-shard-doc

Split large markdown documents into smaller files by level 2 headers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @kayvan/markdown-tree-parser, and includes scripts (resource) components.

What problem does it solve?

Large markdown documents can be cumbersome to navigate and work with. This Skill addresses this by breaking down large markdown files into smaller, organized sections.

Core Features & Use Cases

  • Document Sharding: Split large markdown documents into smaller, manageable sections based on level 2 headers.
  • User Input: Allow users to specify the source document and the destination folder for the sharded files.
  • Error Handling: Provides clear error messages for file accessibility and format issues, and ensures steps are executed in order.

Quick Start

Split the document 'project-guide.md' into sections and store them in 'sections-of-project-guide/' by running 'bmad-shard-doc'.

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 large markdown documents into smaller files?

You can split large markdown documents into smaller files by sharding them based on level 2 headers. This process breaks down cumbersome documents into organized sections, allowing users to specify the source document and destination folder.

How do I organize markdown content by section headers?

Organizing markdown content by section headers involves dividing the file at level 2 headers to create separate files. This document structure approach targets technical writers and knowledge managers working with large markdown files.

Do I need npx @kayvan/markdown-tree-parser to shard markdown files?

Yes, you need npx @kayvan/markdown-tree-parser to execute the sectioning logic. This dependency is required to parse the document structure and split the markdown files into manageable sections.

What is the best way to break down a large markdown file for documentation?

The best way to break down a large markdown file for documentation is to shard it into smaller sections using level 2 headers. This document organization method ensures steps are executed in order and provides clear error messages for format issues.

How does error handling work when splitting markdown files?

Error handling when splitting markdown files provides clear error messages for file accessibility and format issues. It ensures steps are executed in order, preventing errors during the document sharding process.

Can I specify the destination folder when sharding markdown documents?

Yes, you can specify the destination folder when sharding markdown documents. User input allows you to define both the source document and the destination folder for the sharded files, streamlining document organization.