bmad-shard-doc

Split large markdown documents into smaller files by section level.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/peshay/portfolixir --skill bmad-shard-doc-peshay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/peshay/portfolixir/tree/main/.claude/skills/bmad-shard-doc
Command: npx skills add https://github.com/peshay/portfolixir --skill bmad-shard-doc-peshay

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the issue of managing large markdown documents by splitting them into smaller, organized files, making them more accessible and easier to navigate.

Core Features & Use Cases

  • Document Sharding: Automatically splits markdown documents into smaller files based on level 2 sections.
  • User Customization: Allows users to specify the destination folder for the sharded documents.
  • Post-Sharding Options: Offers options to delete, move, or keep the original document after sharding.

Quick Start

Split the 'project-readme.md' document into smaller files and place them in the 'sharded-docs' folder.

Frequently Asked Questions about bmad-shard-doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I shard large markdown documents into smaller sections?

To shard large markdown documents, this Skill automates splitting them into smaller files based on level 2 sections. You can specify a destination folder for the output files and handle post-sharding actions like deleting or archiving the original document.

What is the best way to split a markdown file by headers automatically?

Splitting a markdown file by headers is handled automatically by this Skill using the @kayvan/markdown-tree-parser dependency. It divides the document into organized files based on level 2 sections, making large documents easier to navigate.

Do I need npx to split markdown files into separate files?

Yes, you need npx and the @kayvan/markdown-tree-parser package installed to execute the markdown file splitting process. These dependencies are required to parse the document structure and automate the sharding workflow.

Can I archive the original document after sharding it into smaller files?

Yes, you can archive the original document after sharding. The Skill offers post-sharding options that allow you to delete, move, or keep the original markdown document after it has been split into smaller files.

How does document sharding handle the output folder for split markdown files?

Document sharding handles the output folder by allowing user customization of the destination directory. You specify the target folder path, and the Skill automatically generates and saves the split level 2 markdown sections there.

When do I need to shard a markdown document?

You need to shard a markdown document when managing large files that become difficult to navigate. Splitting them into smaller, organized files makes the content more accessible and easier to manage for readers and documentation systems.