Agent skill

Basemind Index Scan

by Goldziher in 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.

MITAuto-check: warningsAgent Workflows

Install Basemind Index Scan

The automated check flagged lines worth reading first. See the safety section below.

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

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

GitHub CLI
$ gh skill install Goldziher/basemind basemind-scan --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-scan .claude/skills/basemind-scan && 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-scan
GitHub stars
108
Token cost
~997 tokens
SKILL.md length
503 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 3 steps: basemind on PATH. → The plugin-managed binary the MCP… → A dev build: cargo build --release then…
  • Basemind or the statusline reports no index for the repository
  • SKILL.md covers When to use, How to run and Notes
  • Calls cargo; needs BASEMIND_ALLOW_REPO_CREDENTIALS

What it does

Basemind answers code-map questions from an index kept in a machine-wide cache, keyed by workspace, and basemind scan is the command that builds it. This skill runs that scan through the CLI, so it still works when the MCP server (basemind serve) is down. From the repository root it does a full working-tree scan, or you can give a path to scope it incrementally.

The binary is looked up on PATH first, then in the plugin's cache folder, then from a local cargo build. The scan writes outside the repository, takes seconds for small repos and about 22 s for a large TypeScript monorepo, and skips files it cannot extract. A running server holds the store lock, so the CLI scan fails in that case and the MCP rescan mode is used instead. Extra directories can be indexed through scan.extra_roots in basemind.toml, but only with the BASEMIND_ALLOW_EXTRA_ROOTS opt-in.

When your agent uses it

  • Basemind or the statusline reports no index for the repository
  • An MCP tool returns no indexed files when results should exist
  • The index is stale after large changes and needs a full rebuild

Example prompts

  • “Basemind says there is no index for this repo. Build one.”
  • “Rescan only the packages directory after that big merge.”
  • “The basemind MCP server is not running, so run the scan from the CLI.”

Requirements

  • The basemind binary
  • Write access to the machine-wide basemind cache

Workflow steps

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

  1. basemind on PATH.
  2. The plugin-managed binary the MCP launcher caches
  3. A dev build: cargo build --release then ./target/release/basemind scan.

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

    Shell commands in SKILL.md call:

    • cargo

    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 these keys or tokens, usually read from environment variables:

    • BASEMIND_ALLOW_REPO_CREDENTIALS

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

Context cost

