# Second Brain Wiki

> Queries the Second Brain wiki (~/second-brain/wiki/) for existing context on a topic, person, or project and returns the most relevant pages plus a short synthesis -- without the user pasting anything in. Use when the user says "what do I know about X", "check my second brain for X", "have I written about this before", "what's in my wiki about X", or when another skill needs background context on a topic/person/project before starting its own work (e.g. meeting prep, ticket breakdown, decision-making). Do NOT use this to add content to the wiki -- that's `second-brain-ingest`. This skill only reads.

- Skill: `jaquevan/second-brain-wiki` (Agent Skill, multi-file: 10 files)
- Install (CLI): `npx skillmds@latest add jaquevan/second-brain-wiki`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jaquevan/second-brain-wiki/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: jaquevan (https://skillmd.com/u/jaquevan)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jaquevan/second-brain-wiki

---


# Second Brain Wiki

Reads `~/second-brain/wiki/` and answers "what do I already know about this?"
so nobody has to manually open files or paste content into a prompt. This is
the retrieval half of the second brain; `second-brain-ingest` is the write
half.

## Step 1: Determine the query

| Input | Query |
|---|---|
| "what do I know about prototype-creator" | topic = prototype-creator |
| "check my second brain for <COLLEAGUE_1>" | person = <COLLEAGUE_1> |
| Called by another skill with a topic/person/project string | Use that string directly |
| Called by another skill with a topic/person **and a specific date range** (e.g. meeting prep's lookback window) | Use the string as the query, but see Step 4 -- the range changes how the cap applies |
| Empty / vague ("check my wiki") | Ask what topic, person, or project to look up |

## Step 2: Search the tag index first (fast path)

Read `~/second-brain/wiki/tags.md`. If the query matches a `project/*`,
`person/*`, `type/*`, or `status/*` tag (exact or close match, e.g. "andy"
matches `person/andy-braren`), collect every page listed under that tag.
This is faster than scanning all pages and is the primary path once tagging
(via `second-brain-ingest`) has been running for a while.

If `tags.md` doesn't exist yet or the query doesn't match a tag cleanly,
fall through to Step 3.

## Step 3: Fall back to index and content search

1. Read `~/second-brain/wiki/index.md` and look for title matches under any
   category.
2. If still nothing, grep page titles and first-10-lines across
   `~/second-brain/wiki/*.md` (excluding `index.md`, `log.md`, `tags.md`)
   for the query term.

## Step 4: Rank and read

1. Combine results from Steps 2-3, deduplicated.
2. Rank by: exact tag match > title match > content match. Within a tier,
   prefer more recent pages (check `log.md` for dates if needed).
3. Cap at the top 5 pages -- **but only for pages outside a stated date
   range.** If the caller gave a specific range (see Step 1), every page
   dated inside that range gets read regardless of how many that is; the
   cap-of-5 applies only to older background material beyond the range.
   A person with heavy tag volume (dozens of pages over months) can still
   have several matches in a one-week window -- a flat cap would silently
   drop same-day or same-week pages behind months of lower-relevance
   history, which is the opposite of what a time-bounded caller needs.
   With no stated range, the plain top-5-by-recency cap applies as usual.
4. Read each selected page in full.

## Step 5: Return the answer

Return a short synthesis, not a dump of the raw pages:

```
**Second brain context: <query>**

<1-3 sentence synthesis across the matched pages -- what's the state of this,
what's already been decided or discussed>

**Relevant pages:**
- [Page Title](page-slug.md) -- one-line summary of what it covers
- [Page Title](page-slug.md) -- one-line summary of what it covers

**Coverage:** <N pages found via tags, M via title/content search> | or
"Nothing found in the wiki for this yet."
```

If called by another skill (not directly by the user), skip the chat
formatting and just return the structured data (page paths + one-line
summaries + synthesis) for that skill to fold into its own output.

## Example: good vs bad response

**Good** — specific, synthesized, sourced:

> **Second brain context: <COLLEAGUE_1>**
>
> Recent work with <COLLEAGUE_1> centers on the prototype-creator/evaluator-super-agent
> merge (as of the 2026-07-09 meeting) and PatternFly 6 migration timing
> (Q3 target, confirmed 2026-07-01). No open blockers from him currently.
>
> **Relevant pages:**
> - [<COLLEAGUE_1>/Evan Meeting — 2026-07-09](andy-evan-2026-07-09.md) — Apollo canvas, prototype-creator merge plan
> - [Weekly Design Sync — 2026-07-01](weekly-design-sync-2026-07-01.md) — PF6 migration, Nielsen's heuristics adopted
>
> **Coverage:** 4 pages found via `person/andy-braren` tag

**Bad** — just lists files with no synthesis:

> Here are some pages that mention <COLLEAGUE_1>: andy-evan-2026-07-09.md,
> andy-evan-2026-06-29.md, weekly-design-sync-2026-07-01.md.

The bad version makes the caller do the work the retrieval was supposed to
save them. Synthesizing across pages, not just finding them, is the point.

## Common Mistakes

| Problem | Fix |
|---|---|
| Reading every wiki page to answer a narrow query | Use the tag index (Step 2) first. Full content search (Step 3.2) is the fallback, not the default. |
| Dumping raw page content back to the caller | Always synthesize (Step 5). A pile of file paths isn't an answer. |
| Treating "nothing found" as an error | It's a valid, useful answer -- say so plainly rather than guessing or fabricating context. |
| Writing to the wiki when asked to "check" it | This skill never modifies `~/second-brain/`. Any write request routes to `second-brain-ingest` instead. |
| Applying the flat cap-of-5 to a caller-specified date range | A person tagged on dozens of pages over months can still have 6+ genuinely in-range matches for a one-week window. The cap only trims older background material -- every in-range page gets read, even past 5. Found via a real miss: a heavily-tagged person's same-day meeting got trimmed by the flat cap before this rule existed. |

## Read-Only Constraint

This skill MUST NEVER create, edit, or delete anything under
`~/second-brain/`. If the user's request is actually about adding content
(not looking something up), say so and point to `second-brain-ingest`.

