From bmad-pro-skills
Splits large markdown documents into smaller organized files by level 2 sections using npx @kayvan/markdown-tree-parser. Useful for managing large docs; activates on 'perform shard document'.
npx claudepluginhub bmad-code-org/bmad-method --plugin bmad-method-lifecycleThis skill uses the workspace's default tool permissions.
**Goal:** Split large markdown documents into smaller, organized files based on level 2 sections using `npx @kayvan/markdown-tree-parser`.
Splits single-file architecture.md into directory-based format (e.g., executive-summary.md, decisions/DR-001.md) for better organization. Auto-triggers on >500 lines or 10 DRs.
Splits large files over 1000 lines into focused modules (100-300 lines each). Analyzes exports and dependencies, proposes plan, creates files with updated imports and barrels, verifies npm build. Triggers on 'shard this' or 'split file'.
Guides splitting large CLAUDE.md (>300 lines) into modular .claude/ files by concern, module, or team, with root index and precedence rules to avoid conflicts.
Share bugs, ideas, or general feedback.
Goal: Split large markdown documents into smaller, organized files based on level 2 sections using npx @kayvan/markdown-tree-parser.
/path/to/architecture.md --> /path/to/architecture/[y] to confirm use of default: [suggested-path], else enter a new path)npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]Critical: Keeping both the original and sharded versions defeats the purpose of sharding and can cause confusion.
Present user with options for the original document:
What would you like to do with the original document
[source-document-name]?Options:
[d]Delete - Remove the original (recommended - shards can always be recombined)[m]Move to archive - Move original to a backup/archive location[k]Keep - Leave original in place (NOT recommended - defeats sharding purpose)Your choice (d/m/k):
d (delete)m (move)archive subfolder
/path/to/architecture.md --> /path/to/archive/architecture.md[y] to use default: [default-archive-path], or provide custom path)k (keep)