From rig-wiki
Agent-only orchestration for LLM wikis on Obsidian vaults. Translates natural language intents into rig wiki commands for note-taking, URL fetching, search, and indexing. Cross-lingual vector retrieval.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rig-wiki:rig-wikiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Positioning.** rig wiki is an **agent-facing tool**. Humans don't memorise the CLI; they tell their agent (you) what they want, and you orchestrate `rig wiki *`. Treat any direct user-typed `rig wiki ...` invocation as a fallback — your job is to make raw CLI use unnecessary. Never just hand the user a command and walk away; run it, observe, report.
Positioning. rig wiki is an agent-facing tool. Humans don't memorise the CLI; they tell their agent (you) what they want, and you orchestrate rig wiki *. Treat any direct user-typed rig wiki ... invocation as a fallback — your job is to make raw CLI use unnecessary. Never just hand the user a command and walk away; run it, observe, report.
Substrate. rig wiki runs on top of an Obsidian vault. The project root IS the Obsidian vault (e.g. overmind/); rig-wiki/ is the metadata subdirectory rig manages inside it. Sibling dirs (personal/, research/, …) are user-authored data — sources for ingest. All cross-references generated by ingest use obsidian://open?vault=<name>&file=<vault-rel-path> URLs, not filesystem paths, so links work the same from inside Obsidian and from terminal-launched tools.
A vault is a single rig-wiki/ dir at the project root holding metadata (purpose.md, schema.md, page tree, .rig/config.yml). The project root itself is the conceptual "vault" — rig-wiki/ is just the metadata subdir living inside it, named rig-wiki/ by convention. User-authored data (personal/, research/, etc.) lives in sibling dirs and is NEVER touched.
<rig-wiki>/.rig/config.yml (name, root, include).rig wiki * command walks up from CWD; at each level it checks both <dir>/.rig/config.yml (you're inside the vault) and <dir>/rig-wiki/.rig/config.yml (you're at the project root). So cd anywhere inside the project works.This means:
--wiki <name> flag exists. Don't try to pass one.rig wiki list, register, or unregister commands. They've been removed.rig wiki init (see "Setup" below). The <scope> argument is optional — without it the vault covers the whole CWD, filtered by .gitignore / hidden / binary rules.| User intent (any language) | Action |
|---|---|
| "把 / record / take notes on / 添加 / 收一下 / 收藏 …" + a URL | rig wiki fetch <url> then rig wiki ingest raw/<resulting-file> |
| "…" + a local file path or content paste | Write the content to <vault>/raw/YYYY-MM-DD-<kebab-slug>.md with frontmatter (source-url, fetched-at, fetcher: agent-paste, content-sha). Then rig wiki ingest <that-path>. |
| "ingest / re-process / 重新整理 / 重新 ingest " | rig wiki ingest <path> — single file, NEW or MODIFIED. |
| "what's new / 有什么变化 / scan / diff" | rig wiki scan — surface the NEW / MODIFIED / DELETED / RAW DRIFT report verbatim. |
| "update / 同步 / 更新整个 wiki / refresh / sync / 让 wiki 跟上磁盘 / 把改动都收掉 / 删掉源没了的页面 / 全量更新" | rig wiki sync — one shot: scan → ingest each NEW + MODIFIED → prune wiki pages whose source files have been deleted, scrub the dropped slug from derived pages' sources: [...], drop the state.db rows. This is the daily "keep wiki current" command. Add --dry-run to preview, --no-prune to keep deleted-source pages around. |
| "ingest everything new / 把新东西都收一下" | rig wiki sync — covers NEW, MODIFIED, and DELETED in one call. (The old workflow of scan → per-file ingest still works, but sync is preferred.) |
| "看看哪些文件能进 wiki / what's eligible / survey / 看一下能 ingest 什么 / triage" | rig wiki survey — walks scan root, asks the agent to apply schema.md "Ingestion policy" rules to every non-binary visible candidate; outputs ingest/skip/unclear per file. |
| "把符合策略的全收 / ingest everything that fits / 一键收录" | rig wiki survey --apply — survey + ingest all "ingest"-tagged candidates in series. Tell the user upfront how many it'll process. |
| "在这建一个 wiki / init wiki here / 设置 wiki / 一键给当前项目建 wiki" | rig wiki init (no argument — covers the whole CWD by default). Then tell the user to edit rig-wiki/purpose.md (one-time scoping), then rig wiki sync ingests everything that survives the .gitignore + hidden + binary filters. |
| "policy / 收录规则 / 该收什么文件" | Read <vault>/schema.md "Ingestion policy" section. To change rules, the user edits schema.md directly — DO NOT edit it for them (it's human-authored). |
| "wiki 里有没有 X / what does my wiki say about X / search the wiki for X" | rig wiki query "<X>" (Qwen3 vector + Qwen3 reranker; cross-lingual). Default limit 10. |
| "summarize what we know about X / 总结一下 X" | rig wiki query "<X>" --synth — adds a Claude-synthesized paragraph with [[wikilink]] citations after the hit list. |
| "lint / 检查一遍 / what's broken in my wiki" | rig wiki lint. Surface the report. Exit code 11 = severe (broken refs / missing source). |
| "rebuild / 全部重 embed / 换了模型 / 新机器" | rig wiki rebuild — full nuclear refresh. Only suggest this when the user mentions a new device or explicitly switching the embed model. |
wiki/ subdir)<project>/ ← the conceptual vault (e.g. overmind/)
rig-wiki/ ← fixed metadata-dir name; created by `rig wiki init`
purpose.md ← human-authored, never write
schema.md ← human-authored, never write
index.md ← LLM-writable
overview.md ← LLM-writable
log.md ← append-only LLM log
reviews.md ← LLM-writable backlog of human-review items
raw/ ← immutable source files (never edit existing)
sources/ ← one .md per ingested source — page tree at vault root
entities/
concepts/
synthesis/
queries/
.rig/config.yml ← per-vault settings (name, root, include, exclude, …)
.gitignore
personal/ ← user-authored data — scope target (NEVER touched)
research/ ← (other sibling data dirs)
...
Note: page directories (sources/, entities/, concepts/, synthesis/, queries/) live directly under rig-wiki/ — no nested wiki/ subdir.
raw/YYYY-MM-DD-* prefix.YYYY-MM-DD-<slug>.md. Pick today's local date; if filename collides, append -2, -3.[a-z0-9-] with -, max 64 chars.rig wiki init <scope> arg is a data subdir NAME, not a path to create. Examples: rig wiki init personal (scopes to ./personal/), rig wiki init research. The vault metadata dir is always ./rig-wiki/. Never pass a path like rig-wiki — that's the metadata dir, not the scope.obsidian://open?vault=<name>&file=<vault-rel> (the ingest prompt provides the vault name and rel-path); page-to-page links → [[slug]] wikilinks. Never put raw absolute paths or ../-style relative paths in generated content.raw/, purpose.md, or schema.md directly. Those are human-authored. If the user asks you to, tell them to do it manually.personal/wiki/). The vault dir contaminates the user's source tree. Put the vault at the project root (e.g. <project>/rig-wiki/) and point include[] at the data dirs via <vault>/.rig/config.yml..) or a .gitignored path. rig wiki refuses at the CLI level.rig wiki scan exit 10 (RAW DRIFT) = a raw/ file's bytes changed since last scan. Do NOT auto-fix or re-ingest. Surface to the user as a data-integrity warning.rig wiki lint exit 11 = severe findings. Surface the report path and the top findings; do not auto-fix unless the user asks.~/.rig/<project>/wiki/*.sqlite or ~/.cache/qmd/. Those are rebuildable caches.The scanner skips these automatically — do not waste user time adding them to exclude:
. (.git/, .obsidian/, .vscode/, .DS_Store, …)..gitignore..wikiignore (see below)..wikiignore — wiki-only ignore fileSame syntax as .gitignore. Lives anywhere from the vault root up to the
scan-root project dir; the walker honors all .wikiignore files between
a candidate and the vault root (nested files compose, gitignore-style).
Use it for paths git tracks intentionally but the wiki MUST skip — the
canonical case is a private repo's secrets dir (e.g. overmind's
keychain/, secrets/, .env* outside of .gitignore). The same
filter applies to both rig wiki sync walk and rig wiki ingest <path>,
so an explicit ingest keychain/foo.md is refused, not just silently
unscanned.
Drop it at the scan root:
# <project>/.wikiignore — same syntax as .gitignore
keychain/
secrets/
personal/life/ # remove if you want this indexed
rig wiki init prints a tip suggesting .wikiignore when the scan root
has none.
Defaults in .rig/config.yml from init:
include: ['**'] — everything that survives the auto-skipsexclude: — binary archives (*.zip, *.tar, *.tar.gz, *.tgz, *.7z, *.rar). Their contents can't be ingested without unpacking.What you DO need to put in exclude is additional content-type filtering the user explicitly asks for.
rig wiki ingest <source> invokes Claude (claude -p) and tells it to Read the source. By type:
| Type | Behaviour |
|---|---|
.md, .txt, .json, .csv, .yml, .py, .ts, code etc. | Read directly as text. |
.png, .jpg, .jpeg, .gif, .webp, .bmp | Claude Read returns visual input; the prompt instructs the model to describe contents, transcribe visible text/numbers, capture structure. |
.pdf | Claude Read decodes natively. >10 pages: the prompt instructs chunked reads with the pages parameter. |
.xlsx, .xls, .ods, .numbers | Not natively supported by Read in v1. Ingest writes a stub source page (filename + obsidian:// URL + last-modified date) and appends a reviews.md bullet asking the user to export to CSV / JSON for re-ingest. Don't invent contents. |
.zip and other archives | Default-excluded; do not ingest. Unpack first, then ingest the unpacked tree. |
| Error | What it means | Action |
|---|---|---|
No rig wiki vault found. | CWD has no .rig/config.yml and no parent does either | cd into the vault (or the project that contains one), or run rig wiki init <subdir> |
qmd query failed. Run \rig wiki index` first` | No vector index for this vault | rig wiki index, then retry |
claude not installed on PATH (during ingest/synth) | Claude Code CLI missing | Tell the user; suggest yarn dlx @anthropics/claude-code |
| Reranker download stalls on first query | CDN cold node, can take ~1 min | Just wait; subsequent queries are instant |
rig wiki * command, summarise in natural language what changed. Don't dump raw rig output unless the user asks. Examples:
rig wiki ingest: "Wrote 11 pages (1 source, 2 entities, 5 concepts, …). Lint clean."rig wiki query: cite the top hit by slug [[wikilink]] and quote a 1-line snippet; offer --synth for a paragraph.rig wiki scan: "3 new, 1 modified. Want me to ingest them?"--json on any command. Shape is { ok, code, data?, error? }.ingest / index, reranker on first query): each is ~610MB from the rig CDN — usually under a minute. Mention it the first time, then forget.Read, not rig wiki query.purpose.md / schema.md / a file in raw/ → human-authored, refuse with reason.grep).rig wiki scan (or any command) reports No rig wiki vault found. → ask the user once which sibling data dir to scope this wiki to (don't guess silently):
"No vault here. Which subdir should this wiki ingest from —
personal/,research/, …?"
Then orchestrate without further prompting:
cd <project> # the root that contains the scope dir
rig wiki init <scope> # e.g. `rig wiki init personal` → creates ./rig-wiki/, scope = ./personal/
After init, pause and ask the user to edit <project>/rig-wiki/purpose.md (one-time human scoping — define what this wiki is for, in/out of scope). Don't write purpose.md yourself; it's the only human-authored anchor for everything downstream.
If the user wants finer scoping than a single subdir (e.g. "ingest personal/ but ignore zip files"), translate that into edits to <project>/rig-wiki/.rig/config.yml. Fields: name, root (relative scan base, default ../<scope>), include[], exclude[], schedule, ingestRules. Everything about the vault lives in that dir — nothing leaks outside.
Two YAML files, both optional except where noted:
~/.rig/config.yml — rig-global prefs (default agent, qmd toggle, log rotation). Touched by rig wiki agent use.<vault>/.rig/config.yml — the only place per-vault settings live. Auto-created by rig wiki init. Safe to edit by hand.No global registry. No package.rig.json5 wiki block (that file is for legacy rig CICD, unrelated).
assets.terncloud.com/rig/models/.~/.cache/qmd/models/; subsequent runs are instant.~/.rig/<project>/wiki/<wiki-name>.sqlite (sqlite-vec extension). <project> is resolved from the nearest package.json#name walking up from the vault root (legacy ~/.rig/cache/qmd/<wiki>.sqlite migrates on first open). Machine-local cache, no need to gitignore inside the vault.ingest triggers incremental embed at the end — no need to manually call index in routine use.rig wiki ingest and rig wiki query --synth invoke Claude Code (claude -p) under the hood. If the user picks a different agent in ~/.rig/config.yml (wiki.defaultAgent), it's used instead. Only claude is implemented in v1.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub flashhand/rig