bm-init

bm-init is a command for Claude Code from Goldziher/basemind. It costs 68 tokens per session (1,492 once invoked), scanned A, original, MIT.

A setup command for adding Basemind configuration and usage instructions to a repository. Basemind is a context service that provides coding-agent tools such as code search, document retrieval, and Git history.

In plain words
What is it for?
Use it when first enabling Basemind or refreshing its configuration, choosing which capabilities to enable and which personal or shared rules file should contain the instructions.
Why use it?
It gives agents a consistent way to use Basemind in the project and can refresh the setup when enabled capabilities change.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the basemind plugin — 15 skills, 11 commands, 2 hooks shipped together

Good fit Use it when first enabling Basemind or refreshing its configuration, choosing which capabilities to enable and which personal or shared rules file should contain the instructions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/goldziher/basemind/bm-init
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.

Clone the repo
git clone --depth 1 https://github.com/Goldziher/basemind

Made for: Claude Code.

Or install basemind, the plugin that ships this one along with the rest of its 15 skills, 11 commands, 2 hooks.

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 bm-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/goldziher/basemind/bm-init/github.svg)](https://agentmods.dev/commands/goldziher/basemind/bm-init)
Your own site
<a href="https://agentmods.dev/commands/goldziher/basemind/bm-init"><img src="https://agentmods.dev/badge/commands/goldziher/basemind/bm-init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bm-init

Your own site · 80×15
<a href="https://agentmods.dev/commands/goldziher/basemind/bm-init"><img src="https://agentmods.dev/badge/commands/goldziher/basemind/bm-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,492 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00068 $0.01492
Opus 5.5 $0.00027 $0.00597
Sonnet 5.5 $0.00014 $0.00298
Haiku 4.5 $0.00007 $0.00149

Measured 3d ago against content hash 672b3e48d6af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bm-init 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/commands/bm-init.md · 102 lines

How it starts

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

bm-init — onboard basemind into this repo

Run basemind init so the repo has a committed basemind.toml and a rules block that tells every agent to prefer basemind's MCP tools over grep, file reads, and naked git. CLI and slash command share ONE implementation — this just drives basemind init with the right non-interactive flags.

When to use

First time setting up basemind in a repo, or to refresh the rules block after enabling new capabilities (documents/RAG, agent-comms, semantic search). Safe to re-run: it's idempotent.

How to use

  1. Ask which capabilities matter (one short question). The options are: code-search-navigation, code-mapping-architecture, git-history, agent-comms, documents-rag, semantic-search. If the user has no preference, enable all.

  2. Ask where the rules block should go — do NOT assume. Never write a committed CLAUDE.md or AGENTS.md without the user's explicit say-so. Present the choice:

    • CLAUDE.local.md — personal, gitignored (recommended default)
    • AGENTS.local.md — personal, gitignored (for AGENTS-based tools)
    • CLAUDE.md — committed, shared with everyone on the repo
    • AGENTS.md — committed, shared with everyone on the repo
    • none — write no rules

    Exception: if .ai-rulez/config.toml is present, ai-rulez owns governance — write the gitignored .ai-rulez/local/rules/basemind-usage.md instead of asking (never the committed .ai-rulez/rules/basemind-usage.md, and never CLAUDE.md/AGENTS.md).

  3. Ask about auto-approving basemind's MCP tools (one short question). basemind can add one permissions.allow glob entry so Claude Code stops prompting for approval on its own tools. Present the choice:

    • .claude/settings.local.json — personal, gitignored (recommended default)
    • .claude/settings.json — committed, shared with everyone on the repo
    • none — skip this step

Read the full file on GitHub · 102 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 Changed · +8 lines 672b3e48d6af
  2. 13d ago Changed · +22 lines 44bc988783a9
  3. 1mo ago First seen · 72 lines · 68 tokens per session scan A e1e0eaa4ae4c

Subscribe to this mod's changes

bm-init is a command published in the GitHub repository Goldziher/basemind (112 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 1,492 once invoked, about $0.0003 per session on Opus 5.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.