$npx -y skills add NicholasSpisak/second-brain --skill second-brain-queryAnswer 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.
| 1 | # Second Brain — Query |
| 2 | |
| 3 | Answer questions by searching and synthesizing knowledge from the wiki. |
| 4 | |
| 5 | ## Search Strategy |
| 6 | |
| 7 | ### 1. Start with the index |
| 8 | |
| 9 | Read `wiki/index.md` to identify relevant pages. Scan all category sections (Sources, Entities, Concepts, Synthesis) for entries related to the question. |
| 10 | |
| 11 | ### 2. Use qmd for large wikis |
| 12 | |
| 13 | If `qmd` is installed (check with `command -v qmd`), use it for search: |
| 14 | |
| 15 | ```bash |
| 16 | qmd search "query terms" --path wiki/ |
| 17 | ``` |
| 18 | |
| 19 | This is especially useful when the wiki has grown beyond ~100 pages where scanning the index becomes inefficient. |
| 20 | |
| 21 | ### 3. Read relevant pages |
| 22 | |
| 23 | 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. |
| 24 | |
| 25 | ### 4. Check raw sources if needed |
| 26 | |
| 27 | 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. |
| 28 | |
| 29 | ## Synthesize the Answer |
| 30 | |
| 31 | ### Format |
| 32 | |
| 33 | Match the answer format to the question: |
| 34 | - **Factual question** → direct answer with citations |
| 35 | - **Comparison** → table or structured comparison |
| 36 | - **Exploration** → narrative with linked concepts |
| 37 | - **List/catalog** → bulleted list with brief descriptions |
| 38 | |
| 39 | ### Citations |
| 40 | |
| 41 | Always cite wiki pages using `[[wikilink]]` syntax. Example: |
| 42 | |
| 43 | > 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. |
| 44 | |
| 45 | ### Offer to save valuable answers |
| 46 | |
| 47 | If the answer produces something worth keeping — a comparison, analysis, new connection, or synthesis — offer to save it: |
| 48 | |
| 49 | > "This comparison might be useful to keep in your wiki. Want me to save it as a synthesis page?" |
| 50 | |
| 51 | If the user agrees: |
| 52 | 1. Create a new page in `wiki/synthesis/` with proper frontmatter |
| 53 | 2. Add an entry to `wiki/index.md` under Synthesis |
| 54 | 3. Append to `wiki/log.md`: `## [YYYY-MM-DD] query | Question summary` |
| 55 | |
| 56 | ## Conventions |
| 57 | |
| 58 | - **Search the wiki first.** Only go to raw sources if the wiki doesn't have the answer. |
| 59 | - **Cite your sources.** Every factual claim should link to the wiki page it came from. |
| 60 | - **Valuable answers compound.** Encourage saving good analyses back into the wiki. |
| 61 | - Use `[[wikilinks]]` for all internal references. Never use raw file paths. |
| 62 | |
| 63 | ## Related Skills |
| 64 | |
| 65 | - `/second-brain-ingest` — process new sources into wiki pages |
| 66 | - `/second-brain-lint` — health-check the wiki for issues |