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.
npx skills add jessepinkman9900/claude-second-brain --skill brain-rebuildgit clone --depth 1 https://github.com/jessepinkman9900/claude-second-brainWrote 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/skills/jessepinkman9900/claude-second-brain/brain-rebuild)<a href="https://agentmods.dev/skills/jessepinkman9900/claude-second-brain/brain-rebuild"><img src="https://agentmods.dev/badge/skills/jessepinkman9900/claude-second-brain/brain-rebuild/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/skills/jessepinkman9900/claude-second-brain/brain-rebuild"><img src="https://agentmods.dev/badge/skills/jessepinkman9900/claude-second-brain/brain-rebuild.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.00074 | $0.01278 |
| Opus 5 | $0.00037 | $0.00639 |
| Sonnet 5 | $0.00015 | $0.00256 |
| Haiku 4.5 | $0.00007 | $0.00128 |
Grade A, and why
brain-rebuild 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 11d 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 — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Brain Rebuild
Redesigns the qmd schema based on what the wiki actually contains today, then rebuilds the index from scratch. Destructive — wipes existing collections/contexts and their embeddings. Always get explicit user approval before applying changes.
When to Use
- The wiki has grown and the current single
wikicollection no longer matches how the user searches - The user wants finer-grained contexts (e.g. distinct context descriptions per sub-folder)
- After significant reorganization of
wiki/orraw-sources/folder structure - Never as a routine refresh — for that, use
/brain-refresh
Procedure
All commands run from the vault root.
Step 1 — Survey the current state
- Read
scripts/qmd/setup.tsto see the current collections and contexts - Read
CLAUDE.mdto understand the documented schema and any references to collection names - List current state from qmd:
INDEX_PATH=.qmd/index.sqlite pnpm dlx @tobilu/qmd collection list INDEX_PATH=.qmd/index.sqlite pnpm dlx @tobilu/qmd context list INDEX_PATH=.qmd/index.sqlite pnpm dlx @tobilu/qmd status
Step 2 — Analyze the wiki
- Glob
wiki/**/*.mdandraw-sources/**/*.md - Read enough pages (especially
wiki/index.mdandwiki/overview.md) to understand actual topic clusters, page-type distribution, and folder structure - Identify natural groupings: by domain (e.g. ml, distributed-systems, finance), by page type (topics vs entities vs qa), by source provenance, etc.
Step 3 — Propose a new schema
Produce a recommendation that includes:
- Collections — name, root path (relative to vault), file glob pattern. Justify each split.
- Contexts — global context, plus per-collection and per-subpath context descriptions. Each context should be a one-sentence description that helps a future search disambiguate between similar pages.
- Migration impact — what changes for
/brain-ingest,/brain-search,/lint, andCLAUDE.md(e.g. if collection namewikibecomeswiki-topics, all-c wikiinvocations break)
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.
- 11d ago First seen · 120 lines · 74 tokens per session scan A e0214740257f
brain-rebuild is a skill published in the GitHub repository jessepinkman9900/claude-second-brain (47 stars, last pushed 4mo ago), licensed MIT. It adds 74 tokens to every session and 1,278 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.
Other skills, from other repositories
karpathy-llm-wiki
Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.
kmd-ingest
The write protocol for a markdown knowledge base (Obsidian-compatible, the LLM-wiki pattern) — personal or shared. Use for EVERY write into the KB — distilling a new or scraped source, promoting a finished artifact/report/lesson into the KB, filing a durable learning, insight, or query answer, or correcting/updating…
loredex-curate
Write a Start-Here brief for a project or a recent session's findings, and flag stale/duplicate/orphaned notes. Use when the user says "curate my dex/research", "where do I start", "make sense of this project", or just finished a session that produced several markdown files and wants a handoff.
loredex-mcp
Set up or explain the loredex MCP server — live dex access (search, read, handoffs, product state, safe writes) for any MCP-compatible agent. Use when the user wants agents to query the dex mid-task, asks to "connect the dex to Cursor/Codex/an agent", or asks what the loredex MCP tools do.
loredex-init
Set up loredex for the current project — creates/registers the dex and writes AGENTS.md/CLAUDE.md/.cursor rule conventions. Use when the user says "set up loredex", "init loredex", or wants to start tracking this project's research in a dex.
loredex-route
Process the dex's inbox/ plus any new frontmattered files in the current project right now. Use when the user says "route my findings", "file what's pending", or wants a routing pass forced immediately instead of waiting for the automatic Stop hook.