Agent skill

Codebase Search Workflow

by Helweg in Helweg/open-codebase-index

Directs an agent to use a local codebase index for repository orientation, definition lookups, call graphs and semantic search before turning to web lookups.

MITAuto-check passedAgent Workflows

Install Codebase Search Workflow

skills CLI
$ npx skills add Helweg/open-codebase-index --skill codebase-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Helweg/open-codebase-index codebase-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Helweg/open-codebase-index.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codebase-search .claude/skills/codebase-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codebase-search
GitHub stars
217
Token cost
~822 tokens
SKILL.md length
352 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Directs an agent to use a local codebase index for repository orientation, definition lookups, call graphs and semantic search before turning to web lookups.

  • Works in 6 steps: Run index_status when index readiness or… → When repository orientation is needed… → For a known definition, use… → …
  • Getting oriented in an unfamiliar repository before reading files
  • SKILL.md covers Core workflow, Tool Priority, Suggested Commands and Additional Notes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill sets the order in which an agent uses the tools of a local semantic codebase index. When index readiness is unknown it checks index_status. For an unfamiliar repository it makes one compact codebase_context pass with a token budget of 600 and a limit of 5, inspects the evidence it returns, and does not call it mechanically before every task. Known targets go straight to implementation_lookup, to call_graph for callers or callees, and to call_graph_path for the relationship between two identified endpoints.

Other tools fill specific roles: codebase_edit_context gives bounded target source plus direct callers and callees before an edit, codebase_peek returns metadata-only semantic locations, codebase_search returns matching source content, find_similar spots analogous code and duplicates, and plain grep handles exact identifiers. If results look weak, the agent checks readiness and scope with index_status and runs index_codebase only when the index is missing, stale or incompatible. The skill names OpenCode, MCP, Pi, omp and Codex as the hosts it targets.

When your agent uses it

  • Getting oriented in an unfamiliar repository before reading files
  • Finding callers or callees of a known function
  • Locating analogous or duplicated implementations in a codebase
  • Scoping a change by pulling bounded context around a target symbol

Example prompts

  • “Explain how the payment processing flow works in this repo, starting from the index.”
  • “Who calls chargeCard, and what does it call in turn?”
  • “Find other places that implement something similar to this retry helper.”

Requirements

  • The codebase index tools available in your agent host

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  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…
  3. For a known definition, use implementation_lookup(query) directly. For callers or callees, use call_graph(name, direction) directly; for…
  4. For a change with a known or suspected target symbol, optionally use codebase_edit_context for bounded target source plus direct callers…
  5. Use codebase_peek(query, ...) when only semantic locations are needed, and codebase_search(query, ...) when matching source content is…
  6. Read known paths directly and use grep for exact identifiers or exhaustive literal matches. Use find_similar(code) for analogous…

What it can do on your machine

Read from SKILL.md and the folder at commit 6d5025f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Search Workflow loads about 822 tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 352 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~822

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Helweg/open-codebase-index at commit 6d5025f, republished under its MIT licence (© Helweg). 352 words, ~822 tokens.