Basemind Index Scan loads about 997 tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 503 words of instructions outside code blocks.

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

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: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:56
    redential directories (`.ssh`, `.aws`, `.gnupg`, `/etc`) are
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:62
    key files (`.env*`, `.aws/`, `.ssh/`, `.npmrc`, `*.pem`, `*.key`, ...) are never
  • NoteMentions a .env fileSKILL.md:63
    can] floor_allow` opts a class back in (`.env.*` also matches `.env.example`), but a

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). 503 words, ~997 tokens.

Download SKILL.mdSave it as .claude/skills/basemind-scan/SKILL.md (or your agent's skills folder).
name
basemind-scan
description
Build or refresh the basemind index by running `basemind scan` via the CLI. Use this when basemind reports "no index" / "no indexed files", when the MCP server isn't available, or after large changes when the index is stale. Works without the MCP server — it shells the basemind binary directly.

basemind-scan — build or refresh the index (no MCP server required)

basemind answers code-map questions from an index in a machine-global cache (Linux ~/.local/share/basemind/, macOS ~/Library/Application Support/basemind/; override BASEMIND_DATA_HOME), keyed by workspace. That index is built by basemind scan. This skill runs the scan via the CLI, so it works even when the MCP server (basemind serve) is not running — which is exactly the situation when basemind reports "no index" or "no indexed files", or when MCP tools aren't loaded in the session.

When to use

  • basemind / the statusline reports no index for this repo.
  • An MCP tool returns "no indexed files" or empty results that should not be empty.
  • The MCP server isn't running or isn't reachable, and you need the code map.
  • The index is stale after large changes and you want a full rebuild.

How to run

From the repository root:

sh
basemind scan            # full working-tree scan
basemind scan <path>     # scope to a path (incremental)

Finding the binary (in order of preference):

  1. basemind on PATH.
  2. The plugin-managed binary the MCP launcher caches: ${XDG_CACHE_HOME:-~/.cache}/basemind/bin/<version>/basemind.
  3. A dev build: cargo build --release then ./target/release/basemind scan.

Notes

  • The scan writes the content-addressed blob store + Fjall inverted index into the machine-global cache (never inside the repo). Seconds for small repos; ~22 s for an ~80k-file TypeScript monorepo.
  • Files tree-sitter doesn't recognize as code go through the document tier; anything that isn't an extractable document (e.g. an exotic source file) is skipped, not counted as a failure.
  • If a basemind serve MCP server is already running for this repo it holds the store lock, so a CLI scan will fail with a lock error. Use admin { mode: "rescan" } over MCP (it re-indexes in-process) instead, or stop the server first.
  • Indexing directories outside the repo — set scan.extra_roots in the repo-root basemind.toml to a list of absolute paths (e.g. a Bazel external repo cache) to index them alongside the repo. This needs BASEMIND_ALLOW_EXTRA_ROOTS in the environment that launches basemind (1, or a :-separated list of absolute workspace roots to grant only those): the config file lives inside the repository, so without that operator opt-in the entries are ignored with a warning. A filesystem or volume root and credential directories (.ssh, .aws, .gnupg, /etc) are refused either way. Their files are keyed by absolute path (so results for them are absolute, not repo-relative) and are (re-)indexed on a full scan only — the live watcher does not track them. Git tools (blame) don't apply to external files; the code map (symbols / references / outlines) and document search do.
  • Credential and key files (.env*, .aws/, .ssh/, .npmrc, *.pem, *.key, ...) are never indexed. [scan] floor_allow opts a class back in (.env.* also matches .env.example), but a credential entry needs BASEMIND_ALLOW_REPO_CREDENTIALS in the environment that launches basemind — a repository's own file cannot un-exclude your secrets. [languages.<grammar>] re-maps or disables a misdetected grammar.
  • After a successful scan, both the MCP tools and basemind code … have a fresh index.
  • The CLI shares the exact same machine-global cache as the MCP server — see the basemind-cli skill for the full query surface, or basemind-code-search / basemind-git-history / basemind-documents for the per-capability workflows.

© 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-scan of Goldziher/basemind.

Open the folder on GitHubat commit 2f6da31

Compare with similar skills

Basemind Index Scan 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 Index Scan compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Basemind Index Scan this skillGoldziher/basemind108—~997Automated safety check: WarnMIT
Codebase SearchHelweg/open-codebase-index216—~1.3kAutomated safety check: PassMIT
Codebase Search WorkflowHelweg/open-codebase-index216—~822Automated safety check: PassMIT
trace-mcp Code Navigationnikolai-vysotskyi/trace-mcp188—~1.6kAutomated safety check: NotesMIT
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

  • 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.

    216 GitHub stars~1.3k tokensUpdated today
    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.

    216 GitHub stars~822 tokensUpdated today
    Agent WorkflowsAuto-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.

    188 GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check: notes
  • 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.

    481 GitHub stars~1k tokensUpdated 2 days ago
    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.

    108 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.

    108 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • 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.

    108 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Basemind Code Search

    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.

    108 GitHub stars~1.3k 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.

    108 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…

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

Questions about Basemind Index Scan

What does Basemind Index Scan do?

Builds or refreshes the basemind code index from the command line, for when basemind reports no index or its MCP server is not running. Basemind answers code-map questions from an index kept in a machine-wide cache, keyed by workspace, and basemind scan is the command that builds it. This skill runs that scan through the CLI, so it still works when the MCP server (basemind serve) is down.

When should I use Basemind Index Scan?

Basemind Index Scan fits situations like: basemind or the statusline reports no index for the repository; an MCP tool returns no indexed files when results should exist; the index is stale after large changes and needs a full rebuild.

How do I install Basemind Index Scan in Claude Code?

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

How do I install Basemind Index Scan in Codex?

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

Can I use Basemind Index Scan 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-scan -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-scan, .gemini/skills/basemind-scan, .github/skills/basemind-scan and .opencode/skills/basemind-scan in your project.

What does Basemind Index Scan need to run?

Going by SKILL.md and its folder, Basemind Index Scan needs the command-line tools its instructions call (cargo) and credentials named BASEMIND_ALLOW_REPO_CREDENTIALS. Our summary lists: The basemind binary; Write access to the machine-wide basemind cache.

Does Basemind Index Scan 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 Index Scan safe to install?

Our automated static check of SKILL.md flagged 2 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Basemind Index Scan use?

Basemind Index Scan 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 Index Scan use?

About 997 tokens (SKILL.md is roughly 4k 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 Index Scan?

Skills that share tags, products or a category with Basemind Index Scan: Codebase Search (Helweg/open-codebase-index, 216 stars), Codebase Search Workflow (Helweg/open-codebase-index, 216 stars), trace-mcp Code Navigation (nikolai-vysotskyi/trace-mcp, 188 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 Basemind Index Scan?

Goldziher (a GitHub user) maintains it in Goldziher/basemind, which has 108 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.