brain

brain is a skill for Claude Code, Codex from tonydzi/second-brain-starter-kit. It costs 77 tokens per session (764 once invoked), scanned A, original, MIT.

A read-only health check for a local second-brain system: a collection of search, indexing, session-memory, and nightly-processing tools.

In plain words
What is it for?
Use it to inspect the system's status, view green, warning, or red checks, and create an HTML dashboard with the results.
Why use it?
It makes silent failures visible by checking whether search is running, indexes are fresh, memory records are being added, and scheduled processing has run.

Skill for Claude CodeCodex

Part of the second-brain-skills plugin — 57 skills 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/tonydzi/second-brain-starter-kit/brain
Any agent
npx skills add tonydzi/second-brain-starter-kit --skill brain
Clone the repo
git clone --depth 1 https://github.com/tonydzi/second-brain-starter-kit

Made for: Claude Code, Codex.

Or install second-brain-skills, the plugin that ships this one along with the rest of its 57 skills.

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 brain

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/brain.svg)](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/brain)
Your own site
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/brain"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/brain.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 764 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.00077 $0.00764
Opus 5 $0.00039 $0.00382
Sonnet 5 $0.00015 $0.00153
Haiku 4.5 $0.00008 $0.00076

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

Security

Grade A, and why

brain 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.

skills/brain/SKILL.md · 49 lines

How it starts

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

/brain — second-brain health at one glance

🧒 When reporting to a non-technical operator, end with a short plain-words recap (rule eli5-always).

Catches SILENT breakage of the memory/RAG stack (the things that kept breaking month after month: the reindex, the local search server, the memory pilot). Read-only, 0 tokens.

What it does (one script)

python $IMPORTS_ROOT/brain_health.py

Checks 5 things and colors them 🟢/🟡/🔴:

  1. Search server on its local port — alive or not (if it's down, auto-recall silently disappears); also shows whether the graph-assisted mode is on.
  2. Index _brain_e5.npy — how fresh (🟡 if the reindex lags >48h).
  3. TurnState ledger — how many turns recorded (memory Phase 1), when the last one was.
  4. Nightly distillation — candidates in quarantine + when the last run happened.
  5. A/B direct-vs-graph recall — how many runs + the operator's verdicts (👍/👎).

Writes a dashboard $OBSIDIAN_VAULT/_Dashboards/Brain-Health.html (the operator reads with their eyes, [[prefer-visual-dashboards]]). Exit code 0/1/2 = ok/warn/red (for scripts).

When to fix (on 🔴/🟡)

  • 🔴 search server down → run the restart script (as admin, see [[always-on-memory-pilot]]); or reboot (the at-logon task brings it up).
  • 🟡 index lagginggpu_check.py [--kill], then brain_embed_update.py [--wait-gpu 10] ([[reindex-routine]]).
  • 🟡 ledger empty → fine if memory Phase 1 was just enabled (it fills from the next sessions on).

What it does NOT do

It doesn't fix anything and doesn't write to the vault. It's a diagnostic. Fixing is a separate explicit step (the "read before you fix" rule, [[verify-existing-before-proposing]]).


About & contact

Built and battle-tested at Palo Alto AI Research Lab — a fleet of Claude Code machines running 24/7 as a second brain and synthetic cofounder. Every skill here survived real production use before publication.

Read the full file on GitHub · 49 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 · 49 lines · 77 tokens per session scan A 13921c8a4ac6

Subscribe to this mod's changes

brain is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (5 stars, last pushed 4d ago), licensed MIT. It adds 77 tokens to every session and 764 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-31.

Related

Other skills, from other repositories

query

Search compiled LLM Wiki pages, synthesize a cited answer, save substantial results, and feed durable gaps back into the Wiki; also responds to /query and 위키 질의.

johnfkoo951/cmds-llm-wiki · 39 tokens

llm-wiki

Use when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management"…

csiddhant796-blip/claude-skills-collection · 112 tokens

wiki-ingest

Ingest supplied source material into an Obsidian vault with provenance and claim tracking: pasted text, files staged in the selected vault's inbox or .raw archive, or explicitly approved URLs. Use for a single source or bounded batch, not for saving an assistant answer. Triggers: ingest, ingest this file, ingest this…

AgriciDaniel/claude-obsidian · 88 tokens

autoresearch

Run a bounded, source-grounded research loop, draft a cited dossier, and optionally propose a separately reviewed canonical vault merge. Use when the user wants autonomous or deep research that may access the public web. Triggers: /autoresearch, autoresearch, research this topic, deep dive into, investigate, find…

AgriciDaniel/claude-obsidian · 80 tokens

canvas

Create, inspect, and update Obsidian JSON Canvas boards with text, file, link, group, and edge nodes. Use for canvas status, canvas lists, visual maps, zones, spatial layouts, adding vault notes or media to a .canvas file, and requests such as create canvas, add to canvas, or put this on the canvas.

AgriciDaniel/claude-obsidian · 72 tokens

wiki-retrieve

Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta…

AgriciDaniel/claude-obsidian · 81 tokens