index

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

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.

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

Made for: Claude Code, Codex.

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. Scan, not verified.
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 $0.00056 $0.01345
Opus 5 $0.00028 $0.00673
Sonnet 5 $0.00011 $0.00269
Haiku 4.5 $0.00006 $0.00135

Measured yesterday against content hash c6519406187c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday 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 (2 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 1,345 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens