implementing-document-indexing

implementing-document-indexing is a skill for Claude Code from qte77/claude-code-plugins. It costs 45 tokens per session (782 once invoked), scanned A, original, Apache-2.0.

A document-search implementation that splits documents into heading-based sections, creates searchable numeric representations, and combines several retrieval methods.

In plain words
What is it for?
Use it to build document indexing, RAG search, memory layers, and retrieval pipelines with FAISS and tree-based filtering.
Why use it?
It helps applications find relevant passages while retaining the document's section structure and surrounding page context.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

Part of the rag-core plugin — 1 skill shipped together

Good fit Use it to build document indexing, RAG search, memory layers, and retrieval pipelines with FAISS and tree-based filtering.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qte77/claude-code-plugins/implementing-document-indexing
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 qte77/claude-code-plugins --skill implementing-document-indexing
Clone the repo
git clone --depth 1 https://github.com/qte77/claude-code-plugins

Made for: Claude Code.

Or install rag-core, the plugin that ships this one along with the rest of its 1 skill.

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 implementing-document-indexing

README.md
[![agentmods](https://agentmods.dev/badge/skills/qte77/claude-code-plugins/implementing-document-indexing/github.svg)](https://agentmods.dev/skills/qte77/claude-code-plugins/implementing-document-indexing)
Your own site
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/implementing-document-indexing"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/implementing-document-indexing/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 implementing-document-indexing

Your own site · 80×15
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/implementing-document-indexing"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/implementing-document-indexing.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 782 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.00782
Opus 5.5 $0.00018 $0.00313
Sonnet 5.5 $0.00009 $0.00156
Haiku 4.5 $0.00005 $0.00078

Measured 23d ago against content hash 4312df7534af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

implementing-document-indexing 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 23d 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.

plugins/rag-core/skills/implementing-document-indexing/SKILL.md · 119 lines

How it starts

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

Document Indexing Implementation

Target: $ARGUMENTS

Implements a document indexing and hybrid retrieval pipeline: parse documents, build a heading-based tree index, chunk by heading boundaries, embed with sentence-transformers, store in FAISS, and retrieve via hybrid search.

Architecture Overview

Document --> Parser --> Pages --> TreeIndex (PageIndex)
                                     |
                                     v
                              Chunker (heading-boundary + max-token)
                                     |
                                     v
                              Embedder (sentence-transformers)
                                     |
                                     v
                              VectorStore (FAISS IndexFlatIP)
                                     |
                                     v
                         HybridRetrieval (vector search -> full page -> tree filter)

Chunking Strategy

See references/chunking-strategies.md for full reference.

Heading-boundary chunking (primary):

  1. Split document by heading boundaries (H1-H6)
  2. Each section becomes a chunk with heading hierarchy as metadata
  3. If a section exceeds max tokens, split at sentence boundaries
  4. Preserve heading path (e.g., H1 > H2 > H3) as chunk metadata

Max-token splits (fallback):

  • Default max: 512 tokens
  • Overlap: 64 tokens between splits
  • Never split mid-sentence

Retrieval Pipeline

See references/retrieval-patterns.md for full reference.

Hybrid retrieval (vector search + tree filter):

  1. Embed query with same model used for indexing
  2. Vector search top-k chunks from FAISS (cosine similarity via IndexFlatIP)
  3. Full page fetch -- retrieve complete pages containing matched chunks
  4. Tree filter -- use PageIndex tree to filter to relevant sections only
  5. Return filtered sections with source citations (page, heading path)

Data Models

@dataclass
class Document:
    pages: list[Page]
    metadata: dict[str, str]

@dataclass
class Page:
    number: int
    content: str
    headings: list[str]

@dataclass
class TreeNode:
    heading: str
    level: int
    content: str
    children: list[TreeNode]

    def filter(self, predicate: Callable) -> TreeNode | None: ...

Read the full file on GitHub · 119 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 23d ago Changed 4312df7534af
  2. 1mo ago First seen · 119 lines · 45 tokens per session scan A c86214d1b1ef

Subscribe to this mod's changes

implementing-document-indexing is a skill published in the GitHub repository qte77/claude-code-plugins (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 45 tokens to every session and 782 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

sql-queries

Generate SQL queries from natural language descriptions. Supports BigQuery, PostgreSQL, MySQL, and other dialects. Reads database schemas from uploaded diagrams or documentation. Use when writing SQL, building data reports, exploring databases, or translating business questions into queries.

phuryn/pm-skills · 55 tokens

dummy-dataset

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.

phuryn/pm-skills · 48 tokens

ai-security

Use when attacking an AI/ML system or model — prompt injection & jailbreaks (Crescendo, Skeleton Key, Best-of-N), RAG/vector poisoning, agentic/MCP exploitation (CVE-2025-54136), ML supply-chain RCE (pickle CVE-2025-32434), model extraction / membership inference / adversarial suffixes (GCG).

hypnguyen1209/offensive-claude · 81 tokens

cloudflare-vectorize

Cloudflare Vectorize vector database for semantic search and RAG. Use for vector indexes, embeddings, similarity search, or encountering dimension mismatches, filter errors.

secondsky/claude-skills · 37 tokens

801-regulations-eu-ai-act

Use when reviewing, designing, or modifying Java enterprise systems that use AI, LLMs, AI agents, RAG, tool calling, workflow automation, or model-based decision support and need EU AI Act regulatory awareness. This should trigger for requests such as Review a Java AI system for EU AI Act controls; Design governance…

jabrena/plinth · 108 tokens

nano-banana-prompting

This skill should be used when crafting prompts for Nano Banana Pro (Gemini image generation). Use when users want help writing image generation prompts, need guidance on prompt structure, or want to optimize their prompts for better results.

NikiforovAll/claude-code-rules · 51 tokens