basemind-scan

basemind-scan is a skill for Claude Code, Codex from Goldziher/basemind. It costs 75 tokens per session (867 once invoked), scanned A, original, MIT.

A command-line procedure for building or refreshing basemind's searchable index of a repository. The index is the stored map basemind uses to answer questions about project files and code.

In plain words
What is it for?
Use it after seeing a missing-index error, when search results are unexpectedly empty, when the basemind server is unavailable, or after substantial repository changes.
Why use it?
It restores search when no index exists and updates results after large changes or when the existing index is outdated.

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-scan
Any agent
npx skills add Goldziher/basemind --skill basemind-scan
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-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldziher/basemind/basemind-scan.svg)](https://agentmods.dev/skills/goldziher/basemind/basemind-scan)
Your own site
<a href="https://agentmods.dev/skills/goldziher/basemind/basemind-scan"><img src="https://agentmods.dev/badge/skills/goldziher/basemind/basemind-scan.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 867 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.1 $0.00075 $0.00867
Opus 5 $0.00037 $0.00434
Sonnet 5 $0.00015 $0.00173
Haiku 4.5 $0.00007 $0.00087

Measured yesterday against content hash 46ea9ae9089e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

basemind-scan 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 yesterday.

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-scan/SKILL.md · 64 lines

How it starts

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

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:

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=1 in the environment that launches basemind: 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 is 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.
  • 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.

Read the full file on GitHub · 64 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. yesterday Changed · +3 lines 46ea9ae9089e
  2. 6d ago First seen · 61 lines · 75 tokens per session scan A 266bfb3372ee

Subscribe to this mod's changes

basemind-scan is a skill published in the GitHub repository Goldziher/basemind (98 stars, last pushed 4d ago), licensed MIT. It adds 75 tokens to every session and 867 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

projectatlas

Use ProjectAtlas as the atlas-first orientation layer before broad source reads, with MCP-first task startup, short-alias worktree registration and routing, safe targeted initialization, ranked navigation, exact or federated graph evidence, purpose curation, health, lint, and repository-wide token reporting.

styler-ai/ProjectAtlas · 60 tokens

codex-coding-plugin

Build, review, or fix ProjectAtlas plugin/runtime installer integration for Codex, Claude Code, and OpenCode, especially version convergence, stale ProjectAtlas cache repair, MCP config generation, skill artifacts, host smoke tests, and fake-host tests for ProjectAtlas releases.

styler-ai/ProjectAtlas · 59 tokens

research

Performs deep research on a topic via deepresearch. Simulates a multi-step research process and returns a comprehensive research result as a string.

study8677/repobrain · 32 tokens

lsp-refactor

End-to-end safe refactor workflow — blast-radius analysis, speculative preview, apply to disk, verify build, run affected tests. Inlines lsp-impact + lsp-safe-edit + lsp-verify + lsp-test-correlation into one coordinated sequence.

blackwell-systems/agent-lsp · 57 tokens

lsp-architecture

Generate a structural architecture overview of a codebase: languages, package map, entry points, dependency graph, and hotspots. One call for the big picture.

blackwell-systems/agent-lsp · 0 tokens

lsp-explore

Tell me about this symbol": hover + implementations + call hierarchy + references in one pass — for navigating unfamiliar code.

blackwell-systems/agent-lsp · 0 tokens