wiki-init
Wiki Init
Bootstrap a new LLM-maintained wiki at a user-specified path.
Pre-flight
Check whether a SCHEMA.md already exists nearby. If yes, ask the user if they want to reinitialize or just continue with the existing wiki.
Process
1. Gather configuration (one question at a time)
Ask:
- Where should the wiki live? (absolute path, e.g.
~/wikis/ml-research) - What is the domain/purpose? (one sentence)
- What types of sources will you add? (papers, URLs, code files, transcripts, etc.)
- What categories should
index.mduse?- Research default:
Sources | Entities | Concepts | Analyses - Codebase default:
Modules | APIs | Decisions | Flows— seecodebase.mdin this skill's directory for detailed codebase guidance - Or specify custom
- Research default:
2. Create directory structure
<wiki-root>/
├── SCHEMA.md ← conventions + absolute path (how other skills find the wiki)
├── raw/ ← immutable source documents (you add these, LLM never modifies)
├── wiki/
│ ├── index.md ← content catalog: every page, one-line summary, by category
│ ├── log.md ← append-only operation log
│ ├── overview.md ← evolving synthesis of everything known
│ └── pages/ ← all wiki pages, flat, slug-named (NO subdirectories)
└── assets/ ← downloaded images, PDFs, attachments
Critical: wiki/pages/ is flat. All pages live here as <slug>.md. No subdirectories. Slugs are lowercase, hyphen-separated.
3. Write SCHEMA.md
# Wiki Schema
## Identity
- **Path:** <absolute path to wiki-root>
- **Domain:** <user's domain description>
- **Source types:** <list>
- **Created:** <YYYY-MM-DD>
## Page Frontmatter
Every wiki page must start with:
---
title: <page title>
tags: [tag1, tag2]
sources: [source-slug1]
updated: YYYY-MM-DD
---
## Cross-References
Use `[[slug]]` where slug = filename without `.md`.
Example: `[[transformer-architecture]]` → `wiki/pages/transformer-architecture.md`
## Citations
Cite every non-common-knowledge factual claim. "Common knowledge" = uncontroversial,
undergraduate-level facts in this wiki's domain. Granularity is paragraph or claim,
never per-sentence. If you cannot produce a citation in one of the forms below,
find one, weaken the claim, or drop it.
Format: Markdown footnotes. Two citation kinds, three valid targets.
**Quote citation** (preferred):
The model uses 8 attention heads.1
**Synthesis citation** (when no single quote captures the claim):
The architecture is fundamentally an encoder-decoder with attention.2
Three rules for every footnote:
1. **The cited target is one of three forms:**
- `[[source-slug]]` — a source-type wiki page (preferred for sources you've
ingested via `wiki-ingest`)
- `raw/<file>` or `assets/<file>` — a path to a local file (for drive-by
citations where a synthesis page isn't worth creating)
- `<URL>` — a live URL, tweet, or ephemeral source (no local copy required)
Never cite entity, concept, or analysis pages — those are syntheses, not sources.
2. **A locator is present:** `§<section>`, `p.<n>`, `[HH:MM:SS]` for transcripts,
URL anchor for web, or `(YYYY-MM-DD)` for dated posts.
3. **Either a verbatim quote, or the `[synthesis]` tag plus a description** of
what the cited range supports. No third option.
**Drive-by citation examples:**
## Log Entry Format
## [YYYY-MM-DD] <operation> | <title>
Operations: init, ingest, query, update, lint, audit
## Index Categories
<one per line, matching the user's chosen taxonomy>
## Conventions
- raw/ is immutable — skills never modify it
- log.md is append-only — never rewritten, only appended
- index.md is updated on every operation that adds or changes pages
- All pages live flat in wiki/pages/ — no subdirectories
- overview.md reflects the current synthesis across all sources
<if codebase domain>
- README boundary: wiki pages must not duplicate README content. Extract structural signals; link to the README for operational content (setup, contributing, running). When ingesting any README, also evaluate it for gaps and suggest edits.
</if>
4. Write wiki/index.md
# Wiki Index — <domain>
<for each category>
### <Category Name>
<!-- entries added by wiki-ingest -->
5. Write wiki/log.md
# Wiki Log
Append-only. Format: `## [YYYY-MM-DD] <operation> | <title>`
Recent entries: `grep "^## \[" log.md | tail -10`
---
## [<today>] init | <domain>
6. Write wiki/overview.md
---
title: Overview
tags: [overview, synthesis]
sources: []
updated: <today>
---
# <Domain> — Overview
> Evolving synthesis of everything in the wiki. Updated by wiki-ingest when sources shift the understanding.
## Current Understanding
*No sources ingested yet.*
## Open Questions
*Add questions here as they arise.*
## Key Entities / Concepts
*Populated as pages are created.*
7. Confirm
Tell the user:
- Wiki initialized at
<path> - Add sources to
raw/manually, or runwiki-ingestdirectly with a URL or file path - Run
wiki-lintperiodically to keep the wiki healthy SCHEMA.mdis how all other skills locate this wiki — do not move or delete it
Footnotes
More from kfchou/wiki-skills
wiki-lint
Use when auditing a wiki for health issues — contradictions between pages, orphan pages, broken cross-references, stale claims, missing pages, or coverage gaps. Run after every 5-10 ingests.
46wiki-query
Use when asking a question against a personal wiki built with wiki-init and wiki-ingest. Do not answer from general knowledge — always read the wiki pages first.
45wiki-update
Use when revising existing wiki pages because knowledge has changed, a new piece of information updates or contradicts existing content, or the user wants to directly edit wiki content with LLM assistance.
45wiki-ingest
Use when adding a new source to a wiki — a paper, article, URL, file, transcript, or any document. One ingest may touch 10-15 wiki pages.
45wiki-audit
Use when fact-checking a single wiki page against its cited sources — verifies that every footnote actually supports its claim and surfaces uncited factual claims. Run after ingesting a high-stakes page or any time you want confidence in one page's accuracy.
26