Agent skill
brain-search
Query the Brain index for files by text, tags, type, links, or timeline. Use when searching for Brain content, finding related notes, or exploring what's been written about a topic.
Install this agent skill to your Project
npx add-skill https://github.com/jonmagic/skills/tree/main/skills/brain-search
SKILL.md
Brain Search
Search and query the Brain's structured index. Supports full-text search, tag filtering, type filtering, link traversal, timeline views, and recent file discovery.
Prerequisites
Build the index first (takes ~2 seconds):
node ~/.copilot/skills/brain-search/scripts/brain-index.js ~/Brain --stats
The index is written to ~/.brain-index.json. Rebuild it whenever you need fresh results.
Search Modes
Full-text search
Search across titles, summaries, paths, and tags:
node ~/.copilot/skills/brain-search/scripts/brain-search.js "proxima abuse"
Tag search
Find files with a specific tag:
node ~/.copilot/skills/brain-search/scripts/brain-search.js --tag hamzo
Type filter
Find files of a specific collection type:
node ~/.copilot/skills/brain-search/scripts/brain-search.js --type daily.project --tag proxima
Timeline view
See how thinking on a topic evolved chronologically:
node ~/.copilot/skills/brain-search/scripts/brain-search.js --timeline "nuanced-enforcement"
Link traversal
Find everything linking to a specific record:
node ~/.copilot/skills/brain-search/scripts/brain-search.js --linked-to 3lz7nwvh4zc2u
Recent files
Files modified in the last N days:
node ~/.copilot/skills/brain-search/scripts/brain-search.js --recent 7
Index statistics
node ~/.copilot/skills/brain-search/scripts/brain-search.js --stats
Options
| Option | Description |
|---|---|
--tag <tag> |
Filter by tag (combinable with other filters) |
--type <type> |
Filter by collection type |
--linked-to <uid> |
Find records linking to this UID |
--timeline <query> |
Chronological view of a topic |
--recent <days> |
Files modified in last N days |
--limit <n> |
Max results (default: 20) |
--compact |
Compact output (paths only) |
--index <path> |
Custom index path (default: ~/.brain-index.json) |
--stats |
Show index statistics |
Collection Types
daily.project, weekly.note, meeting.note, project, snippet, transcript, executive.summary, archive, reference
Agent Usage
When an agent needs to answer "what do I know about X?":
- Rebuild the index:
node ~/.copilot/skills/brain-search/scripts/brain-index.js ~/Brain - Search:
node ~/.copilot/skills/brain-search/scripts/brain-search.js "query" - Read the most relevant files for deeper context
For timeline questions ("how has my thinking on X evolved?"):
- Use
--timeline "topic"to get chronological results - Read key files at different time points to trace the evolution
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
markdown-to-standalone-html
Convert Markdown documents (*.md files) to self-contained HTML files with embedded images. Use when you need a portable, offline-friendly single HTML file from Markdown—ideal for blog posts, essays, reports, or any content that should work without external dependencies.
brain-operating-system
Quick reference for operating within jonmagic's second-brain workspace. Use when working with files in the brain repository—provides directory structure, naming conventions, append-only norms, wikilink patterns, frontmatter requirements, project conventions, and file organization rules. Essential for understanding where to create files, how to name them, and how to maintain continuity with existing structures.
semantic-commit
Generate semantic commit messages from staged changes. Use when committing code to produce consistent, well-structured commit messages following conventional commit format.
archive-meeting
Archive one or more meetings into the brain repo by importing Zoom transcript folders (~/Documents/Zoom/*) and/or downloaded Teams .vtt files (~/Downloads/*.vtt), then generating a transcript markdown file, an executive summary, and creating meeting notes. Use when the user says "archive meeting", "archive my last meeting", "process these transcripts", or similar.
brain-commit
Analyze changes in the Brain repo and create semantic commits. Use when the user wants to commit their brain changes with meaningful, organized commit messages. Analyzes staged/unstaged changes, groups related files, creates appropriate commits, and pushes without user interaction.
session-to-brain
Archive a Copilot CLI session to the brain. Creates a daily project file with the session transcript and adds a resume link to the weekly note. Use when ending a significant work session to preserve context for future reference.
Didn't find tool you were looking for?