basemind-code-search

basemind-code-search is a skill for Claude Code, Codex from Goldziher/basemind. It costs 86 tokens per session (1,398 once invoked), scanned A, original, MIT.

A code-navigation tool that searches an indexed map of a codebase for symbols, definitions, references, callers, implementations, dependents, file outlines, and regular-expression matches.

In plain words
What is it for?
Use it to find where code is defined or used, see what calls a function, inspect a file's structure, and identify implementations or dependent code.
Why use it?
It helps answer structural code questions without opening whole files or sorting through irrelevant text matches.

Skill for Claude CodeCodex

Part of the basemind plugin — 15 skills, 10 commands, 6 agents, 2 hooks, 1 MCP server shipped together

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/goldziher/basemind/basemind-code-search
Any agent
npx skills add Goldziher/basemind --skill basemind-code-search
Clone the repo
git clone --depth 1 https://github.com/Goldziher/basemind

Made for: Claude Code, Codex.

Or install basemind, the plugin that ships this one along with the rest of its 15 skills, 10 commands, 6 agents, 2 hooks, 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 basemind-code-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldziher/basemind/basemind-code-search.svg)](https://agentmods.dev/skills/goldziher/basemind/basemind-code-search)
Your own site
<a href="https://agentmods.dev/skills/goldziher/basemind/basemind-code-search"><img src="https://agentmods.dev/badge/skills/goldziher/basemind/basemind-code-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,398 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.00086 $0.01398
Opus 5 $0.00043 $0.00699
Sonnet 5 $0.00017 $0.00280
Haiku 4.5 $0.00009 $0.00140

Measured 4d ago against content hash aa9553719caa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

basemind-code-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 4d 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.

.codex-plugin/skills/basemind-code-search/SKILL.md · 82 lines

How it starts

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

basemind-code-search — navigate code without reading it

basemind pre-indexes the repo into a tree-sitter code map across 300+ languages. Structural questions — where a symbol lives, what calls it, what shape a file has — resolve from the index in milliseconds and return paths, line numbers, and signatures, not file bodies. That is a fraction of the tokens of reading source, so it is the default, not an optimization.

basemind first, grep/read fallback. If a question is about where, what calls, what shape, or what implements, a basemind tool answers it cheaper than grep/rg or opening files. Drop to raw shell only when no tool covers the question.

The discipline

  • Use code mode outline before you open a file. A 1000-line file becomes a 30-line table of contents. Read the actual source only once you have the exact span, then read that range, not the file.
  • Use code mode symbols instead of grep for a definition. It matches indexed symbol names and returns path:line, skipping the comment/string/test-name noise grep drowns you in.
  • Use code modes references / callers instead of grepping call sites. Indexed call edges, not text matches.
  • Use code mode grep instead of shelling out to ripgrep when you genuinely need regex over content — it runs over the in-RAM index and returns capped, structured hits.
  • Do not re-read a file basemind already mapped. If the outline answered the question, stop.
  • Use admin mode rescan after you edit code, not a server reconnect. Pass paths: [...] to limit it.

Tool routing

Question MCP tool CLI
"Where is X defined?" code { mode: "symbols", name: "X" } (substring, optional kind) basemind code symbols "X"
"Jump to the definition of X used here?" code { mode: "definition", path: F, line } (scope-aware) basemind code definition F line [--column]
"What's the high-level architecture / module map?" graph { mode: "map" } basemind graph map
"What's the shape of file F?" code { mode: "outline", path: F } (add l2: true) basemind code outline F [--l2]
"What calls X?" (any name) code { mode: "references", name: "X" } basemind code references "X"
"What calls this specific definition?" code { mode: "callers", path: F, name } basemind code callers F name [--kind]
"Trace the call graph from a function?" graph { mode: "calls", name } (bounded BFS) basemind graph calls "name" [--direction --max-depth]
"What implements / extends / inherits X?" code { mode: "implementations", trait_name: "X" } basemind code implementations "X"
"What imports module M?" code { mode: "dependents", module: "M" } basemind code dependents "M"
"What files are indexed?" code { mode: "files" } (filter by language/path) basemind code files [--language --path-contains]
"Regex over file contents?" code { mode: "grep", pattern: "…" } basemind code grep "pattern" [--language --path-contains]
"What's indexed?" admin { mode: "status" } basemind admin status
"Refresh the index after editing?" admin { mode: "rescan", paths: […] } basemind admin rescan [path…]
"Fetch the next page?" pass next_cursor from the prior response as cursor

Read the full file on GitHub · 82 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. 4d ago First seen · 82 lines · 86 tokens per session scan A aa9553719caa

Subscribe to this mod's changes

basemind-code-search is a skill published in the GitHub repository Goldziher/basemind (98 stars, last pushed 2d ago), licensed MIT. It adds 86 tokens to every session and 1,398 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

graph-retrieval

Exposes graph-based retrieval as a tool capability via querygraph. Reads normalized graph store files, builds a query-relevant subgraph, and returns LLM-friendly semantic triples with replayable evidence metadata.

study8677/repobrain · 46 tokens

debug-evals

Debug haiku.rag evaluation runs in Logfire. Use when asked to look at Logfire for an eval run, find failing or low-scoring eval cases, compare runs, check citation quality (citedmap) or judge pass rate (answerequivalent), or explain why an eval case failed. Drives the Logfire MCP against the evals service, or the…

ggozad/haiku.rag · 103 tokens

debug-ingestion

Debug haiku.rag ingestion in Logfire. Use when asked to look at Logfire for ingestion, find failed or dead ingestion jobs, investigate retries or circuit-breaker events, trace a document through convert/chunk/embed/store, find which docling-serve instance served a request, spot slow conversions, or tell concurrent…

ggozad/haiku.rag · 87 tokens

knowledge-layer

High-level deployment wrapper over RepoBrain core with graph-first knowledge injection and all-file support. Exposes refreshfilesystem and askfilesystem for building and querying the knowledge graph.

study8677/repobrain · 42 tokens

mcpls

Install, configure, and run the mcpls CLI — a Rust binary bridging MCP to LSP that gives an agent compiler-grade code intelligence (hover, definitions, references, diagnostics, rename). Use when setting up or registering mcpls as an MCP server, writing or debugging an mcpls.toml, choosing CLI flags or MCPLS…

bug-ops/mcpls · 89 tokens

cartog

Code graph navigation, semantic code search, and impact analysis. Use when the user asks "where is X defined?", "what calls X?", "who imports X?", "what depends on X?", "how is X used?", "where is X called from?", "what breaks if I change X?", "is it safe to change/delete X?", "help me refactor X", "show me the call…

jrollin/cartog · 253 tokens