Answer a question by reading the Karpathy-style wiki — never from memory. Claude consults wiki/index.md first, then reads the relevant wiki/pages/*.md files, synthesizes an answer with [[wikilink]] citations, and optionally files the answer back as a new wiki page so the knowledge compounds. Use this skill whenever the user says 'query the wiki', 'ask the wiki', 'what do I know about X', 'what does my wiki say about Y', 'wiki query', 'search the wiki for Z', or asks any question after setting up a wiki and expects Claude to reason from it. Also trigger when the user asks 'look up X in the wiki', 'check the wiki for X', or asks a question that clearly lives inside their wiki's domain (e.g. they have an AI-safety wiki and ask about CAI) — offer the wiki as the source of truth.
Answer a question using only what is written in the wiki. Never draw on model memory. Every claim in the answer must trace to a specific wiki page, which in turn traces to a raw source. After answering, optionally persist the synthesis as a new wiki page so the next query benefits.
Read ${CLAUDE_PLUGIN_ROOT}/references/karpathy-pattern.md once at the start of the session to re-anchor on the compounding principle.
.cogni-wiki/config.json describes that domain)wiki-setup| Parameter | Required | Description |
|---|---|---|
--question | Yes | The user's question, as a plain string |
--file-back | No | auto (default — ask the user) / yes / no — whether to save the answer as a new wiki page |
--max-pages | No | Cap on how many pages to read (default 12). Prevents runaway reads on large wikis. |
Walk upward to find .cogni-wiki/config.json. Read wiki/index.md top to bottom. The index is the map — do not skip it.
From the index, select pages whose one-line summary is relevant to the question. If fewer than 2 clear matches, also:
grep -l -i over wiki/pages/ for the question's key nouns--max-pagesIf zero candidate pages emerge after both passes, stop and report: "The wiki has no pages on this topic. Run wiki-ingest on a source first, or rephrase the question." Do not answer from memory.
Read each candidate page fully. Note:
wiki-lint if you find one)Write a plain-prose answer, inline-citing every factual claim with a [[page-slug]] link. Example:
Constitutional AI replaces human harm labels with AI-generated critiques against a written constitution [[constitutional-ai]]. The method scales with critic-model size [[constitutional-ai]] and was introduced by Bai et al. in 2022 [[anthropic-safety-team]].
Rules:
[[page]][[page-a]] claims X, but [[page-b]] claims Y — these should be reconciled via wiki-update or flagged via wiki-lint")If --file-back auto, ask the user: "File this answer as a new wiki page?" If yes, pass control to the file-back step below. If --file-back yes, do it without asking. If no, stop here after step 4.
If filing the answer back:
wiki/pages/{slug}.md with type: learning (or summary if the answer is mostly one source)sources: field lists the wiki pages used, prefixed with wiki:// to distinguish from raw sources:
sources:
- wiki://constitutional-ai
- wiki://anthropic-safety-team
This is explicit: the learning is a derived synthesis, not a direct restatement of a raw source.[[citations]] preservedwiki/index.md under an appropriate categorywiki/log.md:
## [YYYY-MM-DD] query | {slug} — {short question}
entries_count in .cogni-wiki/config.jsonbacklink_audit.py from wiki-ingest on the new page to add bidirectional linksRegardless of file-back decision, append a query log line:
## [YYYY-MM-DD] query | "{short question}" → read {N} pages
The log records every query so the user can see what the wiki has been asked.
[[citations]]wiki/pages/{slug}.md learning pagewiki/log.md (always)[[cited]]. Rhetoric and connective text can go uncited; claims cannot.wiki-update resolves contradictions; wiki-query reports them.${CLAUDE_PLUGIN_ROOT}/references/karpathy-pattern.md — the pattern./references/query-patterns.md — read-before-answer worked example