Agent skill

Basemind Code Search

by Goldziher in Goldziher/basemind

Answers where code is defined, who calls it and what shape a file has from a pre-built index, returning paths and line numbers instead of file contents.

MITAuto-check passedDevelopment

Install Basemind Code Search

skills CLI
$ npx skills add Goldziher/basemind --skill basemind-code-search -a claude-code

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

GitHub CLI
$ gh skill install Goldziher/basemind basemind-code-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/Goldziher/basemind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/basemind-code-search .claude/skills/basemind-code-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
basemind-code-search
GitHub stars
106
Token cost
~1.3k tokens
SKILL.md length
564 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Answers where code is defined, who calls it and what shape a file has from a pre-built index, returning paths and line numbers instead of file contents.

  • Finding where a function or type is defined in a large repo
  • SKILL.md covers The discipline, Tool routing, Examples and Notes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Listing the callers or implementations of a symbol

What it does

Basemind pre-indexes a repository into a tree-sitter code map covering 300+ languages, so structural questions resolve from the index and return paths, line numbers and signatures rather than file bodies. The skill makes it the default: when a question is about where something lives, what calls it, what implements it or what shape a file has, the agent reaches for a basemind tool before grep, ripgrep or opening files.

The working habits are specific. Take an outline before opening a file, use symbol search instead of grep for definitions, use references and callers instead of grepping call sites, use the indexed grep mode only when regex over content is truly needed, avoid rereading files the index already mapped, and run the admin rescan after edits instead of reconnecting the server. A routing table maps each question to an MCP tool and a matching basemind CLI command, including definition lookup and a module map.

When your agent uses it

  • Finding where a function or type is defined in a large repo
  • Listing the callers or implementations of a symbol
  • Getting a file outline before deciding what to read

Example prompts

  • “Find where parseConfig is defined and list everything that calls it.”
  • “Show me an outline of src/server/router.ts before you open it.”
  • “Give me the module map of this repo.”

Requirements

  • The basemind MCP server or CLI with the repository indexed

What it can do on your machine

Read from SKILL.md and the folder at commit 2f6da31. 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

Basemind Code Search loads about 1.3k tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 564 words of instructions outside code blocks.

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

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 Goldziher/basemind at commit 2f6da31, republished under its MIT licence (© Goldziher). 564 words, ~1,250 tokens.

