content-retrieval

Retrieve file content by depth levels L0–L5 and markdown sections.

24|5|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill content-retrieval
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: content-retrieval
Source: https://github.com/thapaliyabikendra/ai-artifacts/tree/main/.claude/skills/content-retrieval
Command: npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill content-retrieval

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Token-efficient retrieval using depth levels (L0-L5) and heading-based sections to minimize unnecessary reads and token usage for any file.

Core Features & Use Cases

  • Depth-based retrieval: Exists, Count, Lookup, Overview, Section, and Full reads to minimize tokens.
  • Section-aware extraction: Read by markdown headings to fetch targeted content quickly.
  • Protocol-guided decisions: Choose the minimal depth required to answer a question or locate data.

Quick Start

Use this skill to fetch a partial content from a document or extract a section without loading the entire file.

Frequently Asked Questions about content-retrieval

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

FAQPage Schema
How do I retrieve only specific sections from a file without reading the entire content?

Section-aware retrieval uses markdown headings and horizontal rules to extract targeted content. Specify the section by heading name, and the Skill returns only that portion, minimizing token usage and read time for large files.

What are depth levels and how do they reduce token usage?

Depth levels L0–L5 offer graduated retrieval operations: Exists checks file presence, Count tallies lines, Lookup finds specific data, Overview scans structure, Section isolates content by heading, and Full reads the entire file. Choose the minimal depth required to answer your question and avoid unnecessary tokens.

Can I retrieve file content by offset and limit without loading everything?

Yes. Token-efficient retrieval supports offset and limit parameters to extract a specific range of lines or content blocks. Combined with depth-level selection, this approach fetches only the data you need while preserving context options for surrounding lines.

How does markdown-based section detection work for file retrieval?

The Skill detects section boundaries using markdown heading syntax and horizontal rules, then maps content to those sections. Query by heading name to fetch that section directly without scanning the entire file structure.

What file formats does this approach work with?

Depth-aware retrieval is format-agnostic and applies across file reads. Markdown-based section detection requires markdown heading syntax; grep and line-based operations work on any text file, making the technique adaptable to logs, configs, and structured documents.

When should I use a lookup operation instead of reading the full file?

Use Lookup when searching for a specific value or pattern without needing context. It returns only matching lines, drastically reducing tokens compared to Full read. Reserve Full read for comprehensive analysis when overview or targeted section retrieval won't suffice.