# second-brain-query

This skill searches your knowledge base wiki and answers questions with citations back to the pages it used. Handy once your notes outgrow your memory.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2500 installs · ★ 760
- Author: NicholasSpisak
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NicholasSpisak/second-brain/tree/HEAD/skills/second-brain-query/SKILL.md
- Updated: 2026-04-07
- HTML: https://affpapa.org/en/nevibecode/skills/second-brain-query

## What it does

The skill answers questions against a wiki knowledge base. It starts by reading `wiki/index.md` and scanning the Sources, Entities, Concepts and Synthesis sections for pages that match the question. Then it reads those pages and follows `[[wikilinks]]` for related context. If the pages fall short, it checks summaries in `wiki/sources/`; files in `raw/` are the last resort.

Large wikis get a faster path. When `qmd` is installed (check with `command -v qmd`), search runs through `qmd search "query terms" --path wiki/`. The author suggests switching to it once the wiki passes roughly 100 pages and scanning the index stops being practical. Answer format follows the question: a direct answer with citations, a table for comparisons, a narrative for exploration. Every claim links to a wiki page via `[[wikilink]]`, never to a raw file path.

When an answer is worth keeping — a comparison, an analysis, a new connection — the skill offers to save it as a page in `wiki/synthesis/`, add an entry to the index and a line to `wiki/log.md`. That is the point: good answers stay in the base instead of disappearing into chat history. It pairs with `/second-brain-ingest` for pulling in new sources and `/second-brain-lint` for health-checking the wiki.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NicholasSpisak/second-brain --skill second-brain-query -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/second-brain-query/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/second-brain-query/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NicholasSpisak/second-brain --skill second-brain-query -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/second-brain-query/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NicholasSpisak/second-brain --skill second-brain-query -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/second-brain-query/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NicholasSpisak/second-brain second-brain-query
```

2. **Manually: put the files in place**
- File: `.github/skills/second-brain-query/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NicholasSpisak/second-brain --skill second-brain-query -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NicholasSpisak/second-brain --path skills/second-brain-query
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/second-brain-query/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NicholasSpisak/second-brain --skill second-brain-query -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NicholasSpisak/second-brain/tree/HEAD/skills/second-brain-query/SKILL.md

## When to use it
- find what you already wrote on a topic without scrolling the wiki
- get an answer with links to the pages it came from
- compare two topics using your own notes
- trace connections between concepts through `[[wikilinks]]`
- save a good analysis back into the wiki

## Example prompts
- what do I know about vector databases?
- compare the caching approaches in my wiki
- search my wiki for notes on indexes and show the connections

## Similar
- [second-brain](https://affpapa.org/en/nevibecode/skills/coreyhaines31-second-brain.md) — skill · 355 installs
- [company-brain](https://affpapa.org/en/nevibecode/skills/company-brain.md) — skill · 357 installs
- [llm-wiki](https://affpapa.org/en/nevibecode/skills/nashsu-llm-wiki.md) — skill · 1800 installs
- [wiki-ingest](https://affpapa.org/en/nevibecode/skills/wiki-ingest.md) — skill · 3600 installs
- [wiki-capture](https://affpapa.org/en/nevibecode/skills/wiki-capture.md) — skill · 2800 installs
- [query](https://affpapa.org/en/nevibecode/skills/neolabhq-query.md) — skill · 1100 installs

From the same set: [nicholasspisak/second-brain](https://affpapa.org/en/nevibecode/by/nicholasspisak/second-brain.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
