rcode-shard-doc

Split large markdown documents into section-based files by level 2 headings.

2|1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/hanzlahabib/rcode --skill rcode-shard-doc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rcode-shard-doc
Source: https://github.com/hanzlahabib/rcode/tree/main/rcode/skills/core/rcode-shard-doc
Command: npx skills add https://github.com/hanzlahabib/rcode --skill rcode-shard-doc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual effort of breaking long markdown documents into smaller, manageable pieces while preserving structure and making large files easier to navigate.

Core Features & Use Cases

  • Section-based Sharding: Splits documents into organized files using level 2 headings by default, with a generated index for navigation.
  • Validation and Safety Checks: Verifies the source file exists, is markdown, and that the destination folder is writable before starting.
  • Original File Handling: Guides the user through deleting, archiving, keeping, or canceling after sharding completes.
  • Use Case: A documentation owner can shard a long architecture spec into a folder of section files so teams can review and update parts independently.

Quick Start

Ask the skill to shard your markdown document from its file path and choose where the split files should be saved.

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

To split a markdown document into separate files, the Skill shards content by level 2 headings and generates an index for navigation. It validates the source file and destination folder before creating smaller, organized section files.

What is the best way to break down long technical notes into hierarchical shards?

The best way to break down technical notes into hierarchical shards is by splitting the markdown file at level 2 headings. This creates a folder of section files with a generated index, allowing teams to review and update parts independently.

Does the markdown sharding process keep or delete the original file?

The sharding process retains the original file by default. After splitting completes, it prompts you to explicitly choose whether to delete, archive, keep, or cancel the operation regarding the original markdown document.

How does document sharding handle validation before splitting markdown files?

Document sharding validates the process by verifying the source file exists and is markdown, and checking that the destination folder is writable. These safety checks ensure successful file organization before splitting begins.

Can I shard markdown documentation for a specific destination folder?

You can shard markdown documentation into a specific destination folder by providing the source file path and target directory. The Skill validates that the destination folder is writable before starting the section-based sharding process.