doc-search

doc-search is a skill for Claude Code, Codex from mike-anderson/doc-index-mcp. It costs 45 tokens per session (577 once invoked), scanned A, original, MIT.

A search tool for finding information in indexed PDFs, Word documents, PowerPoint files, spreadsheets, and Markdown files. It can return the surrounding section or chapter instead of only a small matching passage.

In plain words
What is it for?
Use it to search document contents, inspect a document's table of contents, and retrieve complete sections or related sections around a match.
Why use it?
It helps locate relevant information in large document collections without reading every file from beginning to end.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to search document contents, inspect a document's table of contents, and retrieve complete sections or related sections around a match.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mike-anderson/doc-index-mcp/doc-search
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 mike-anderson/doc-index-mcp --skill doc-search
Clone the repo
git clone --depth 1 https://github.com/mike-anderson/doc-index-mcp

Made for: Claude Code, Codex.

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 doc-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/mike-anderson/doc-index-mcp/doc-search/github.svg)](https://agentmods.dev/skills/mike-anderson/doc-index-mcp/doc-search)
Your own site
<a href="https://agentmods.dev/skills/mike-anderson/doc-index-mcp/doc-search"><img src="https://agentmods.dev/badge/skills/mike-anderson/doc-index-mcp/doc-search/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 doc-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/mike-anderson/doc-index-mcp/doc-search"><img src="https://agentmods.dev/badge/skills/mike-anderson/doc-index-mcp/doc-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 577 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.00045 $0.00577
Opus 5 $0.00023 $0.00289
Sonnet 5 $0.00009 $0.00115
Haiku 4.5 $0.00005 $0.00058

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

Security

Grade A, and why

doc-search 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 11d 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.

src/skills/doc-search/SKILL.md · 64 lines

How it starts

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

Doc Index MCP — Usage Guide

Key Concept: Boundaries

Documents are chunked (~256 tokens) and embedded. The server also detects boundaries — structural markers (chapters, sections, subsections, pages) forming a hierarchy. Each chunk belongs to a boundary. Siblings are boundaries sharing the same parent.

Search Patterns

Basic search — returns chunk fragments:

doc_search(query="authentication flow")

Full section around a match — use expand_to_boundary:

doc_search(query="error handling", expand_to_boundary="section", top_k=2, max_return_tokens=8192)

Full chapter — lower top_k, raise budget:

doc_search(query="data pipeline", expand_to_boundary="chapter", top_k=1, max_return_tokens=16384)

Sibling sections — see all peers under same parent:

doc_search(query="auth", expand_to_boundary="section", include_siblings=true, max_return_tokens=16384)

Structure-first retrieval

When you already know roughly where the answer lives, skip search entirely. Read the outline, then fetch that part directly — cheaper and more complete than guessing at a query:

doc_toc(source_name="manual", max_depth=2)
doc_get_content(source_name="manual", chapter="3", max_return_tokens=8192)

doc_get_content takes exactly one locator: boundary_id, chapter, section, or pages.

When to Use What

Need Approach
Quick fact Default search, top_k=3
Full context around match expand_to_boundary="section"
Whole topic area expand_to_boundary="chapter", top_k=1
What else is in same chapter include_siblings=true + expansion
Exact phrase Just search — exact matches auto-boost
Know the structure already doc_toc then doc_get_content
Specific table data list_tables then extract_table
One-off read, no reuse read_document (skips indexing)

Critical: Token Budget

  • Default 4096 = ~16 chunks, but only 1-2 sections
  • With section expansion: use 8192+
  • With chapter expansion: use 16384+
  • With siblings: use 16384+
  • Lower top_k when expanding (1-3)

Read the full file on GitHub · 64 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. 11d ago First seen · 64 lines · 45 tokens per session scan A b8816b9176ca

Subscribe to this mod's changes

doc-search is a skill published in the GitHub repository mike-anderson/doc-index-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 577 once invoked, about $0.0002 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-08-31.