basemind-cli

A command-line tool for exploring codebases, Git history, documents, and web-crawled content through a shared search index and cache. It can find symbols, references, callers, dependencies, diffs, and text across many file types.

In plain words
What is it for?
Use it in scripts or CI to inspect code structure, search symbols and documents, trace callers, review Git history and changes, crawl web pages, store shared memory, and manage the index cache.
Why use it?
It makes repeated or automated codebase research practical in scripts, continuous-integration jobs, and other non-interactive environments. Shared caches can avoid rebuilding the same indexes for separate sessions.

Skill for Claude CodeCodex

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

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,052 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.00066 $0.02052
Opus 5 $0.00033 $0.01026
Sonnet 5 $0.00013 $0.00410
Haiku 4.5 $0.00007 $0.00205

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

Security

Grade A, and why

basemind-cli 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 3d 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-cli/SKILL.md · 168 lines

How it starts

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

basemind CLI — the scriptable interface

basemind has two equally-weighted surfaces: MCP (interactive tool calls) and CLI (scriptable commands). They share the same machine-global cache (Linux ~/.local/share/basemind/, macOS ~/Library/Application Support/basemind/; override BASEMIND_DATA_HOME) and are safe to run alongside each other. Reach for the CLI when you're scripting, batching queries, running in headless environments, or CI.

Capabilities

  • Code map across 300+ languages — tree-sitter outlines, symbol search, references, callers, call graphs, implementations, dependents.
  • Full-text + symbol search — indexed regex over content and substring symbol lookup.
  • Git intelligence — history, blame, and structural diffs at symbol resolution, plus churn.
  • Document RAG over 90+ file formats — PDFs, Office, HTML, email, images (OCR) → semantic search.
  • Shared memory — per-repo, scope-keyed key-value + semantic memory across sessions.
  • Web crawl — scrape / follow-link crawl into the searchable document store.
  • Cache management — stats, garbage collection, selective and full clears.

When to reach for it

  • Running in headless environments or CI pipelines.
  • Batching multiple queries without interactive delays.
  • Integrating basemind into shell scripts or non-MCP tooling.
  • Controlling tool routing explicitly (no agent routing decisions).
  • Clearing caches destructively (only the CLI allows --component all).

basemind first, shell/grep/git fallback. Prefer basemind code / graph over reading files, over grep/rg, and over naked git: use it for code parsing (outlines, references, callers), git history / blame / diffs (basemind git), document extraction / RAG / keyword + entity (NER) / summary (basemind memory documents), and web scraping / crawling / sitemaps (basemind web scrape / crawl / map). Drop to raw shell, grep, or git only when no basemind command covers the question.

Command routing (copy this into your mental model)

Read the full file on GitHub · 168 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. 3d ago First seen · 168 lines · 66 tokens per session scan A 630926dcf240

Subscribe to this mod's changes

basemind-cli is a skill published in the GitHub repository Goldziher/basemind (91 stars, last pushed 7d ago), licensed MIT. It adds 66 tokens to every session and 2,052 once invoked, about $0.0003 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

sem

Use sem to get entity-level (function/class/method) semantic diffs, impact analysis, blame, and dependency context from any Git repo. Trigger this skill whenever the user asks what changed in a commit or PR, wants to understand the blast radius of a change, needs to know who last modified a function, wants to trace…

Ataraxy-Labs/sem · 112 tokens

octocode-benchmark

Use when planning, running, grading, or reporting the by-hand Octocode research benchmark — pairwise matchups (Octocode anchor vs one baseline: gh+RTK, gh+Headroom, or plain gh) over markdown questions, with a fresh isolated runner agent per (question, arm, pass), one blind judge per question grading two answers X/Y…

bgauryy/octocode · 117 tokens

x-ray

Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase.

bartolli/codanna · 25 tokens

roam

Codebase comprehension via roam-code CLI. Use when exploring codebases, planning modifications, debugging failures, assessing PR risk, or checking architecture health. Triggers on: understanding project structure, pre-change safety checks, finding symbols/files, blast radius analysis, affected tests, health scoring…

Cranot/roam-code · 86 tokens

octocode-roast

Use when code needs a blunt evidence-backed roast or memorable critique: smell inventory, debt ranking, hot-path autopsy, savage/diff review, security or performance sins, or practical redemption paths. Phrases like roast this, brutal review, top sins, cleanup debt. Polite evidence-first PR review → octocode-research.

bgauryy/octocode · 71 tokens

lsp-format-code

Format a file or selection using the language server's formatter. Use before committing to apply consistent style, or after generating code to clean up indentation and spacing. Supports full-file and range-based formatting.

blackwell-systems/agent-lsp · 44 tokens