Borrowing it
Nothing to install: this file belongs to starmynd-org/infinite-brain-os. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/starmynd-org/infinite-brain-os/main/.claude/commands/build-knowledge-base.mdgit clone --depth 1 https://github.com/starmynd-org/infinite-brain-osWrote 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.
[](https://agentmods.dev/commands/starmynd-org/infinite-brain-os/build-knowledge-base)<a href="https://agentmods.dev/commands/starmynd-org/infinite-brain-os/build-knowledge-base"><img src="https://agentmods.dev/badge/commands/starmynd-org/infinite-brain-os/build-knowledge-base/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.
<a href="https://agentmods.dev/commands/starmynd-org/infinite-brain-os/build-knowledge-base"><img src="https://agentmods.dev/badge/commands/starmynd-org/infinite-brain-os/build-knowledge-base.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.01946 |
| Opus 5 | $0.00016 | $0.00973 |
| Sonnet 5 | $0.00006 | $0.00389 |
| Haiku 4.5 | $0.00003 | $0.00195 |
Grade A, and why
build-knowledge-base 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/build-knowledge-base
Launch a real namespace build or migration in plain English.
This command is for cases where an operator wants to say something like:
Build a new namespace called
personal-healthfrom<legacy-root>\legacy-notes\Health, do not migrate the legacy database, and refactor the rest into Infinite Brain style.
The command does not require rigid mode= or exclude= flags. The operator describes the source, the target namespace, and any constraints in normal language. The command then routes that request through the V2 namespace machinery.
When to use this
- Building a brand-new real knowledge namespace under
knowledge/ - Migrating an existing corpus, folder, or PKM subtree into Infinite Brain V2
- Testing whether the current skills, agents, workflows, validator, and doctrine are good enough to convert a real source corpus
- Refactoring semi-structured notes into canon, synthesis, support, and profile-aware structure
When NOT to use this
- You only need a lightweight namespace registry stub. Use
/create-namespace. - The inbound material is still raw intake and should go to root
intake/first. - The work is mostly runtime state, secrets, operational queue data, or databases that do not belong in a knowledge namespace.
- The request is to add or revise one node inside an existing namespace rather than create or migrate the namespace itself.
Operator input style
The operator may describe the job in natural language. The command should extract, from the request, as much of the following as is available:
- source location or source set
- target namespace slug
- target repo
- what to exclude
- what canon expectations matter
- what the namespace should be used for
- any known constraints, sensitivities, or live-truth risks
Do not force the operator into a fixed flag schema when plain-English instructions are sufficient.
What this command does
- Reads the operator request and determines whether this is:
- a born-V2 namespace build, or
- a migration of an existing knowledge corpus into a new namespace.
- Reads the V2 doctrine and operative contract:
AGENTS.mdCLAUDE.md_system/README.md_system/namespace-profiles.mdknowledge/ai-architecture/INDEX.mdknowledge/ai-architecture/canon/core-doctrine.mdknowledge/ai-architecture/canon/problem-to-architecture.md
- Chooses the namespace profile from first principles using
[[skill-build-namespace]]. - Creates or updates the registry entry under
_system/namespaces/. - Scaffolds the namespace with the shared base and profile-additive folders.
- Routes the actual build through
[[skill-build-knowledge-base]]and[[workflow-build-knowledge-base]], which in turn sequence the lower-level V2 machinery:[[skill-build-namespace]]for new namespace scaffolding[[skill-migrate-legacy-knowledge-to-v2]]or[[workflow-legacy-knowledge-migration]]for corpus refactoring[[skill-canonize-namespace]]for compressed canon[[skill-refine-namespace-index]]for the retrieval router
- Atomizes broad source material into digestible nodes before building higher-order summaries, so future agents can ingest the graph selectively rather than only reading a few large notes.
- Preserves provenance in
support/, puts derived interpretation insynthesis/, and keeps canon compressed and agent-usable as the main-ideas layer future agents should ingest first. - Reviews related namespaces for additive node, synthesis, canon, or router updates triggered by the new build.
- Runs
bash _system/validate.shplus[[workflow-namespace-lint-review]]before closing. - Produces a short build or migration report describing:
- chosen profile
- sources used
- major atomization decisions
- canon surfaces created
- synthesis surfaces created
- cross-namespace changes made or deferred
- support receipts created
- validator/lint results
- any open questions or human approval gates
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.
- 9d ago First seen · 169 lines · 32 tokens per session scan A 4bedcde3b613
build-knowledge-base is a command published in the GitHub repository starmynd-org/infinite-brain-os (248 stars, last pushed 13d ago), licensed MIT. It adds 32 tokens to every session and 1,946 once invoked, about $0.0002 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.
Other commands, from other repositories
wiki-init
Initialize a new LLM Wiki in the current directory. Creates the full directory structure, config, and template files.
graphify-sync
Graphify sync is the optional structural-discovery import flow for graph-style project exports. It writes through ./agent-knowledge, but keeps imported graph structure in Evidence/ and Outputs/, not in durable memory.
music-suno-prompt
Grounded Suno prompt synthesis from local knowledge corpus + persona canon + label canon. No vibes-prompting.
build-corpus
Use when the user invokes /goal-flight build-corpus to build or refresh the private Goal Flight dispatch-context corpus.
rag
Semantic memory/RAG search across memories, transcripts, and cross-agent context.
index
Index files or directories into the RAG memory system using Memvid.