content-retrieval

content-retrieval is a skill for Claude Code from thapaliyabikendra/ai-artifacts. It costs 28 tokens per session (2,293 once invoked), scanned A, original, Apache-2.0.

A guide for retrieving only the relevant parts of files by searching headings, matching text, or reading limited sections. It uses different levels of detail depending on whether you need to find, count, look up, or understand something.

In plain words
What is it for?
Use it when searching files, checking whether content exists, finding a value, reading an overview, or extracting a specific section.
Why use it?
It reduces unnecessary reading when working with large files and helps locate useful information more efficiently.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Good fit Use it when searching files, checking whether content exists, finding a value, reading an overview, or extracting a specific section.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thapaliyabikendra/ai-artifacts/content-retrieval
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thapaliyabikendra/ai-artifacts --skill content-retrieval
Clone the repo
git clone --depth 1 https://github.com/thapaliyabikendra/ai-artifacts

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for content-retrieval

README.md
[![agentmods](https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/content-retrieval/github.svg)](https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/content-retrieval)
Your own site
<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/content-retrieval"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/content-retrieval/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for content-retrieval

Your own site · 80×15
<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/content-retrieval"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/content-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.02293
Opus 5 $0.00014 $0.01146
Sonnet 5 $0.00006 $0.00459
Haiku 4.5 $0.00003 $0.00229

Measured 6d ago against content hash 862d2c5815b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

content-retrieval scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/content-retrieval/SKILL.md · 357 lines

How it starts

The opening of the file, as written. The whole thing — 357 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Content Retrieval Protocol

Token-efficient retrieval system using markdown-native section detection.

Summary

Core Principle: Never read a full file when partial content suffices.

Choose retrieval depth by need:

  • Exists? → Grep (files_with_matches)
  • Count? → Grep (count)
  • Lookup? → Grep (-C:2)
  • Overview? → Read (limit:40)
  • Section? → Grep heading → Read (offset, limit)
  • Full? → Read (justify first)

Quick Reference

Depth Levels

Level Need Method Lines
L0 Exists? Grep(output: files_with_matches) ~1
L1 Count? Grep(output: count) ~1
L2 Lookup value Grep(pattern, -C:2) ~5
L3 Overview Read(limit: 40) ~40
L4 Section Grep heading → Read(offset, limit) ~50
L5 Full Read() - justify first All

Decision Tree

What do I need?
├─ Does X exist? ──────────► L0: Grep files_with_matches
├─ How many X? ────────────► L1: Grep count
├─ What is X's value? ─────► L2: Grep with context
├─ What does X do? ────────► L3: Read limit:40
├─ How to use X for Y? ────► L4: Section extraction
└─ Implement X fully? ─────► L5: Full read (target only)

Tool Selection

Scenario Tool Parameters
Check skill exists Grep output: files_with_matches
Count matches Grep output: count
Get specific row Grep pattern, -C: 0-2
Read frontmatter Read limit: 25
Read frontmatter+summary Read limit: 40
Extract section Read offset: N, limit: 50
Full understanding Read (no limit)

Section Extraction

How Sections Work (Markdown-Native)

Sections are defined by headings and horizontal rules:

## Section A
Content...

---                    ← Section A ends here (horizontal rule)

## Section B           ← Or section ends at next same-level heading
Content...

No custom markers needed. Standard markdown structure.

Read the full file on GitHub · 357 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 357 lines · 28 tokens per session scan A 862d2c5815b2

Subscribe to this mod's changes

content-retrieval is a skill published in the GitHub repository thapaliyabikendra/ai-artifacts (24 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 28 tokens to every session and 2,293 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.