agentleFS
jsuchetjsuchet/jonathan-skills-lab/skills/brain-search/SKILL.md

brain-search

Skill1 starsChanged 5 months agoMITView on GitHub

Search the second brain by keyword, tag, or natural language query. Returns summary cards with option to expand. Works from any project context.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 11 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search the brain and return relevant notes as summary cards.

    line 12
  2. Very specific:

    Use the Grep tool on brain/index.md for query keywords (returns only matching lines, NOT the whole file)

    line 23
  3. Distinctive:

    Run these Grep calls in parallel where possible

    line 28
  4. Distinctive:

    Read ONLY those candidate notes in full to assess relevance

    line 30
  5. Very specific:

    Read brain/index.md in full

    line 33
  6. Very specific:

    Check mocs/ for relevant Maps of Content

    line 35
  7. Distinctive:

    Read top candidate notes

    line 36
  8. Distinctive:

    Read and display the full note content

    line 67
  9. Distinctive:

    If the user is currently working on something specific (e.g., writing a newsletter), read each matching note and highlight only the parts …

    line 72
  10. Distinctive:

    After presenting a rich, multi-note synthesis answer, offer to save it:

    line 85
  11. Very specific:

    If the user confirms, create a synthesis note using the meta/templates/synthesis.md template:

    line 89
  12. Distinctive:

    Update index.md and log.md

    line 93
  13. Very specific:

    Grep-first: Use Grep on brain/index.md and note files before reading full files.

    line 97
  14. Distinctive:

    If no results found, suggest related terms or check for typos in the query.

    line 99
  15. Distinctive:

    Keep responses concise — the user wants to scan, not read paragraphs about their search.

    line 100
  16. Distinctive:

    When called from outside brain/ (e.g., from ai-in-marketing/), adjust paths accordingly.

    line 101

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/brain-search <query>

Search the brain and return relevant notes as summary cards.

Steps

  1. Parse the query from the argument. Identify:
    • Keywords and phrases
    • Tag filters (if query contains #tag syntax)
    • Category filters (if query mentions professional/personal/admin/creative)
    • Natural language intent (what is the user looking for?)
  2. Grep-first search (primary strategy — avoids reading full index.md):
    • Use the Grep tool on brain/index.md for query keywords (returns only matching lines, NOT the whole file)
    • Also Grep across note files in brain/ (excluding inbox/, meta/, .carl/, .claude/) for: a. Frontmatter matches: tags, title, summary fields b. Body matches: query keywords in note content c. Wiki-link matches: [[query term]] references
    • Run these Grep calls in parallel where possible
    • From the Grep results, identify the top 5-10 candidate note file paths
    • Read ONLY those candidate notes in full to assess relevance
  3. Fallback: full index read (only if Grep returns no/poor results for fuzzy/NLP queries):
    • Read brain/index.md in full
    • Scan all entries for semantic matches against the query intent
    • Check mocs/ for relevant Maps of Content
    • Read top candidate notes
  4. Rank results by relevance:
    • Title match → highest
    • Tag match → high
    • Summary match → high
    • Multiple keyword hits in body → medium
    • Single keyword hit → lower
    • Wiki-link reference → medium
    • Deduplicate (same note matched by multiple strategies)
  5. Present results as summary cards (top 10 max):

    🔍 Found {count} results for "{query}"
    
    1. **{title}** [{status}]
       📂 {category}/{subcategory} | 🏷️ {tags}
       {summary from frontmatter}
       📄 {file_path}
    
    2. **{title}** [{status}]
       ...
  6. Ask which to expand:
    Enter a number to see the full note, or 'done' to finish.
  7. When user selects a note:
    • Read and display the full note content
    • Show its related: notes as additional leads
    • Offer to expand those too
  8. Context-aware excerpts (when called during a task):
    • If the user is currently working on something specific (e.g., writing a newsletter), read each matching note and highlight only the parts relevant to their current task
    • Prefix with: "Most relevant to your current work:"

Search shortcuts

  • #tag → search by tag only
  • type:article → filter by note type
  • status:evergreen → filter by maturity
  • in:admin → search within a specific category
  • Plain text → full search across all fields

Synthesis filing

After presenting a rich, multi-note synthesis answer, offer to save it:

💾 This synthesis drew from {X} notes. Save it as a brain note? (type: synthesis)

If the user confirms, create a synthesis note using the meta/templates/synthesis.md template:

  • type: synthesis, source: "brain-query"
  • Include the original query, the synthesized answer, and the list of source notes as [[wiki-links]]
  • File in the most relevant category based on content
  • Update index.md and log.md

Important

  • Grep-first: Use Grep on brain/index.md and note files before reading full files. Only read index.md in full as a fallback for fuzzy/NLP queries. This saves significant tokens as the brain grows.
  • The brain root is at brain/ relative to the vault root. Use absolute paths when called from other projects.
  • If no results found, suggest related terms or check for typos in the query.
  • Keep responses concise — the user wants to scan, not read paragraphs about their search.
  • When called from outside brain/ (e.g., from ai-in-marketing/), adjust paths accordingly.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.