brain-search

brain-search is a command for coding agents from fiale-plus/fiale-claude-plugins. It costs 12 tokens per session (972 once invoked), scanned B, original, MIT.

A command for searching personal notes and a shared team knowledge vault for words or phrases. A vault is a folder of organized notes, stored either privately or for a team.

In plain words
What is it for?
Use it to search both knowledge stores, read matching notes, and use the available note-search tool or a text-search fallback.
Why use it?
It helps developers find earlier decisions, patterns, and known problems without searching through files and messages manually. Results show whether the information came from personal or team notes.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the brain plugin — 10 commands, 3 hooks 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 commands/fiale-plus/fiale-claude-plugins/search
Clone the repo
git clone --depth 1 https://github.com/fiale-plus/fiale-claude-plugins

Or install brain, the plugin that ships this one along with the rest of its 10 commands, 3 hooks.

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/commands/fiale-plus/fiale-claude-plugins/search.svg)](https://agentmods.dev/commands/fiale-plus/fiale-claude-plugins/search)
Your own site
<a href="https://agentmods.dev/commands/fiale-plus/fiale-claude-plugins/search"><img src="https://agentmods.dev/badge/commands/fiale-plus/fiale-claude-plugins/search.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 972 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00012 $0.00972
Opus 5 $0.00006 $0.00486
Sonnet 5 $0.00002 $0.00194
Haiku 4.5 $0.00001 $0.00097

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

Security

Grade B, and why

brain-search scanned grade B 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/brain/config.json
plugins/brain/commands/search.md · 145 lines

How it starts

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

Search across personal atoms (~/brain/atoms/) and team vault (~/brain-team/) for relevant knowledge. Results are labeled by layer.

Steps

1. Read config and query

cat ~/.claude/brain/config.json

If no query was provided as argument, ask:

"What are you looking for? Enter keywords or a phrase:"

Call this QUERY.

2. Detect Obsidian CLI

which obsidian 2>/dev/null && echo "cli-available" || echo "cli-not-found"

Store result as HAS_OBSIDIAN_CLI. Use CLI when available; fall back to grep + atoms-index otherwise.

3. Search personal atoms

If HAS_OBSIDIAN_CLI:

VAULT_NAME=$(basename <vault_path>)
obsidian vault="$VAULT_NAME" search query="<QUERY>" limit=20 2>/dev/null

If that returns results, read any matching files for full content. If the CLI errors or returns nothing, fall through to grep.

Grep fallback (always works):

grep -ril "<QUERY>" <vault_path>/atoms/ 2>/dev/null

For each matching file, read it.

Also score via atoms-index (fast keyword match, works regardless of CLI):

python3 -c "
import json, re
from pathlib import Path
index_path = Path.home() / '.claude/brain/atoms-index.json'
if not index_path.exists():
    exit()
index = json.loads(index_path.read_text())
query_words = set(re.findall(r'[a-z][a-z0-9_-]{2,}', '<QUERY>'.lower()))
results = []
for atom in index:
    score = len(query_words & set(atom['keywords']))
    if score >= 1:
        results.append((score, atom['slug'], atom['path'], atom.get('reference_count', 1)))
results.sort(reverse=True)
for score, slug, path, rc in results[:10]:
    print(f'{score:3d} matches  [{rc}x referenced]  {slug}  {path}')
"

Merge results from CLI/grep and atoms-index, deduplicate by path, sort by relevance.

4. Search team vault (if enabled)

Check config for team.enabled. If true:

If HAS_OBSIDIAN_CLI and team vault is registered as an Obsidian vault:

TEAM_VAULT_NAME=$(basename <team_vault_path>)
obsidian vault="$TEAM_VAULT_NAME" search query="<QUERY>" limit=20 2>/dev/null

Read the full file on GitHub · 145 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. 4d ago First seen · 145 lines · 12 tokens per session scan B 584cb6b917e3

Subscribe to this mod's changes

brain-search is a command published in the GitHub repository fiale-plus/fiale-claude-plugins (4 stars, last pushed 4mo ago), licensed MIT. It adds 12 tokens to every session and 972 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.