codebase-search

codebase-search is a skill for Claude Code from Helweg/open-codebase-index. It costs 38 tokens per session (1,203 once invoked), scanned A, original, MIT.

A search guide for finding code and documentation by meaning in the current project, with separate methods for exact names and broader questions.

In plain words
What is it for?
Use it to find where a feature is implemented, look up local library documentation, find similar code, trace callers and dependencies, or assess which code a change may affect.
Why use it?
It helps developers locate relevant files and understand code flow without already knowing the exact function, class, or variable name.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions OpenCode.

Part of the codebase-index plugin — 2 skills, 10 commands, 1 hook, 1 MCP server shipped together

Good fit Use it to find where a feature is implemented, look up local library documentation, find similar code, trace callers and dependencies, or assess which code a change may affect.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/helweg/open-codebase-index/skill
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 Helweg/open-codebase-index --skill skill
Clone the repo
git clone --depth 1 https://github.com/Helweg/open-codebase-index

Made for: Claude Code.

Or install codebase-index, the plugin that ships this one along with the rest of its 2 skills, 10 commands, 1 hook, 1 MCP server.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/helweg/open-codebase-index/skill"><img src="https://agentmods.dev/badge/skills/helweg/open-codebase-index/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,203 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.01203
Opus 5.5 $0.00015 $0.00481
Sonnet 5.5 $0.00008 $0.00241
Haiku 4.5 $0.00004 $0.00120

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

Security

Grade A, and why

codebase-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 14d 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.

skill/SKILL.md · 116 lines

How it starts

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

Codebase Search Skill

Important: Indexed Content

The indexed codebase contains two types of content:

  1. Project Source Code — all code files in the current workspace
  2. Knowledge Base Documentation — external documentation, usage guides, API references, and example programs added via add_knowledge_base (MCP/OpenCode) or knowledge_base_add (Pi).

When to Use What

Scenario Tool Why
Unfamiliar repository layout or subsystem codebase_context Compact orientation before broad reads
Code/library/API question codebase_search Search local knowledge first
Just need file locations codebase_peek Metadata only, saves ~90% tokens
Need to see actual code codebase_search Returns full code content
Find duplicates/patterns find_similar Given code snippet → similar code
Understand code flow call_graph Find callers/callees of any function
Trace dependency paths call_graph_path Find a shortest known path between two symbols
Analyze PR blast radius pr_impact Find affected symbols, communities, hub nodes, and risk
Don't know function/class names codebase_context Natural-language orientation with bounded evidence
Know a symbol and need its definition implementation_lookup Authoritative source without a context prerequisite
Need ALL occurrences grep Semantic returns top N only
Access specific URL webfetch Direct URL access, no codebase search needed
Local search fails websearch Fallback when codebase has no results
Local and web search fails suggest adding knowledge base Notify user to add related folder

Task-specific Workflow

  1. Check index_status when readiness or freshness is unknown. Index only when missing, stale, or incompatible.
  2. For unfamiliar repository orientation, use one compact codebase_context first pass (tokenBudget: 600, limit: 5) and inspect its evidence before broad reads or searches.
  3. For known definitions, use implementation_lookup directly. For callers/callees or dependency paths, use call_graph or call_graph_path directly once endpoints are identified.
  4. For known or suspected edit targets, optionally use codebase_edit_context for bounded source plus direct graph evidence.
  5. Use codebase_peek for semantic locations or codebase_search for matching content when needed. Neither requires another context call when scope is already known.
  6. Read known paths directly; use grep for exact identifiers and exhaustive literal matches. Apply directory/file filters when the scope is known, rather than guessing a narrower scope.

Read the full file on GitHub · 116 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. 14d ago Changed · -20 lines · -20 tokens per session 874f5de80503
  2. 17d ago Changed 18e32aee6b20
  3. 1mo ago First seen · 136 lines · 58 tokens per session scan A f228e71218b0

Subscribe to this mod's changes

codebase-search is a skill published in the GitHub repository Helweg/open-codebase-index (225 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 1,203 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-30.