brain-search
Skill0 starsChanged 42 days agoMITView on GitHub
Searches the user's second brain (their Obsidian vault) BEFORE answering or asking, with a local full-text index ranked by relevance. Use it whenever the answer might already be in the vault: "what did we decide about X?", "where did we leave Y?", "have we done this before?", "find my notes on Z", "search my brain", "¿qué decidimos sobre X?", "¿dónde quedó Y?", "¿ya hicimos esto?", "busca en mi cerebro", and also on your own initiative before asking the user for a fact (a name, a number, a past choice) that the vault may hold. Bilingual EN+ES.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- DentalEdge-Solutions/claude_codetheir own version, first seen Nov 1, 2026
- inite-ai/inite-brain-servicetheir own version, first seen Oct 18, 2026
- hess0ul/brain-searchtheir own version, first seen Jun 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- inite-ai/inite-brain-service★ 43same name
- DentalEdge-Solutions/claude_code★ 1same name
- hess0ul/brain-search★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- brain-healthSkill
- close-sessionSkill
- obsidian-power-userSkill
- project-advisorSkill
- project-doorSkill
- save-to-obsidianSkill
- second-brain-initSkill
- session-checkpointSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Only then, ask the user. If they answer with a durable fact, offer to save it.
- Distinctive: line 51
If nothing has every word, it retries with any of them and says so.
- Very specific: line 87
If python3 is not available (or the index cannot be built), fall back to a plain text search of the vault with the host's file search …
- Distinctive: line 98
Read the top 1 to 3 notes before answering.
- Distinctive: line 99
If two notes disagree, say so and show both, newest first.
- Distinctive: line 100
If nothing is found, say it plainly ("nothing in the brain about X"), then ask.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Brain Search: look in the brain before you ask
The rule: retrieval first
A fact about the user's life or work (a decision, a price, a person, a date, how something was done) is searched before it is asked. The order:
brain_search.py(this skill).- The project Door, if the question is about a project (
project-door). - A plain text search of the vault, for an exact number or phrase.
- Only then, ask the user. If they answer with a durable fact, offer to save it.
Asking the user something their own brain already knows wastes their time and teaches them the brain is not worth feeding.
How it works
The kit keeps a search index of the whole vault at {{VAULT_PATH}}/.brain/brain.sqlite
(SQLite FTS5, built with only the Python standard library). It ranks by relevance
(bm25): a word in the title, description, aliases or tags weighs more than the same
word in the body. Accents do not matter.
T="{{VAULT_PATH}}/.brain/tools"
python3 "$T/brain_search.py" "raised beds" # every word must appear
python3 "$T/brain_search.py" "\"raised beds\"" # exact phrase
python3 "$T/brain_search.py" compost --prefix # compost* (composting, composts)
python3 "$T/brain_search.py" budget --type decision --sort date # newest decision first
python3 "$T/brain_search.py" garden --folder "06 Session Logs" --since 2026-09-01
python3 "$T/brain_search.py" "pricing" --project kitchen --limit 5
python3 "$T/brain_search.py" roof --json # for further processingIf nothing has every word, it retries with any of them and says so.
Recipes
| The user asks | Run |
| "What did we decide about X?" | --title "X" --type decision --sort date (newest first; if empty, drop --title) |
| "Where did we leave project Y?" | project-door first; then "Y" --folder "06 Session Logs" --sort date |
| "Have we done this before?" | the 2 or 3 key words, then --type session,lesson |
| "What do I know about person Z?" | "Z" --type person, then without the filter |
| "Find that article about W" | "W" --type reference |
Filters
--type, --project, --folder, --status, --not-folder, --title, --tag,
--since, --until, --limit, --sort rank|date, --prefix, --raw (FTS5 syntax
as is, e.g. title:budget, NEAR(a b)). Filters are case-insensitive substring matches
and accept a comma list.
Keeping the index fresh
The index is rebuilt in seconds, whole, every time:
python3 "{{VAULT_PATH}}/.brain/tools/brain_index.py"It runs at the end of save-to-obsidian and close-session, and every month with the
health check. If a search says the index is more than 24 hours old, rebuild it first.
Without Python
If python3 is not available (or the index cannot be built), fall back to a plain text
search of the vault with the host's file search (Grep/Glob, or grep -ril "word"),
starting with file names and the description: lines, then the bodies. Same order,
less ranking.
How to answer
- Answer from what the notes say, and name the note each fact came from as a
[[link]], so the user can open it. - Read the top 1 to 3 notes before answering; the snippet is a pointer, not the answer.
- If two notes disagree, say so and show both, newest first. Do not pick one silently.
- If nothing is found, say it plainly ("nothing in the brain about X"), then ask.
- Show the work in one line: "Searched the brain for X: 3 notes, used the first two."
Changelog
- 2.0.0 (2026-10-02): New skill. Local FTS5 index, retrieval-first rule, recipes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

