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 agentmods add instructions/henrydaum/second-brain/claude-mdgit clone --depth 1 https://github.com/henrydaum/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/instructions/henrydaum/second-brain/claude-md)<a href="https://agentmods.dev/instructions/henrydaum/second-brain/claude-md"><img src="https://agentmods.dev/badge/instructions/henrydaum/second-brain/claude-md.svg" alt="Measured on agentmods" 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 | $0.43863 | $0.43863 |
| Opus 5 | $0.21931 | $0.21931 |
| Sonnet 5 | $0.08773 | $0.08773 |
| Haiku 4.5 | $0.04386 | $0.04386 |
Grade C, and why
second-brain CLAUDE.md scanned grade C with 3 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
prefixes `git push && rm -rf /`; the line is decomposed with a real lexer Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
`subprocess.TimeoutExpired`, `urllib.error.*`); `kernel.py` has been brought to Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
`subprocess.TimeoutExpired`, `urllib.error.*`); `kernel.py` has been brought to How it starts
The opening of the file, as written. The whole thing — 2,906 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Second Brain — Architecture Notes
Local-first AI kernel with SQLite persistence, a REPL frontend, package install/uninstall, and live plugin loading. Python / SQLite. Solo dev (Henry). The Flet GUI was removed; do not reintroduce.
This file is the deep architecture map for changing the kernel. It is not the
authoring contract for sandbox code. Before writing a script or extension,
read docs/SDK.md and the matching executable template in templates/; use
the code pointers there for the specific subsystem. For permission questions,
start with docs/PERMISSIONS_MAP.md. Current code wins over historical notes
in this file when they disagree.
⚡ THE KERNEL (READ FIRST)
Second Brain is a microkernel: a minimal, reliable core that boots, runs the conversation loop + agent turn, persists conversations, and loads/unloads plugins. Product capabilities arrive through a package store: a registry you browse, install, and uninstall from. Do not bake heavy features into the kernel; they belong in packages.
Goal in priority order: (1) the kernel works flawlessly and reliably, then (2) build install/uninstall against a cloud store, then (3) versioning and possibly containerization. We are at the end of step (1).
The layout (trees.py)
Two facts decide where any piece of extension code lives, and both are declared
in one table at the repo root, beside paths.py.
Who finds it. A root whose files carry a prefix is scanned — something
globs f"{prefix}*.py" and indexes what it finds. A root with no prefix is only
ever reached by something naming the file. Eight roots:
| Root | Prefix | Found by |
|---|---|---|
tools/ tasks/ services/ commands/ frontends/ |
tool_ … |
plugin_discovery |
parsers/ |
parse_ |
parsing.discover() |
llm/ |
llm_ |
llm.discover() |
scripts/ |
— | script.run / isolation.is_script |
Who put it here. Four trees holding the same eight roots: bundled/ (ships
with the app), DATA_DIR/installed (the store's), DATA_DIR/workspace (the
agent's), and origin/store itself, which is the same shape reached over git.
Discovery precedence is bundled → installed → workspace and first match
wins; resolution by filename (isolation.resolve_script) deliberately runs
the other way, because there the agent means the file it wrote.
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.
- 3d ago First seen · 2,906 lines · 43,863 tokens per session scan C f8e719e1781e
second-brain CLAUDE.md is an instructions file published in the GitHub repository henrydaum/second-brain (619 stars, last pushed 4d ago), licensed MIT. It adds 43,863 tokens to every session, about $0.2193 per session on Opus 5. A static security scan graded it C with 3 findings (recursive force delete, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
neuron-ai CLAUDE.md
Claude Code instructions for neuron-core/neuron-ai, covering project overview, code standards, think before coding, simplicity first and surgical changes.
Zettelgarden CLAUDE.md
Instructions for Zettelgarden/Zettelgarden, covering claude.md, project overview, development commands, frontend (zettelkasten-front/) and backend (go-backend/).
expense-budget-tracker AGENTS.md
Instructions for kirill-markin/expense-budget-tracker, covering expense-budget-tracker, rules, components, supported clients and key paths.
datavault4dbt-agent-skills CLAUDE.md
Instructions for ScalefreeCOM/datavault4dbt-agent-skills, covering datavault4dbt agent skills — repository guide, what a skill is, skill requirements, writing good datavault4dbt skills and handling external content.
ChatbotX copilot-instructions.md
Copilot instructions for ChatbotXIO/ChatbotX, covering chatbotx repository instructions, project context, required workflow, critical project invariants and rule index.
markdown-site AGENTS.md
Instructions for waynesutton/markdown-site, covering agents.md, project overview, default and legacy modes, current status and tech stack.