shard-doc

Splits large markdown documents into files by level 2 headings.

3|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/GDSDN/kord-aios --skill shard-doc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shard-doc
Source: https://github.com/GDSDN/kord-aios/tree/main/src/features/builtin-skills/kord-aios/story/shard-doc
Command: npx skills add https://github.com/GDSDN/kord-aios --skill shard-doc

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the process of breaking down large documents into smaller, more manageable files based on their section structure, improving organization and accessibility.

Core Features & Use Cases

  • Automatic Sharding: Splits documents into individual files based on level 2 markdown headings.
  • Folder Structure Creation: Organizes sharded documents into a logical folder hierarchy.
  • Content Integrity: Preserves all original formatting, code blocks, diagrams, and markdown elements.
  • Use Case: Take a lengthy technical specification document and automatically split it into separate files for each major feature, making it easier for different team members to navigate and reference specific sections.

Quick Start

Use the shard-doc skill to split the document 'architecture.md' into its constituent sections.

Frequently Asked Questions about 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 separate files by section?

To split a large markdown document, this skill automatically shards it into smaller files based on level 2 headings. It creates a directory structure for the sharded files and generates an index file for easy navigation.

Does markdown sharding preserve original content formatting and code blocks?

Yes, markdown sharding preserves all original content formatting, code blocks, and diagrams. The splitting process ensures that markdown elements remain intact within the newly created section files.

What is the best way to organize lengthy technical specification markdown files?

The best way to organize lengthy technical specification markdown files is by sharding them into a logical folder hierarchy. This process breaks documents into manageable section files for easier team navigation.

Can I manually parse markdown headings instead of using the automated md-tree command?

Yes, you can manually parse markdown headings as an alternative to the automated md-tree command. The skill supports both automated sharding and a manual parsing process with robust error handling and validation.

Do I need the markdown-tree-parser dependency to shard documents into a folder structure?

Yes, you need the markdown-tree-parser dependency to shard documents into a folder structure. This package enables the automated parsing of level 2 headings required for the file splitting process.

When should I not use automated document sharding for markdown content organization?

You should not use automated document sharding when your markdown content lacks level 2 headings or requires maintaining a single-file structure. The skill specifically splits documents based on level 2 heading boundaries.