dianel555/dskills/agent-wiki
Claude Code and agent skill by dianel555/dskills
- community
Checking that the SKILL.md file is still in the repository.
Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.
Install
npx vskill@latest install dianel555/dskills/agent-wikiSKILL.md
agent-wiki
增量式 Obsidian 笔记仓库 Wiki 生成器,为 LLM 优化的知识库管理工具。
Prerequisites
References (load on demand)
Detailed specs live under references/ in this skill directory — read them only when the task needs them:
| File | Read when | |
|---|---|---|
references/cli-matrix.md | Need a subcommand's exact inputs or JSON output shape | |
references/topic-authoring.md | Authoring/enriching topic pages (type taxonomy, per-type section templates, conflict convention, quality metric detail) | |
references/homepage.md | Working on wiki/index.md (layout templates, managed cards, MCP → file write decision chain, optional CSS) | |
references/site-export.md | Running/debugging gen-site (design system, page anatomy, determinism guarantees) | |
references/index-schema.md | Consuming/producing index or frontmatter fields (full .wiki-index.json schema, Bases views, capture contract) |
Execution
The skill provides a Python CLI with the following subcommands:
Vault Path Resolution: Use --vault PATH or set environment variable AGENT_WIKI_VAULT. This is the agent-wiki source scope, which may be the registered Obsidian root or a child directory. Each scope owns its own wiki/; multiple scopes can coexist in one registered Obsidian vault. Paths in topic frontmatter/cache are relative to the selected scope.
CLI Command Matrix
All commands emit JSON on stdout and JSON errors on stderr with a non-zero exit code. Per-command inputs and output shapes: see references/cli-matrix.md.
Agent Workflow
Intent Routing
Before any action, classify the user request into one of two modes. Default to Answer mode.
| Trigger Signal | Mode | Action | Output | |
|---|---|---|---|---|
| User is asking / seeking explanation / requesting lookup on a topic ("what is…", "compare…", "help me find…") — and NOT requesting wiki building | Answer (default) | Follow Hybrid Retrieval Protocol to answer → optionally save-report as a report | wiki/queries/<name>.md (kind: query), does NOT create/modify topics | |
| User explicitly requests "build / import / ingest / update / maintain wiki", or "create topics from these notes", or points to a vault/directory to be ingested | Ingest/Maintain | Follow Standard / Batched Ingest or Bounded Enrichment | wiki/topics/<name>.md (kind: topic) |
Rules:
- Reports are the default output. A regular question never triggers topic generation — unless the user explicitly requests wiki building/maintenance, or explicitly says "make it a topic page".
- Topics are only produced in Ingest/Maintain mode: when ingesting source notes, batch ingesting, or maintaining/enriching existing topics.
- When uncertain which mode applies, treat as Answer and produce a report directly; confirm if wiki building is actually needed.
- Answer mode can read topics/index for retrieval (read-only), but does NOT write topics.
Standard Ingest Loop
- Scan: Run
scanto get new/modified/deleted sources - Process each source:
- For
new/modified: Read source → generate/update enriched topic pages →cache-put - For
deleted: Runcleanup(handles topic frontmatter update and archival)
- Refresh retrieval index: Run
indexto rebuildwiki/.wiki-index.jsonfrom topic frontmatter - Refresh views: Run
gen-baseto (re)write the Bases views (this also rebuilds the index), then updatewiki/index.mdwith topic summaries and embed![[index.base#主题总览]] - Log: Append to
wiki/log.md
Batched Ingest (large vaults)
To avoid loading the whole vault at once, process sources in bounded rounds:
- Plan: Run
plan --batch-size 20once. It scans, splits the pending sources into rounds of at most N, and writes a checklist report towiki/_archived/ingest-tasks.md. - Process one round: Read only the docs in the current batch, author/update their topic pages, and
cache-puteach one. Do not read ahead into later batches. - Confirm the round: Run
batch-done --batch <id>. It refuses (batch_incomplete, listingmissingdocs) until every doc in the batch is cached, then marks the batch[x]and returnsremainingbatch ids. - Repeat for each
remainingbatch untilcompleteistrue. - Finish: Run
cleanup(if any deletions), thengen-base, and log as usual.
status reports batch progress under batch. Re-running plan re-derives batches from the current scan — already-ingested docs drop out automatically.
Bounded Enrichment Loop
After initial ingest, maintain topics incrementally without scanning the entire vault:
- Check worklist: Run
worklistfor two bounded queues:wanted(broken wikilink targets ranked by inbound demand) andstale(low-qualitystub/basicor index-stale topics)
Understanding `wanted` (Broken Wikilinks): These are wikilink targets referenced by wiki/topics/ pages but not yet created as dedicated topic pages. Not an error — most point to source notes in the vault root or other directories outside wiki/. They work as jump links in Obsidian; the "broken" label only means no dedicated topic page exists. Use as demand signal: inbound count shows reference frequency → prioritize high-demand sources (≥3) for enrichment.
- Pick one page: Select a single target from
wanted(create new topic) orstale(enrich existing) - Enrich the page: Read relevant sources, author/update the topic body and frontmatter
- Re-index: Run
index(recomputes quality tiers, backlinks, alias resolution) - Repeat: Run
worklistagain for the updated queue
One page per iteration keeps context bounded; as topics improve, they drop out of stale automatically. status reports wanted_count and stale_count for progress tracking.
Quality Tiering
Topics get a five-tier rating (stub / basic / standard / rich / premium) from structural metrics of the markdown body (sections, evidence lines, script-fair prose weight, images, lead sentence — see references/topic-authoring.md for metric definitions).
Effective prose with source grounding: effective_prose = prose_weight + 500 × unique_source_count — each deduplicated source reference adds a grounding bonus.
Tier gates (top-down first-match):
- premium: sections ≥ 6 AND effective_prose ≥ 3000 AND evidence_lines ≥ 3
- rich: sections ≥ 4 AND effective_prose ≥ 1500 AND (evidence_lines ≥ 1 OR has_image)
- standard: sections ≥ 2 AND effective_prose ≥ 600
- basic: (effective_prose ≥ 200 AND prose_weight > 0) OR sections ≥ 1
- stub: otherwise
Usage: quality reports structural completeness, not scientific truth. worklist flags stub/basic topics as stale and reports source-backed pages in review; index recomputes tiers on every rebuild. The formula is deterministic and monotonic — quality and index apply the same source-grounding bonus.
Authors Backfill
When source notes carry a 作者: metadata row: aggregate-authors resolves each topic's sources to root notes and returns the deduplicated first author per topic (read-only). Write the returned lists into each topic's authors frontmatter, then rebuild via index/gen-base. Use extract-authors to inspect raw rows when a result looks off.
Report Capture (research reports)
Persist valuable Agent research reports as first-class, cross-linkable wiki nodes. Capture is passive: the Agent authors the page, then registers it — the CLI writes no prose. This is the default landing spot for Answer mode output.
- Author the page directly under
wiki/queries/<name>.md, with topic-compatible frontmatter (title,sources[may be empty],last_updated, optionalsummary/keywords,citekey/doi/library_id, andreview_status/reviewed_at). Preserve any[[wikilinks]]/![[embeds]]verbatim. For a repeatable literature review, start fromtemplates/query/research.md. - Register it: run
save-report <name>. The CLI ensures thekind: querydiscriminator (directory-derived), appends a log entry, and emits the page path.<name>is sanitized to its final path component with.mdensured. - Re-ingest / cross-link: run
index(orgen-base) to pick the page up into the retrieval index underqueries. To relate a report to a topic, add a[[wikilink]]in either page body — relations are surfaced bygen-canvas.
The CLI touches only wiki/queries/ and wiki/log.md; an uninitialized wiki → wiki_not_initialized, a missing page → capture_not_found, and unparseable frontmatter fails with no write and no log entry.
Web Augmentation & Citations (Supplement when information is insufficient)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 94 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agent-wiki/SKILL.md
Popularity
- Repository stars
- 64
- Repository forks
- 6
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dianel555/dskills/agent-wiki)