gaia-merge-docs

Merge multiple Markdown shards into a single ordered document preserving headings and cross-references.

2|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/gaiastudio-ai/gaia-public --skill gaia-merge-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gaia-merge-docs
Source: https://github.com/gaiastudio-ai/gaia-public/tree/main/plugins/gaia/skills/gaia-merge-docs
Command: npx skills add https://github.com/gaiastudio-ai/gaia-public --skill gaia-merge-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merge multiple Markdown shards into a single document while preserving section numbering and cross-references, enabling clean consolidation of distributed docs.

Core Features & Use Cases

  • Preserve section numbering and cross-references
  • Maintain consistent heading hierarchy
  • Reassemble in correct order from a directory of shards or an explicit file list
  • Fail fast on an empty input list (AC-EC5) to avoid producing an empty artifact
  • Resolve cross-references to anchors in the merged document

Quick Start

Provide a directory of sharded Markdown files or a list of file paths and specify an output path to generate a single merged document.

Frequently Asked Questions about gaia-merge-docs

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

FAQPage Schema
How do I merge multiple Markdown files into a single document?

To merge multiple Markdown files, provide a directory of sharded files or an explicit list of file paths and specify an output path. The tool validates inputs and consolidates the shards in order to generate a single merged document.

Does merging Markdown shards preserve heading hierarchy and cross-references?

Yes, merging Markdown shards preserves heading hierarchy and cross-references. It maintains consistent section numbering and resolves cross-references to anchors within the newly consolidated document.

What happens if I provide an empty list of files to merge?

If you provide an empty list of files to merge, the process will fail fast. This validation prevents producing an empty artifact and ensures only valid inputs are processed.

What is the best way to reassemble distributed Markdown documentation?

The best way to reassemble distributed Markdown documentation is to merge the shards from a specified directory or file list. This approach cleanly consolidates distributed docs while maintaining section numbering and cross-references.

Can I specify the output path for the merged Markdown artifact?

Yes, you can specify the output path for the merged Markdown artifact. After validating inputs and merging the provided shards in order, the tool generates the final document at your user-specified path.