mdsel

Extract specified sections from Markdown documents using declarative selectors.

8|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/dabstractor/mdsel-skill --skill mdsel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mdsel
Source: https://github.com/dabstractor/mdsel-skill/tree/main/skills/mdsel
Command: npx skills add https://github.com/dabstractor/mdsel-skill --skill mdsel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

mdsel reduces the overhead of accessing large Markdown files by enabling selective retrieval of sections through declarative selectors rather than reading entire documents.

Core Features & Use Cases

  • Token-efficient: reads only the needed sections using zero-based indexing.
  • Declarative selectors: supports patterns like h2.0 and h3.1 to fetch precise content from Markdown.
  • On-demand behavior: loads on demand, indexes before selecting, and integrates with mdsel tooling and Read.

Quick Start

Install the mdsel tool, index the target Markdown file, and then query the desired selector to retrieve only the needed sections.

Frequently Asked Questions about mdsel

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

FAQPage Schema
How do I extract specific sections from a large Markdown document without reading the whole file?

You can extract specific Markdown sections by applying declarative selectors using zero-based indexing, which retrieves only the needed headings and content rather than reading the entire document. This enforces indexing before selecting to minimize token usage.

What are declarative selectors for Markdown and how do they work?

Declarative selectors are patterns like h2.0 and h3.1 that target precise sections in Markdown documents. They work by enforcing an indexing step on the file first, then selecting the matching heading to fetch only the requested content.

How do I reduce token usage when querying large READMEs or documentation?

To reduce token usage with large READMEs or documentation, use selector-based retrieval to load only specified sections on demand. The tool indexes the target Markdown file first, then queries the desired selector to return partial content.

Can I use zero-based indexing to access Markdown headings on demand?

Yes, zero-based indexing is supported for accessing Markdown headings on demand. The process requires indexing the target Markdown file before selecting, ensuring only the specified sections are loaded to optimize token efficiency.

What is the best way to read specific Markdown headings instead of loading entire files?

The best way to read specific Markdown headings is using selector-based access with zero-based indexing. This approach loads content on demand, enforcing indexing before selecting to fetch precise sections and avoid the overhead of reading entire documents.

Do I need to index a Markdown file before selecting sections from it?

Yes, you must index the Markdown file before selecting sections. The tool enforces indexing-before-selecting to enable declarative selector queries, ensuring only the needed sections are retrieved from large documents like READMEs.