Download SKILL.mdSave it as .claude/skills/basemind-code-search/SKILL.md (or your agent's skills folder).
name
basemind-code-search
description
Find where code is defined and used without reading files — symbol search, file outlines, references, callers, call graphs, implementations, dependents, and indexed regex over content. Reach for it whenever the user asks "where is X defined", "what calls Y", "what implements Z", "what's the shape of this file", or whenever you're about to grep or open files to learn structure.

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

QuestionMCP toolCLI
"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—
Show full SKILL.md (106 more words)Show less

Examples

text
code { mode: "symbols", name: "MapCache" }
→ src/mcp/mod.rs:79:1 MapCache (struct)
  src/mcp/mod.rs:88:1 MapCache (impl)

code { mode: "references", name: "process_file" }
→ src/scanner.rs:142:9 process_file
  src/scanner.rs:201:13 process_file

code { mode: "outline", path: "src/mcp/tools.rs" }
→ 21 code router (function)
  112 code helper (function)

Notes

  • Matching on symbol names is substring: code mode references with name: "bar" matches Foo::bar() and bar() alike. There is no scope resolution — cross-check with code mode outline when disambiguation matters.
  • Lists are capped (limit, default 100, max 1000). Index scanners use scan_cap = limit * 8 to bound work on common names.
  • Needs an index in the machine-global cache (Linux ~/.local/share/basemind/, macOS ~/Library/Application Support/basemind/; override BASEMIND_DATA_HOME) — run basemind scan first (see the basemind-scan skill). "No indexed files" means the scan hasn't run in this repo yet.

For git history / blame / diffs see basemind-git-history; for document RAG and semantic search see basemind-documents; for agent coordination see basemind-comms.

© Goldziher, 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/basemind-code-search of Goldziher/basemind.

Open the folder on GitHubat commit 2f6da31

Compare with similar skills

Basemind Code Search 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.

Basemind Code Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Basemind Code Search this skillGoldziher/basemind106—~1.3kAutomated safety check: PassMIT
tilth Code Reading CLIjahala/tilth352—~1.1kAutomated safety check: PassMIT
trace-mcp Code Navigationnikolai-vysotskyi/trace-mcp186—~1.6kAutomated safety check: NotesMIT
Codegraph Detection Partneritechmeat/open-second-brain430—~1.6kAutomated safety check: PassMIT
Smart Explore Code Searchthedotmack/claude-mem98k—~2.3kAutomated safety check: PassApache-2.0
Codebase SearchHelweg/open-codebase-index217—~1.3kAutomated safety check: PassMIT

Similar skills

  • Replaces grep, cat, find and ls with the tilth CLI, which returns AST-aware outlines, definitions, usages and callers across many languages in one call.

    352 GitHub stars~1.1k tokensUpdated 11 days ago
    DevelopmentAuto-check passed
  • 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
  • Codegraph Detection Partner

    itechmeat/open-second-brain

    Teaches the agent to detect whether the codegraph symbol graph is available and use it for callers, callees and impact questions, without installing or writing anything for it.

    430 GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Smart Explore Code Search

    thedotmack/claude-mem

    Explores code structure with tree-sitter AST search tools, getting a ranked symbol map and file outlines before reading full source, to save tokens.

    98k GitHub stars~2.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • 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 yesterday
    Agent WorkflowsAuto-check passed
  • Codebase Search Workflow

    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.

    217 GitHub stars~822 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from Goldziher/basemind

All 10 skills in this repo
  • Basemind Usage Stats

    Goldziher/basemind

    Shows a markdown dashboard of basemind activity in the session: tool call counts, top operations and estimated tokens saved against a grep and Read baseline.

    106 GitHub stars~558 tokensUpdated today
    Auto-check passed
  • 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
    Auto-check passed
  • 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
    Auto-check: warnings
  • Drives the basemind code-intelligence tool from the command line for symbol search, callers, git history and blame, document search and web crawling, sharing its cache with the MCP server.

    106 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Basemind Doctor

    Goldziher/basemind

    Diagnose and recover basemind when it isn't working — MCP tools missing or erroring, "no index" / "no indexed files", empty results that shouldn't be empty, or the MCP server seems dead.

    106 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Basemind Documents

    Goldziher/basemind

    Semantic + full-text search over documents and the web via basemind's RAG store — PDFs, Office, HTML, email, images (OCR), plus scraped/crawled web pages, with cross-encoder reranking, keyword and…

    106 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Basemind Code Search

What does Basemind Code Search do?

Answers where code is defined, who calls it and what shape a file has from a pre-built index, returning paths and line numbers instead of file contents. Basemind pre-indexes a repository into a tree-sitter code map covering 300+ languages, so structural questions resolve from the index and return paths, line numbers and signatures rather than file bodies. The skill makes it the default: when a question is about where something lives, what calls it, what implements it or what shape a file has, the agent reaches for a basemind tool before grep, ripgrep or opening files.

When should I use Basemind Code Search?

Basemind Code Search fits situations like: finding where a function or type is defined in a large repo; listing the callers or implementations of a symbol; getting a file outline before deciding what to read.

How do I install Basemind Code Search in Claude Code?

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

How do I install Basemind Code Search in Codex?

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

Can I use Basemind Code Search 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 Goldziher/basemind --skill basemind-code-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/basemind-code-search, .gemini/skills/basemind-code-search, .github/skills/basemind-code-search and .opencode/skills/basemind-code-search in your project.

What does Basemind Code Search need to run?

SKILL.md names no scripts, command-line tools or credentials: Basemind Code Search is instructions for the agent only. Our summary lists: The basemind MCP server or CLI with the repository indexed.

Does Basemind Code Search 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 Basemind Code Search 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 Basemind Code Search use?

Basemind Code Search 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 Basemind Code Search use?

About 1.3k tokens (SKILL.md is roughly 5k 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 Basemind Code Search?

Skills that share tags, products or a category with Basemind Code Search: tilth Code Reading CLI (jahala/tilth, 352 stars), trace-mcp Code Navigation (nikolai-vysotskyi/trace-mcp, 186 stars), Codegraph Detection Partner (itechmeat/open-second-brain, 430 stars) and Smart Explore Code Search (thedotmack/claude-mem, 98k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Basemind Code Search?

Goldziher (a GitHub user) maintains it in Goldziher/basemind, which has 106 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 8, 2026.

Source: Goldziher/basemind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.