index

index is a skill for Claude Code, Codex from BostonOrange/claude-code-framework. It costs 56 tokens per session (1,345 once invoked), scanned A, original, MIT.

A searchable vector index of a codebase stored in a SQLite database. It breaks files into pieces and turns them into numerical representations so related code can be found by meaning, not only by exact words.

In plain words
What is it for?
Use it mainly for codebases larger than about 50,000 lines. It can index selected file types, show index statistics, rebuild or remove the index, and use a hosted or local embedding provider.
Why use it?
It helps agents search very large codebases when ordinary text search and a high-level architecture document are not enough. The index updates incrementally after the first build.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .claude/hooks/codebase-index.sh index [args].

Good fit Use it mainly for codebases larger than about 50,000 lines. It can index selected file types, show index statistics, rebuild or remove the index, and use a hosted or local embedding provider.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/BostonOrange/claude-code-framework
agentmods
npx agentmods add skills/bostonorange/claude-code-framework/index

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 index

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bostonorange/claude-code-framework/index"><img src="https://agentmods.dev/badge/skills/bostonorange/claude-code-framework/index.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,345 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.00056 $0.01345
Opus 5.5 $0.00022 $0.00538
Sonnet 5.5 $0.00011 $0.00269
Haiku 4.5 $0.00006 $0.00135

Measured 1mo ago against content hash c6519406187c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

index 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 1mo 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.

skills/index/SKILL.md · 126 lines

How it starts

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

Index — Build the Codebase Vector Index

For codebases where Grep + architecture.md aren't enough — typically >50k LOC — /index builds a SQLite + sqlite-vec index that powers /search. The index is gitignored, lives at .claude/state/codebase.db, and updates incrementally on subsequent runs.

Usage

/index                              full build (only files not yet indexed; subsequent runs are incremental)
/index --full                       force re-embed every file (use after changing chunking config)
/index --include='\.cls$|\.trigger$' index only Apex files (Salesforce)
/index --provider=local             use Ollama local embeddings instead of Voyage/OpenAI
/index stats                        show index size, file count, age
/index purge                        delete the index entirely

Setup

The index requires an embedding provider. Pick one before first run:

Provider Setup Cost (1M LOC) Quality Privacy
voyage (default) export VOYAGE_API_KEY=... (signup) ~$2.50 one-time, $0.05/incremental commit Best for code API
openai export OPENAI_API_KEY=... ~$0.50 one-time Good API
local ollama pull nomic-embed-text && ollama serve Free, ~6hr initial on Mac Lower All local

Configure via env vars (typically in .env or shell profile):

export CLAUDE_FRAMEWORK_EMBED_PROVIDER=voyage   # or openai, local
export VOYAGE_API_KEY=<your-key>

Process

Phase 1: Verify provider config

Run bash .claude/hooks/codebase-index.sh stats first. If no index, check $CLAUDE_FRAMEWORK_EMBED_PROVIDER and the corresponding API key. If unset, prompt the user to configure before proceeding.

Phase 2: Run the index command

bash .claude/hooks/codebase-index.sh index [args]

The script:

  1. Walks the working tree via git ls-files (respects .gitignore)
  2. Filters by include globs (defaults to common code extensions; configurable via --include)
  3. For each file: computes git SHA, skips if already indexed at that SHA (incremental)
  4. Chunks the file into 40-line windows with 8-line overlap
  5. Embeds each chunk via the configured provider
  6. Stores (file_path, line_start, line_end, content, sha, embedding) in SQLite

Read the full file on GitHub · 126 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. 1mo ago First seen · 126 lines · 56 tokens per session scan A c6519406187c

Subscribe to this mod's changes

index is a skill published in the GitHub repository BostonOrange/claude-code-framework (3 stars, last pushed 3mo ago), licensed MIT. It adds 56 tokens to every session and 1,345 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-08-31.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens