Skip to content
Agent Memory
Skill

/wiki-init

Use when bootstrapping a new personal wiki for any knowledge domain — research, codebase documentation, reading notes, competitive analysis, or any long-term knowledge accumulation project.

BOOST
From plugin
wiki-skills
1897 skills
Install
$ npx -y skills add kfchou/wiki-skills --skill wiki-init --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/wiki-init

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use when bootstrapping a new personal wiki for any knowledge domain — research, codebase documentation, reading notes, competitive analysis, or any long-term knowledge accumulation project.

SKILL.md

wiki-init.SKILL.md
name: wiki-init
description: Use when bootstrapping a new personal wiki for any knowledge domain — research, codebase documentation, reading notes, competitive analysis, or any long-term knowledge accumulation project.

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: 1. **Where should the wiki live?** (absolute path, e.g. `~/wikis/ml-research`) 2. **What is the domain/purpose?** (one sentence) 3. **What types of sources will you add?** (papers, URLs, code files, transcripts, etc.) 4. **What categories should `index.md` use?**

  • Research default: `Sources | Entities | Concepts | Analyses`
  • Codebase default: `Modules | APIs | Decisions | Flows` — see `codebase.md` in this skill's directory for detailed codebase guidance
  • Or specify custom

5. **How will you primarily browse this wiki?** 1. Obsidian (or another `[[wiki-link]]`-aware viewer) — uses `[[slug]]` syntax 2. GitHub / VS Code preview / static-site generator / plain markdown — uses `[[slug](pages/slug.md)]` syntax

The choice is recorded in `SCHEMA.md` as `link_style: obsidian` or `link_style: markdown` and applied by every other wiki skill.

2. Create directory structure

<wiki-root>/
├── SCHEMA.md         ← conventions + absolute path (how other skills find the wiki)
├── config/
│   └── link-style.md ← cross-reference emit/parse rules (copied from this skill)
├── .gitignore        ← local-only / generated artifacts (audit reports, index) excluded from version control
├── bin/                  ← helper scripts (copied verbatim from this skill's assets/bin/)
│   ├── generate-index.py  ← regenerates wiki/index.md from page frontmatter (stdlib only)
│   ├── render-log.py      ← renders the operation log from git history (stdlib only)
│   ├── check-contradictions.py ← pre-commit gate: blocks staged pages flagged as contradicting
│   ├── lint-mechanical.py ← deterministic lint checks; full mode (JSON for wiki-lint) + --staged gate
│   └── hooks/pre-commit   ← tracked git hook chaining both gates (wired via core.hooksPath)
├── raw/              ← immutable source documents (you add these, LLM never modifies)
├── wiki/
│   ├── index.md      ← GENERATED catalog (gitignored) — never hand-edit; run bin/generate-index.py
│   ├── log.md        ← operation log — ONLY for non-git wikis (git wikis use git history)
│   ├── 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.

Copy the chosen link-style rule file into the wiki:

  • If user picked option 1 (Obsidian): copy this skill's `config/link-style-obsidian.md` to `<wiki-root>/config/link-style.md`.
  • If user picked option 2 (markdown): copy this skill's `config/link-style-markdown.md` to `<wiki-root>/config/link-style.md`.

Only one file is copied — the chosen one — and it is renamed to `link-style.md` in the wiki. Every other wiki skill reads from `<wiki-root>/config/link-style.md` to know how to emit and parse cross-references.

Ensure `<wiki-root>/.gitignore` excludes generated and local-only artifacts (audit reports and the generated index) — if the wiki is or later becomes a git repo, this keeps disposable artifacts out of version control. **Do not clobber an existing `.gitignore`** — a reinitialized wiki, or a wiki root nested in an existing git repo, may already have one:

  • If `<wiki-root>/.gitignore` does not exist, create it with the block below.
  • If it exists but is missing either ignore line, append whichever line(s) it lacks.
  • If it already ignores both, leave it untouched.
# Audit reports are regenerated local-only artifacts (wiki-audit). The committed record
# of an audit is the `review:` frontmatter token on the audited page, not the report.
wiki/pages/audit-*.md
# index.md is generated from page frontmatter by bin/generate-index.py — a runtime
# artifact, regenerated on demand. The source of truth is each page's frontmatter.
wiki/index.md

This is the same create-or-append discipline `wiki-audit` uses to self-heal (Task 4).

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>
category: <one of the Index Categories below>
summary: <one-line description — becomes this page's index entry>
tags: [tag1, tag2]
sources: [source-slug1]
created: YYYY-MM-DD
updated: YYYY-MM-DD
---

`category` and `summary` drive index generation (see **Index Generation** below);
`category` must match one of the wiki's Index Categories. `created` is set once when the
page is first written and never changes; `updated` bumps on every edit.

## Cross-References
- **link_style:** <obsidian | markdown — the user's choice from step 1, question 5>
- **link_style_rules:** config/link-style.md
- See `config/link-style.md` for the exact emit and parse rules. Every wiki skill
  reads that file to decide how to write new cross-references and how to scan
  existing ones.

## Concept Identity

The slug **is** the concept's identity — there is no separate id. A concept is the
page at `wiki/pages/<slug>.md`; everything that links to it uses `[[slug]]`. This only
works if the link graph is trustworthy, so two rules hold everywhere links are written:

1. **Links are verified, never invented.** Before writing any `[[slug]]`, the slug must
   resolve to an existing `wiki/pages/<slug>.md` **or** to a page being created in the
   same
Read more
Ships withwiki-skills

A Claude Code plugin implementing Karpathy's LLM Wiki pattern — a persistent, compounding knowledge base maintained by your LLM.

Get the whole plugin
Stats
189
Stars
29
Forks
Maintained
Maintenance
Python
Language
MIT
License
3mo ago
Last commit
6mo ago
Created
2d ago
Added

Repo: kfchou/wiki-skills

Other skills on wiki-skills.