Install
openclaw skills install @nemo4110/041-llm-wikiUse when Codex needs to operate an llm-wiki knowledge base: ingest source files into Markdown wiki pages, answer questions from wiki/index.md and linked pages, run agent-bridge status/lint/link/relink/merge/query/index tasks, preserve provenance and temporal metadata, or use Zotero as a literature-d
openclaw skills install @nemo4110/041-llm-wikiTreat the LLM as the programmer and the wiki as the codebase. The user provides materials and judgment; the Agent extracts durable knowledge, preserves provenance, maintains links, and keeps the Markdown wiki structurally consistent.
Keep this file as the operational skill. Use README.md for user-facing overview, AGENTS.md / CLAUDE.md for the full protocol, and ROADMAP.md for project plans.
AGENTS.md or CLAUDE.md when the task touches wiki behavior, source handling, or ingest/query protocol..venv\Scripts\python.exe on Windows, .venv/bin/python on Unix, or uv run python when configured.<PY> scripts/agent-bridge.py check before wiki operations. If it reports missing dependencies, state the exact blocker and continue only with tasks that do not require the unavailable runtime.sources/: never write Agent-generated summaries, drafts, or speculative content there. Only user-provided files or verified network/Zotero fetches may be source assets.git status --short before editing. Do not revert user changes.| Task | Use | Notes |
|---|---|---|
| Status, lint, link discovery, relink, merge, semantic query, embedding index | scripts/agent-bridge.py | Algorithmic tasks. Prefer dry-run before writing. |
| Ingest source material | Protocol mode | Requires LLM judgment: read source, extract metadata, create/update pages. |
| Answer wiki questions | Protocol mode | Read wiki/index.md, relevant pages, and link neighbors; synthesize with [[PageName]] citations. |
| Apply relation updates | Hybrid | Let agent-bridge.py discover candidates, then review and merge only safe changes. |
Agent Bridge quick commands:
<PY> scripts/agent-bridge.py check
<PY> scripts/agent-bridge.py status
<PY> scripts/agent-bridge.py lint
<PY> scripts/agent-bridge.py link --source "PageName" --mode light
<PY> scripts/agent-bridge.py merge --source "NewPage" --target "OldPage" --strategy append_related --dry-run
<PY> scripts/agent-bridge.py relink --since 2026-04-20 --mode deep --dry-run
<PY> scripts/agent-bridge.py index
<PY> scripts/agent-bridge.py query "question" --semantic
Use legacy python -m src.llm_wiki ... only for human scripting or debugging. Do not use the legacy CLI as a substitute for LLM judgment during ingest.
agent-bridge.py lint reports Shallow Pages as warning-only findings. The detector excludes related-page, source, and changelog sections, then combines normalized knowledge size, paragraph and section structure, local text-source volume, source count, and compression ratio. QRF is skipped by default; lint_depth: skip is reserved for deliberately concise pages whose source-coverage audit explains the exemption.
A clean depth result is not proof of source coverage. Re-read allocated sources and account for important mechanisms, equations, evidence, comparisons, procedures, failure modes, trade-offs, and decision rules. Never pad a page mechanically to satisfy a threshold.
wiki/index.md and log.md.Source maps and coverage notes are temporary Agent working state. Keep them outside sources/; retain them under temp/ only when the user requests an ingest audit or experiment.
Never treat created or updated as publication dates. They are wiki maintenance dates only.
wiki/index.md first.[[PageName]].wiki/*.md stem by the end of ingest.[[AI-Coding-Workflow|AI Coding Workflow]].Use Zotero as the literature layer and llm-wiki as the distilled Markdown knowledge layer. A recommended public Zotero skill source is:
https://github.com/openai/plugins/tree/main/plugins/zotero/skills/zotero
When an Agent has that skill, or an equivalent Zotero-capable skill, it can search the local Zotero library, list collections/tags, export BibTeX/citations, read attachment paths or indexed full text on request, and import BibTeX/RIS records after confirmation.
Before any Zotero operation, verify a Zotero-capable MCP/tool is available and can access the target library. For read workflows, confirm collection search, item metadata, and attachment path/fulltext access work. For write workflows, confirm the exact capability is supported before acting: child note create/update, incremental tag update, and related-item linking are separate gates. If Zotero Desktop, MCP access, or write capability is unavailable, report the blocker and continue only with wiki-local work.
For llm-wiki, Zotero results are source discovery and provenance. Preserve Zotero identifiers in frontmatter when available:
sources_meta:
- title: "Paper Title"
type: "academic_paper"
published: "2025-02"
collected: "2026-05-24"
ingested: "2026-05-24"
date_precision: "month"
zotero_item_key: "ABCD1234"
citation_key: "author2025title"
library_id: "0"
zotero_uri: "zotero://select/items/ABCD1234"
Do not build a native llm-wiki Zotero client unless repeated manual workflows prove the need. Arbitrary document upload or attachment management is not part of the verified llm-wiki workflow.
Use Zotero item keys and attachment keys as cross-device stable identifiers. Store private Zotero source bindings in sources/zotero/metadata.yaml; this file is user-local/private and must not be committed. Treat sources/zotero/ as a generated local symlink cache. Agents may use scripts/zotero_sources.py --dry-run to preview and scripts/zotero_sources.py to materialize aliases declared in that metadata.
sources/zotero/metadata.yaml may contain local absolute paths because it is private operational metadata, not shared wiki content. Do not write LLM-generated summaries, drafts, or synthesized knowledge into sources/zotero/ or its metadata. Keep generated knowledge in wiki/.
For Zotero-backed ingest:
sources/zotero/metadata.yaml.sources/zotero/... symlinks with scripts/zotero_sources.py.zotero_item_key, zotero_attachment_key, library_id, and zotero_uri in page frontmatter when available.llm-wiki:* / rel:* tags and related-item links.After any network fetch, verify before ingest:
%PDF.If verification fails, do not create source-derived wiki pages. Record the failure in log.md when appropriate and ask the user for a correct source.
scripts/read_pdf.py; fall back to OCR only when necessary.Prefer the project-managed Python environment: .venv, uv run, or the configured conda environment. Do not use global pip casually.
For documentation-only edits, run:
git diff --check -- <changed-files>
For wiki/runtime operations, also run the relevant agent-bridge.py command (check, lint, link, merge --dry-run, status, or query) and report exact blockers if dependencies are missing.
For code changes, run the focused pytest target or the full suite when the change touches shared behavior:
.venv\Scripts\python.exe -m pytest tests/
End by summarizing changed files, verification output, and any skipped checks with the reason.