harness-shard-doc

Split large Markdown documents into files by level-2 sections.

1|Updated May 23, 2026
One-click install
npx skills add https://github.com/baobao0303/harness --skill harness-shard-doc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-shard-doc
Source: https://github.com/baobao0303/harness/tree/main/.agents/skills/harness-shard-doc
Command: npx skills add https://github.com/baobao0303/harness --skill harness-shard-doc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Splitting large Markdown documentation into smaller, logically organized files prevents hard-to-browse content and makes it easier for an AI coding agent to focus on the right sections.

Core Features & Use Cases

  • Deterministic sharding by level-2 headings: Breaks a single large .md document into smaller files based on ## sections.
  • Creates an index for navigation: Produces an index.md in the destination folder to summarize and link the sharded output.
  • Optional original-document handling: Lets you delete or archive the original after sharding to avoid duplicated conflicting content.

Quick Start

Ask the AI to perform sharding for the file docs/ARCHITECTURE.md into docs/ARCHITECTURE/.

Frequently Asked Questions about harness-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?

Split a large markdown document by sharding it based on level 2 (##) heading sections. The process decomposes the single file into smaller organized files and generates an index.md to summarize and link the sharded output.

What is the best way to break down huge markdown documentation for AI context loading?

Breaking down huge markdown documentation into ordered section files prevents hard-to-browse content and makes it easier for an AI coding agent to focus on the right sections. It deterministically shards the file by level-2 headings.

How do I shard a markdown file into an output directory with an index?

Shard a markdown file by validating the source path and extension, creating the destination directory, and executing the explode command. This produces smaller organized files and an index.md in the destination folder for navigation.

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

Yes, you can delete or archive the original markdown file after sharding. Optional original-document handling lets you remove or archive the source to avoid duplicated conflicting content once the section files are generated.

Do I need npx to split markdown files by heading sections?

Yes, the sharding process requires executing npx with the markdown-tree-parser explode command. This dependency handles the decomposition of the source file into smaller organized files based on level 2 sections.

When should I shard markdown documentation instead of keeping a single file?

Shard markdown documentation when a single file becomes too huge to browse easily or when an AI coding agent needs to focus on specific sections. Splitting by level-2 headings decomposes the content for easier review and AI-context loading.