Document Parser

Parses markdown documents into hierarchical sections with metadata for RAG systems.

Updated Nov 15, 2025
One-click install
npx skills add https://github.com/brendanbecker/SREcodex --skill document-parser-brendanbecker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Document Parser
Source: https://github.com/brendanbecker/SREcodex/tree/main/skills/document-parser
Command: npx skills add https://github.com/brendanbecker/SREcodex --skill document-parser-brendanbecker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tiktoken, markdown, beautifulsoup4, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill tackles the challenge of processing large documents that exceed typical context window limits, making them manageable and analyzable.

Core Features & Use Cases

  • Hierarchical Parsing: Breaks down documents into structured sections with clear hierarchies.
  • Metadata Extraction: Identifies and extracts tables, code blocks, benchmarks, and key terms.
  • Use Case: When faced with a lengthy research paper or technical manual, use this Skill to generate a navigable outline, extract key data points, and prepare the content for RAG systems.

Quick Start

Use the document-parser skill to parse the structure of the document located at '/tmp/my_large_document.md'.

Frequently Asked Questions about Document Parser

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

FAQPage Schema
How do I parse large markdown documents for RAG system ingestion?

To parse large markdown documents for RAG ingestion, this Skill breaks down files into a hierarchical structure, chunking content into semantically coherent sections within a target token range while extracting metadata like tables and code blocks.

What is the best way to extract metadata and structure from a lengthy technical manual?

The best way to extract metadata and structure from a technical manual is using hierarchical parsing to break down the document into navigable sections, identifying key data points, code blocks, benchmarks, and key terms.

How do I chunk markdown files into sections with accurate token counts?

You can chunk markdown files into sections with accurate token counts by utilizing Python scripts and the tiktoken dependency, which processes the document deterministically to measure and split content within a target token range.

Can I extract tables and code blocks from markdown using Python scripts?

Yes, you can extract tables and code blocks from markdown using Python scripts by leveraging the markdown and beautifulsoup4 dependencies to parse the document's hierarchical structure and isolate specific metadata elements.

Does this document parser support hierarchical section extraction for research papers?

Yes, this document parser supports hierarchical section extraction for research papers by breaking down lengthy documents into structured sections, generating a navigable outline, and extracting key data points for analysis.

Why do I need to chunk content into semantically coherent sections for RAG integration?

You need to chunk content into semantically coherent sections for RAG integration because large documents exceed typical context window limits, and chunking makes them manageable, analyzable, and retrievable without losing structural context.