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.
npx agentmods add skills/goldziher/basemind/basemind-code-searchnpx skills add Goldziher/basemind --skill basemind-code-searchgit clone --depth 1 https://github.com/Goldziher/basemindWrote 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.
[](https://agentmods.dev/skills/goldziher/basemind/basemind-code-search)<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>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.
| Model | Per session | Once 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 |
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.
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
codemodeoutlinebefore 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
codemodesymbolsinstead ofgrepfor a definition. It matches indexed symbol names and returnspath:line, skipping the comment/string/test-name noise grep drowns you in. - Use
codemodesreferences/callersinstead of grepping call sites. Indexed call edges, not text matches. - Use
codemodegrepinstead 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
adminmoderescanafter you edit code, not a server reconnect. Passpaths: [...]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 |
— |
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.
- 4d ago First seen · 82 lines · 86 tokens per session scan A aa9553719caa
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.
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.
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…
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…
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.
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…
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…