second-brain-query
nicholasspisak/second-brain
Search and synthesize answers from your personal knowledge wiki.
What is second-brain-query?
Query your second-brain wiki to answer questions, explore topic connections, and discover patterns in your collected knowledge. Use this when you need to search your wiki, synthesize information across pages, or find what you already know about a topic.
- Search wiki index and pages to find relevant knowledge
- Use qmd for fast full-text search on large wikis (100+ pages)
- Follow wikilinks to pull related context and connections
- Synthesize answers with proper citations to source pages
- Offer to save valuable analyses back to the wiki as synthesis pages
How to install second-brain-query
npx skills add https://github.com/nicholasspisak/second-brain --skill second-brain-query- A wiki directory structure with index.md and organized pages
- Optional: qmd installed for fast search on large wikis (check with `command -v qmd`)
How to use second-brain-query
- 1.Read wiki/index.md to identify relevant pages for the question
- 2.Use qmd search if available and wiki is large, or scan index categories manually
- 3.Read identified wiki pages and follow [[wikilinks]] to related content
- 4.Synthesize an answer matching the question format (factual, comparison, exploration, or list)
- 5.Cite all claims using [[wikilink]] syntax to source pages
- 6.Offer to save the answer as a synthesis page if it contains valuable analysis
Use cases
- Answer "what do I know about X?" questions by searching your wiki
- Compare concepts or entities by reading relevant pages and structuring the comparison
- Explore connections between topics by following wikilinks across pages
- Create synthesis pages from valuable answers and analyses discovered during queries
- Find source summaries when wiki pages don't fully answer a question
- Knowledge workers maintaining a personal wiki
- Researchers exploring connections in collected notes
- Anyone building a second brain and wanting to query it
second-brain-query FAQ
Use it when the user asks about their collected knowledge, wants to explore connections between topics, says "what do I know about X", or wants to search their wiki.
If qmd is installed, use `qmd search "query terms" --path wiki/` for efficient full-text search. This is especially useful for wikis with 100+ pages.
No. Read enough relevant pages to give a thorough answer, but don't read the entire wiki. Use the index and search to focus on related content.
Always use [[wikilink]] syntax to cite wiki pages. Example: According to [[Source - Article Title]], the key finding was X.
Check relevant source summaries in wiki/sources/. Only go to files in raw/ as a last resort.
Full instructions (SKILL.md)
Source of truth, from nicholasspisak/second-brain.
name: second-brain-query description: > Answer questions against the knowledge base wiki. Use when the user asks a question about their collected knowledge, wants to explore connections between topics, says "what do I know about X", or wants to search their wiki. allowed-tools: Bash Read Write Edit Glob Grep
Second Brain — Query
Answer questions by searching and synthesizing knowledge from the wiki.
Search Strategy
1. Start with the index
Read wiki/index.md to identify relevant pages. Scan all category sections (Sources, Entities, Concepts, Synthesis) for entries related to the question.
2. Use qmd for large wikis
If qmd is installed (check with command -v qmd), use it for search:
qmd search "query terms" --path wiki/
This is especially useful when the wiki has grown beyond ~100 pages where scanning the index becomes inefficient.
3. Read relevant pages
Read the wiki pages identified by the index or search. Follow [[wikilinks]] to pull in related context from linked pages. Read enough pages to give a thorough answer, but don't read the entire wiki.
4. Check raw sources if needed
If the wiki pages don't fully answer the question, check relevant source summaries in wiki/sources/ for additional detail. Only go to files in raw/ as a last resort.
Synthesize the Answer
Format
Match the answer format to the question:
- Factual question → direct answer with citations
- Comparison → table or structured comparison
- Exploration → narrative with linked concepts
- List/catalog → bulleted list with brief descriptions
Citations
Always cite wiki pages using [[wikilink]] syntax. Example:
According to [[Source - Article Title]], the key finding was X. This connects to the broader pattern described in [[Concept Name]], which [[Entity Name]] has also explored.
Offer to save valuable answers
If the answer produces something worth keeping — a comparison, analysis, new connection, or synthesis — offer to save it:
"This comparison might be useful to keep in your wiki. Want me to save it as a synthesis page?"
If the user agrees:
- Create a new page in
wiki/synthesis/with proper frontmatter - Add an entry to
wiki/index.mdunder Synthesis - Append to
wiki/log.md:## [YYYY-MM-DD] query | Question summary
Conventions
- Search the wiki first. Only go to raw sources if the wiki doesn't have the answer.
- Cite your sources. Every factual claim should link to the wiki page it came from.
- Valuable answers compound. Encourage saving good analyses back into the wiki.
- Use
[[wikilinks]]for all internal references. Never use raw file paths.
Related Skills
/second-brain-ingest— process new sources into wiki pages/second-brain-lint— health-check the wiki for issues
Related skills
More from nicholasspisak/second-brain and the wider catalog.

second-brain
Set up an Obsidian knowledge base with the LLM Wiki pattern via interactive wizard.

second-brain-ingest
Ingest raw documents into structured, interlinked wiki pages.

second-brain-lint
Health-check your wiki for broken links, orphans, contradictions, and stale claims.

owasp-top-10
OWASP Top 10 security vulnerabilities with detection and remediation patterns. Use when conducting security audits, implementing secure coding practices, or reviewing code for common security vulnerabilities.

react-performance-optimization
Optimize React performance with memoization, code splitting, and efficient rendering strategies.

prompt-master
Generate optimized prompts for AI tools—write, fix, and improve prompts for LLMs, Cursor, Midjourney, and more.