dw-init

Installation
SKILL.md

dw-init

Guided setup. Run the diffwiki CLI for every mutation — never edit registry/state files directly. Read references/setup.md for exact commands.

Steps

  1. Detect context. Run git rev-parse --show-toplevel 2>/dev/null to see if we're in a repo, and diffwiki collection list to show existing collections. Seed the authoring templates (idempotent, never overwrites): diffwiki templates init.

  2. Ask location (AskUserQuestion, "Where should this wiki live?"):

    • In this repo (recommended when in a repo) — an in-repo collection under wiki/ or your preferred in-repo location, tracked in git with the code.
    • Global — a collection under in your global git backed wiki (~/.diffwiki/collections), shared across projects.
  3. Create it.

    • In-repo: ask for the collection name (default = repo name) and path (default wiki), then run diffwiki collection init -c <name> -p <path>.
    • Global: ask for the name, then diffwiki collection create <name>.
  4. Set recall context (only meaningful in-repo). Show the current diffwiki collection list and ask (multi-select) which collections dw-recall should search from within this repo — typically this repo's collection plus any collections dedicated to the topic (language, framework, or subject). Apply it with diffwiki context set <a,b,c> (see references/setup.md) — never hand-edit diffwiki.yaml.

  5. Offer indexing. If a search plugin is installed (diffwiki plugin list), offer to run diffwiki search index.

Installs
2
First Seen
Oct 20, 2026