Download SKILL.mdSave it as .claude/skills/codebase-search/SKILL.md (or your agent's skills folder).
name
codebase-search
description
Task-specific local codebase-understanding workflow for OpenCode, MCP, Pi, omp, and Codex. Use compact context for unfamiliar repository orientation, direct definition and graph tools for known targets.

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.

Show full SKILL.md (151 more words)Show less

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.

Suggested Commands

  • Unfamiliar subsystem: codebase_context("payment processing flow", tokenBudget: 600, limit: 5).
  • Known definition: implementation_lookup("validate").
  • Callers or callees: call_graph("chargeCard", "callees").
  • Known endpoints: call_graph_path("submitPayment", "chargeCard").
  • Change target: codebase_edit_context(query: "reject expired tokens", symbol: "validateToken").
  • Matching source after scope is known: codebase_search("payment retry guards").
  • Analogous code: find_similar("function validate(data)").

Additional Notes

  • Use grep for exact identifiers and tiny, deterministic lookups.
  • Use websearch only when local tools return no results and docs are likely missing.
  • Choose the next tool from the evidence needed, not a mandatory context → peek → search chain.

© Helweg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/codebase-search of Helweg/open-codebase-index.

Open the folder on GitHubat commit 6d5025f

Compare with similar skills

Codebase Search Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Search Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Search Workflow this skillHelweg/open-codebase-index217—~822Automated safety check: PassMIT
Basemind Index ScanGoldziher/basemind106—~997Automated safety check: WarnMIT
trace-mcp Code Navigationnikolai-vysotskyi/trace-mcp186—~1.6kAutomated safety check: NotesMIT
Basemind Code ContextGoldziher/basemind106—~2.6kAutomated safety check: PassMIT
MCP Code Search Tool SelectionContext-Engine-AI/Context-Engine402—~1.3kAutomated safety check: PassMIT
Context-Engine Code SearchContext-Engine-AI/Context-Engine402—~14kAutomated safety check: PassMIT

Similar skills

  • Basemind Index Scan

    Goldziher/basemind

    Builds or refreshes the basemind code index from the command line, for when basemind reports no index or its MCP server is not running.

    106 GitHub stars~997 tokensUpdated today
    Agent WorkflowsAuto-check: warnings
  • trace-mcp Code Navigation

    nikolai-vysotskyi/trace-mcp

    Routes code exploration through trace-mcp's indexed dependency graph, using symbol search, outlines, call graphs and change-impact tools instead of Read, Grep and Glob.

    186 GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check: notes
  • Basemind Code Context

    Goldziher/basemind

    Answers structural questions about a repository, such as where a symbol is defined, what calls it and what changed recently, through the basemind MCP server.

    106 GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • MCP Code Search Tool Selection

    Context-Engine-AI/Context-Engine

    Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions.

    402 GitHub stars~1.3k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Context-Engine Code Search

    Context-Engine-AI/Context-Engine

    Searches a codebase with hybrid semantic and lexical retrieval plus neural reranking through MCP tools, for finding implementations and grounded answers.

    402 GitHub stars~14k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • 1c Code Search

    comol/ai_rules_1c

    Find BSL code in a 1C project — routines by name, code by behaviour or exact literal, module layout, members of a context — through the graph and code-metadata MCP servers before any Grep.

    480 GitHub stars~1k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from Helweg/open-codebase-index

  • Codebase Search

    Helweg/open-codebase-index

    Chooses the right retrieval tool for code questions: compact context for unfamiliar repos, direct lookup for known symbols, call graphs for relationships and grep for exhaustive matches.

    217 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Questions about Codebase Search Workflow

What does Codebase Search Workflow do?

Directs an agent to use a local codebase index for repository orientation, definition lookups, call graphs and semantic search before turning to web lookups. This skill sets the order in which an agent uses the tools of a local semantic codebase index. When index readiness is unknown it checks index_status.

When should I use Codebase Search Workflow?

Codebase Search Workflow fits situations like: getting oriented in an unfamiliar repository before reading files; finding callers or callees of a known function; locating analogous or duplicated implementations in a codebase; scoping a change by pulling bounded context around a target symbol.

How do I install Codebase Search Workflow in Claude Code?

Run `npx skills add Helweg/open-codebase-index --skill codebase-search -a claude-code`. Or copy the skill folder (skills/codebase-search in Helweg/open-codebase-index) into .claude/skills/codebase-search in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Search Workflow in Codex?

Run `npx skills add Helweg/open-codebase-index --skill codebase-search -a codex`. Or copy the skill folder (skills/codebase-search in Helweg/open-codebase-index) into .agents/skills/codebase-search in your project. Codex loads it when a task matches its description.

Can I use Codebase Search Workflow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Helweg/open-codebase-index --skill codebase-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-search, .gemini/skills/codebase-search, .github/skills/codebase-search and .opencode/skills/codebase-search in your project.

What does Codebase Search Workflow need to run?

SKILL.md names no scripts, command-line tools or credentials: Codebase Search Workflow is instructions for the agent only. Our summary lists: The codebase index tools available in your agent host.

Does Codebase Search Workflow access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codebase Search Workflow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codebase Search Workflow use?

Codebase Search Workflow is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Search Workflow use?

About 822 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codebase Search Workflow?

Skills that share tags, products or a category with Codebase Search Workflow: Basemind Index Scan (Goldziher/basemind, 106 stars), trace-mcp Code Navigation (nikolai-vysotskyi/trace-mcp, 186 stars), Basemind Code Context (Goldziher/basemind, 106 stars) and MCP Code Search Tool Selection (Context-Engine-AI/Context-Engine, 402 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Search Workflow?

Helweg (a GitHub user) maintains it in Helweg/open-codebase-index, which has 217 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: Helweg/open-codebase-index on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.