Bootstrap a new Karpathy-style LLM wiki at a user-chosen directory — creates the raw/, wiki/, assets/, and .cogni-wiki/ layout, seeds SCHEMA.md/index.md/log.md/overview.md, and registers the wiki in plugin configuration. Use this skill whenever the user says 'set up a wiki', 'initialize a wiki', 'create a new wiki', 'bootstrap my knowledge base', 'start a Karpathy wiki', 'wiki init', 'wiki setup', 'new wiki for <topic>', or drops into an empty directory and asks Claude to begin a compounding knowledge base. Also trigger the first time any other wiki-* skill is invoked in a directory that doesn't yet contain a .cogni-wiki/config.json — offer to run setup first.
Bootstrap a fresh LLM wiki at a directory the user chooses. After this skill runs the directory is self-describing: future invocations of any wiki-* skill can detect the wiki by the presence of .cogni-wiki/config.json and operate on it without further configuration.
Read ${CLAUDE_PLUGIN_ROOT}/references/karpathy-pattern.md once before proceeding — it defines the three-layer model (raw sources / wiki / schema) that every decision below depends on.
wiki-* skill is invoked in a directory that has no .cogni-wiki/config.json — offer to run setup first, then hand control back.cogni-wiki/config.json — report the existing wiki instead and ask if the user wants to operate on itraw/ or dirs from a different knowledge system — stop and ask rather than overwritingwiki/| Parameter | Required | Description |
|---|---|---|
--wiki-root | No | Absolute or relative path to the wiki directory. Defaults to cogni-wiki/{slug} relative to the current working directory, where {slug} is derived from the wiki name. Use this to place a wiki outside the standard workspace layout. |
--name | Yes (prompted) | Human-readable wiki name, e.g. "Primary Knowledge Base" or "AI-Safety Research Wiki". Used for the slug and for .cogni-wiki/config.json. |
--description | No | One-sentence description of the wiki's scope and purpose. Seeded into overview.md. |
If parameters are missing, ask the user once with AskUserQuestion. Do not invent a wiki name silently.
--wiki-root was passed, use it as-is (absolute or relative).cogni-wiki/{slug} relative to the current working directory, where slug = kebab-case(name). This follows the standard cogni-plugin convention (cogni-{plugin}/{project-slug}/)..cogni-wiki/config.json, stop — this wiki is already set up. Report the path and exit.Create (with mkdir -p):
<wiki-root>/
├── raw/
├── assets/
├── wiki/
│ └── pages/
└── .cogni-wiki/
Copy ${CLAUDE_PLUGIN_ROOT}/skills/wiki-setup/references/SCHEMA.md.template to <wiki-root>/SCHEMA.md, replacing {{wiki_name}} and {{created_date}} placeholders.
Write wiki/index.md:
# Index
This is the content catalog for **{{wiki_name}}**. Every wiki page is listed here with a one-line summary. Claude consults this file before drilling into specific pages.
## Categories
_No pages yet. Run `wiki-ingest` to add your first source._
Write wiki/log.md:
# Log
Append-only record of every wiki operation. Never rewritten.
## [{{created_date}}] setup | wiki initialized
Write wiki/overview.md:
# Overview
**{{wiki_name}}** — {{description or "an evolving knowledge base"}}
This page is the high-level synthesis of what the wiki has learned. It is rewritten periodically by `wiki-update` as understanding shifts. On day one it contains only this placeholder.
Write <wiki-root>/.cogni-wiki/config.json with JSON:
{
"name": "{{wiki_name}}",
"slug": "{{slug}}",
"description": "{{description}}",
"created": "{{YYYY-MM-DD}}",
"entries_count": 0,
"last_lint": null,
"schema_version": "0.0.1"
}
Use the current date via date +%Y-%m-%d.
Report in plain prose:
drop a source document in raw/ and run /cogni-wiki:wiki-ingestwiki-query calls from memory — only from the wikiDo not create example pages or sample sources. An empty wiki is the correct starting state.
The wiki directory, populated as above. No file is created anywhere else in the user's environment.
${CLAUDE_PLUGIN_ROOT}/references/karpathy-pattern.md — the pattern./references/directory-layout.md — detailed field-by-field layout./references/SCHEMA.md.template — the file copied into every new wiki