codebase-search

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

A local code-search workflow for understanding an existing repository. It helps locate definitions, related code, similar implementations, and paths through the codebase before making changes.

In plain words
What is it for?
Use it to find symbols, inspect relevant code, trace execution paths, compare duplicate patterns, and check whether the code index is ready or needs rebuilding.
Why use it?
It reduces the need to search files blindly and makes it easier to understand how parts of a project depend on one another.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex; 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 symbols, inspect relevant code, trace execution paths, compare duplicate patterns, and check whether the code index is ready or needs rebuilding.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/helweg/open-codebase-index/codebase-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 Helweg/open-codebase-index --skill codebase-search
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/codebase-search/github.svg)](https://agentmods.dev/skills/helweg/open-codebase-index/codebase-search)
Your own site
<a href="https://agentmods.dev/skills/helweg/open-codebase-index/codebase-search"><img src="https://agentmods.dev/badge/skills/helweg/open-codebase-index/codebase-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 codebase-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/helweg/open-codebase-index/codebase-search"><img src="https://agentmods.dev/badge/skills/helweg/open-codebase-index/codebase-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 707 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.00043 $0.00707
Opus 5.5 $0.00017 $0.00283
Sonnet 5.5 $0.00009 $0.00141
Haiku 4.5 $0.00004 $0.00071

Measured 14d ago against content hash 7ab8340bb174, 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.

skills/codebase-search/SKILL.md · 48 lines

How it starts

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

Codebase Search Skill

Use this skill when you need local repository knowledge before web lookup.

Core workflow

  1. Run index_status when index readiness or freshness is unknown.
  2. When repository orientation is needed (layout, relevant symbols, or cross-file intent), use one compact codebase_context(query, tokenBudget: 600, limit: 5) first pass and inspect returned evidence before broad reads or searches. Do not call it mechanically before every task or tool.
  3. For a known definition, use implementation_lookup(query) directly. For callers or callees, use call_graph(name, direction) directly; for relationships between identified endpoints, use call_graph_path(from, to) directly.
  4. For a change with a known or suspected target symbol, optionally use codebase_edit_context for bounded target source plus direct callers and callees.
  5. Use codebase_peek(query, ...) when only semantic locations are needed, and codebase_search(query, ...) when matching source content is needed. Neither requires another context call when the task is already scoped.
  6. Read known paths directly and use grep for exact identifiers or exhaustive literal matches. Use find_similar(code) for analogous implementations and duplicates.

Avoid repeating broad reads or retrieval when existing evidence already answers the question. If results are weak, check readiness, compatibility, and scope with index_status; run index_codebase only when the index is missing, stale, or incompatible.

Tool Priority

  • codebase_context for compact, unfamiliar-repository orientation; explicit symbol and from + to routing remains supported.
  • implementation_lookup for known definitions.
  • call_graph and call_graph_path for relationships once symbols or endpoints are identified.
  • codebase_edit_context as an optional bounded pre-edit step.
  • codebase_peek for metadata-only semantic locations.
  • codebase_search for matching implementation content.
  • find_similar for pattern matching and duplication.
  • index_codebase (force/estimate/dryRun/verbose) for first-time or stale indexes.
  • index_status, index_health_check, index_metrics, index_logs for operational checks.

Read the full file on GitHub · 48 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 · +4 lines · +6 tokens per session 7ab8340bb174
  2. 1mo ago First seen · 44 lines · 37 tokens per session scan A 01b7766bf38e

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 43 tokens to every session and 707 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.