One-click install
npx skills add https://github.com/cassioalexandre/agf --skill bmad-shard-doc-cassioalexandre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-shard-doc
Source: https://github.com/cassioalexandre/agf/tree/main/_bmad/core/bmad-shard-doc
Command: npx skills add https://github.com/cassioalexandre/agf --skill bmad-shard-doc-cassioalexandre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sharding large markdown documents becomes slow and error-prone when you need modular navigation, smaller updates, or section-focused reuse without duplicating content.

Core Features & Use Cases

  • Level-2 section sharding: Splits a markdown file into smaller organized files based on level 2 sections (default heading depth).
  • Structured output folder: Creates a destination folder named after the source file and generates an index.md for easy entry.
  • Safety guardrails for inputs/outputs: Validates the source path, markdown extension, destination permissions, command success, and verifies produced files before reporting completion.
  • Original-document handling: Offers explicit options to delete, archive, or keep the original document to avoid confusion and accidental loading of the wrong version.

Quick Start

Tell the agent: "Shard document /path/to/architecture.md into /path/to/architecture/, and delete the original after a successful split."

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 by section?

Splitting a large markdown document into smaller section files involves sharding level-2 headings into an organized destination folder. The process uses npx @kayvan/markdown-tree-parser explode to generate modular files and an index.md for easy navigation.

What is document sharding for markdown knowledge bases?

Document sharding for markdown knowledge bases is the process of breaking unwieldy, monolithic documentation into modular, section-based files. It solves knowledge-base maintenance issues by creating an organized folder with a structured index for easier updates and section-focused reuse.

How do I organize a markdown file into a structured folder with an index?

Organizing a markdown file into a structured folder requires selecting a writable destination directory and running a markdown tree parser. The tool creates a folder named after the source file and generates an index.md to provide an easy entry point for navigating the sharded sections.

Can I delete or archive the original markdown file after sharding?

You can delete, archive, or keep the original markdown file after sharding. The process verifies the output files and index.md before handling the original document according to your chosen option, ensuring data safety and preventing accidental loading of the wrong version.

Does markdown file sharding validate source paths and destination permissions?

Markdown file sharding validates source existence, markdown file extensions, and destination directory permissions before executing the split. These safety guardrails ensure the command succeeds and verifies produced files before reporting completion.

When should I use markdown section sharding for documentation governance?

Markdown section sharding should be used for documentation governance when you need modular navigation, smaller updates, or section-focused reuse without duplicating content. It is ideal for maintaining large knowledge bases where unwieldy, monolithic documents slow down workflow.