second-brain

second-brain is a skill for Claude Code from grburgess/mindgap. It costs 0 tokens per session (964 once invoked), scanned C, original, MIT.

A graph-based note and research system that finds related ideas across stored knowledge. It can expand a topic through nearby connections, identify areas to learn, and suggest possible links between notes.

In plain words
What is it for?
Use it to enrich research with connected notes, choose what to study next, or review and add well-supported links between ideas.
Why use it?
It helps uncover useful relationships and gaps that a simple keyword search may miss.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions AGENTS.md.

Part of the mindgap plugin — 13 skills shipped together

Good fit Use it to enrich research with connected notes, choose what to study next, or review and add well-supported links between ideas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grburgess/mindgap/second-brain
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.

Any agent
npx skills add grburgess/mindgap --skill second-brain
Clone the repo
git clone --depth 1 https://github.com/grburgess/mindgap

Made for: Claude Code.

Or install mindgap, the plugin that ships this one along with the rest of its 13 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 second-brain

README.md
[![agentmods](https://agentmods.dev/badge/skills/grburgess/mindgap/second-brain/github.svg)](https://agentmods.dev/skills/grburgess/mindgap/second-brain)
Your own site
<a href="https://agentmods.dev/skills/grburgess/mindgap/second-brain"><img src="https://agentmods.dev/badge/skills/grburgess/mindgap/second-brain/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 second-brain

Your own site · 80×15
<a href="https://agentmods.dev/skills/grburgess/mindgap/second-brain"><img src="https://agentmods.dev/badge/skills/grburgess/mindgap/second-brain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 964 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00000 $0.00964
Opus 5.5 $0.00000 $0.00386
Sonnet 5.5 $0.00000 $0.00193
Haiku 4.5 $0.00000 $0.00096

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

Security

Grade C, and why

second-brain scanned grade C with 1 finding 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 23d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- The loop-system ledger this skill reads lives at $MINDGAP_HOME/learning/loop-system/. This skill owns no ledger of its own. -->
mindgap-plugin/skills/second-brain/SKILL.md · 76 lines

How it starts

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

second-brain

The loop-system memory discipline — layered retrieve → work → distill — decoupled from loop machinery, for one-shot tasks. The graph (mindgap) is the hub; every substantive task starts by pulling what's already known and ends by paying its learnings back. The returns compound. All graph writes obey the ingest protocol in AGENTS.md — read it before writing.

Dispatch — do this first

  • Inside a loop-system or meta-trainer session → stop. Their RESUME/SESSION END already run this discipline; doubling it corrupts the loop's memory bookkeeping.
  • Task needs multi-session persistent state or a measurable done-gate → hand off to loop-system. Never imitate loop machinery. No per-task state files, ever — a task that seems to need one is a loop wearing a disguise.
  • Mining asked for directly ("find connections", "what next to learn", "enrich X from my notes") → references/mining.md, skip the cycle.
  • Otherwise run the cycle: RETRIEVE → WORK → UPDATE.

Stores — ~/second_brain/ (visible) + the graph (hidden)

~/second_brain/
  inbox/   drop zone — inbox-to-mindmap's default target; swept at UPDATE
  raw/     immutable archive — ingest MOVES files here (YYYY/topic/);
           source nodes carry url → the archived path
  ctx/     reusable prompts/templates/rules, each indexed by a graph node

Scaffold missing dirs on first use (mkdir -p). The DB stays in ~/.mindgap/ and is never touched by hand. Deliverables do NOT get an output/ dir — they stay in their repos; the graph indexes them (see UPDATE).

RETRIEVE (task start) — protocol: references/retrieval.md

Five layers, top-down: global learnings → project ledger → task-adjacent loop STATEs → graph (mine enrich) → ctx/. Context diet throughout: inline what is relevant, never everything. Bump used:/last: on any global row that informs a decision.

Read the full file on GitHub · 76 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 23d ago Changed · -3 lines 04975227c5d4
  2. 2mo ago Changed · +43 lines scan A → C 4e4fd399e235
  3. 2mo ago First seen · 36 lines · 0 tokens per session scan A 78901ff69717

Subscribe to this mod's changes

second-brain is a skill published in the GitHub repository grburgess/mindgap (0 stars, last pushed 23d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 964 tokens. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

second-brain compared with skills from other repositories

second-brain next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
second-braingrburgess/mindgapSkill023d agoMITC0Claude Code
knowledge-ingestopenclaw/openclawSkill394kyesterdayMITA80Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill68k2d agoApache-2.0A217Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill71k2d agoCC0-1.0A74Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill20kyesterdayMITA184Claude Code
memoryopensquilla/opensquillaSkill7.1k6d agoApache-2.0A44Claude Code, Codex
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex