brain-search

brain-search is a skill for Claude Code from jessepinkman9900/claude-second-brain. It costs 63 tokens per session (583 once invoked), scanned A, original, MIT.

A search procedure for answering questions from a personal wiki. It uses meaning-based search, reads the most relevant pages, and writes an answer with links back to those pages.

In plain words
What is it for?
Searching the wiki, checking its index, reading relevant notes, synthesizing an answer with inline citations, and optionally saving that answer as a permanent question-and-answer page.
Why use it?
It reduces the need to manually browse many notes and makes the answer traceable to the source pages. It also requires gaps or weak coverage to be stated instead of filled with guesses.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Searching the wiki, checking its index, reading relevant notes, synthesizing an answer with inline citations, and optionally saving that answer as a permanent question-and-answer page.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jessepinkman9900/claude-second-brain/brain-search
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 jessepinkman9900/claude-second-brain --skill brain-search
Clone the repo
git clone --depth 1 https://github.com/jessepinkman9900/claude-second-brain

Made for: Claude Code.

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-search

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jessepinkman9900/claude-second-brain/brain-search"><img src="https://agentmods.dev/badge/skills/jessepinkman9900/claude-second-brain/brain-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 583 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00063 $0.00583
Opus 5 $0.00032 $0.00292
Sonnet 5 $0.00013 $0.00117
Haiku 4.5 $0.00006 $0.00058

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

Security

Grade A, and why

brain-search 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 10d 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.

template/.claude/skills/brain-search/SKILL.md · 51 lines

What it actually says

Runs the 4-step query workflow defined in CLAUDE.md. Answers come with inline [[wiki/page]] citations — not a list of files.

Brain Discovery

All commands target the default brain registered in ~/.claude-second-brain/config.toml. Resolve paths and run qmd via the claude-second-brain CLI — do not bake paths into this file:

BRAIN_PATH=$(npx -y claude-second-brain path)       # absolute path to the default brain's directory
npx -y claude-second-brain qmd -- query -c wiki "<question>"

Pass --brain <name> before the -- to target a non-default brain.

Workflow

Step 1 — Search the wiki

  • Run hybrid search: npx -y claude-second-brain qmd -- query -c wiki "<question>"
  • Read $BRAIN_PATH/wiki/index.md to confirm coverage and catch any pages qmd didn't surface
  • Read the 2–5 most relevant pages in full before synthesizing (paths relative to $BRAIN_PATH)

Step 2 — Synthesize an answer

  • Write the answer with inline [[wiki/page]] citations throughout
  • Be explicit about confidence: flag gaps with "The wiki doesn't have coverage on X."
  • If relevant pages are sparse, say so — don't pad with speculation

Step 3 — Offer to file

  • If the answer draws together multiple pages in a novel way, ask:

    "This answer synthesizes several pages in a useful way — want me to file it as a Q&A page?"

  • If yes:
    • Create $BRAIN_PATH/wiki/qa/[slug].md with frontmatter type: qa
    • Add to the Q&A section in wiki/index.md
    • Add [[wiki/qa/slug]] cross-links from the relevant topic pages

Step 4 — Log (if significant)

  • For queries that reveal new understanding or surface a gap worth tracking, append to $BRAIN_PATH/wiki/log.md:
    ## [YYYY-MM-DD] query | Brief question summary
    
    Filed as: [[wiki/qa/slug]] (or "not filed")
    
  • Skip logging for routine lookups
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. 10d ago First seen · 51 lines · 63 tokens per session scan A e8dd200d6e7e

Subscribe to this mod's changes

brain-search is a skill published in the GitHub repository jessepinkman9900/claude-second-brain (47 stars, last pushed 4mo ago), licensed MIT. It adds 63 tokens to every session and 583 once invoked, about $0.0003 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.

Related

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

Astro-Han/karpathy-llm-wiki · 67 tokens

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…

yasik/kmd · 135 tokens

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.

ahmedtawfeeq1/loredex · 74 tokens

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.

ahmedtawfeeq1/loredex · 78 tokens

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.

ahmedtawfeeq1/loredex · 65 tokens

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.

ahmedtawfeeq1/loredex · 58 tokens