bmad-shard-doc

Split large markdown files into section-organized shards at level-2 headings.

Updated May 3, 2026
One-click install
npx skills add https://github.com/tabesink/deepdoc-agent --skill bmad-shard-doc-tabesink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/tabesink/deepdoc-agent/tree/main/.cursor/skills/bmad-shard-doc
Command: npx skills add https://github.com/tabesink/deepdoc-agent --skill bmad-shard-doc-tabesink

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of unwieldy, monolithic markdown files by splitting them into smaller, section-organized shards that are easier to navigate, index, and reuse.

Core Features & Use Cases

  • Level-2 section sharding: Explodes a large markdown document into smaller files grouped by level 2 (default) sections.
  • Deterministic tooling: Uses npx @kayvan/markdown-tree-parser explode to produce an organized output structure (including index.md).
  • Original document handling: Lets you delete the original, move it to an archive, or keep it with explicit warnings to avoid confusion.

Quick Start

Shard your markdown file into a destination folder by instructing the AI: "Perform shard document for /path/to/architecture.md."

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?

To split a large markdown document, shard it into smaller files using level-2 heading boundaries. This process validates the source path, creates a destination folder, and generates section-organized files including an index.md for easier navigation.

What is markdown document sharding for file organization?

Markdown document sharding explodes a monolithic .md file into smaller, section-organized files grouped by level 2 sections. It produces an organized output structure including an index.md, making files easier to navigate, index, and reuse.

Does npx tooling work for archiving and generating an index for section splitting?

Yes, section splitting uses npx @kayvan/markdown-tree-parser explode to deterministically generate shard files and an index.md. After verifying the generated files, you can optionally delete the original document or move it to an archive folder.

Can I restructure a sprawling markdown file for retrieval-based workflows?

Yes, you can restructure a sprawling markdown file for retrieval-based workflows by sharding it into smaller files. This process organizes content by level-2 heading boundaries, creating an indexed structure optimized for easier navigation and retrieval.

What happens to the original markdown file after document sharding?

After document sharding, the original markdown file can be deleted, moved to an archive, or kept in place. If you keep the original document, explicit warnings are applied to prevent confusion with the newly generated shard files.