tiangong-wiki-skill
Wiki Skill
Core Goal
Use the local wiki as the durable knowledge layer — not just for the current conversation, but for all future work. Query first, then read or edit the Markdown files that remain the source of truth.
CLI Entrypoint
Use tiangong-wiki <command> on macOS, Linux, WSL, and Git Bash.
On Windows native shells such as PowerShell, Command Prompt, background daemon tasks, or Codex worker automation, use the npm command shim explicitly:
tiangong-wiki.cmd doctor
tiangong-wiki.cmd sync
tiangong-wiki.cmd lint --format json
Do not invoke the suffixless tiangong-wiki executable from Windows native shells. npm also installs that shebang script for POSIX-like environments, but Windows may treat it as an unknown file and open the "choose an app" dialog instead of executing the CLI.
When to Use
Activate this skill in three scenarios:
1. Knowledge Retrieval
You need historical knowledge, methods, behavioral patterns, or prior decisions before answering or acting.
Trigger: The current task could benefit from previously captured insights, or the user asks about something that may already exist in the wiki.
Minimal steps:
- Choose a retrieval strategy based on what you know:
- Know the type, tag, or metadata →
tiangong-wiki find - Have a keyword or short phrase →
tiangong-wiki fts - Fuzzy intent, embeddings configured →
tiangong-wiki search - Need graph context or related pages →
tiangong-wiki graph
- Know the type, tag, or metadata →
- Inspect the best candidate with
tiangong-wiki page-info <id>. - Read the Markdown file if you need full content.
Stop when: you have enough context to proceed, or no relevant pages exist.
2. Knowledge Capture
A conversation, task, or other skill produced a high-value insight, method, correction, or piece of information worth preserving.
Trigger: You recognize durable knowledge — something that would be useful to retrieve in a future context.
Two paths:
-
Direct page creation — when you can clearly identify the page type and structure the content yourself:
- Search for existing pages to avoid duplicates (
find,fts, orsearch). - Discover the ontology:
tiangong-wiki type recommend --text "<summary>" --keywords "a,b,c" --format json. - Update an existing page if one covers the same knowledge object. Create a new page only when the object is distinct.
- After writing:
tiangong-wiki sync --path <page-id>thentiangong-wiki lint --path <page-id> --format json.
- Search for existing pages to avoid duplicates (
-
Save to vault — when the material is raw, complex, or needs further processing:
- Save the file to
vault/. - The vault-to-wiki workflow will handle triage and page creation.
- See
references/vault-to-wiki-instruction.mdfor the full decision model.
- Save the file to
Key rules:
- Do not assume any page type is the default destination. Always discover via CLI.
- Prefer updating the best existing page over creating near-duplicates.
- Only use frontmatter fields declared by the chosen type (
tiangong-wiki type show <type>). Do not invent ad-hoc fields. - Preserve provenance with
sourceRefsand type-specific source fields.
3. Knowledge Maintenance
You discover that existing wiki content is outdated, incorrect, or incomplete during retrieval or conversation.
Trigger: A retrieved page contains stale information, or new evidence contradicts existing content.
Minimal steps:
- Locate the page:
tiangong-wiki findortiangong-wiki page-info <id>. - Edit the Markdown file — keep edits minimal and provenance-preserving.
- After editing:
tiangong-wiki sync --path <page-id>thentiangong-wiki lint --path <page-id> --format json.
For systematic maintenance (health checks, orphan cleanup, stale content review), see references/wiki-maintenance-instruction.md.
References (read on demand)
| Document | Read when... |
|---|---|
references/cli-interface.md |
You need full command options, flags, or output format details |
references/vault-to-wiki-instruction.md |
Processing vault files into wiki pages |
references/wiki-maintenance-instruction.md |
Running systematic maintenance or health checks |
references/template-design-guide.md |
Designing a new page type or evolving an existing template |
references/troubleshooting.md |
Environment setup, configuration issues, or error diagnosis |
Assets
assets/wiki.config.default.json— default configuration templateassets/templates/— Markdown page templates for each registered type