llm-wiki
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesellm-wiki - Persistent LLM-Maintained Markdown Wiki
llm-wiki - 由LLM维护的持久化Markdown Wiki
Keyword:·llm-wiki·obsidian wiki·research vaultknowledge baseUse this skill when the user wants knowledge to accumulate as a maintained markdown artifact, not be rediscovered from raw files on every query.
llm-wikiAGENTS.mdCLAUDE.md关键词:·llm-wiki·obsidian wiki·research vaultknowledge base当用户希望知识以维护好的Markdown制品形式积累,而非每次查询都从原始文件中重新检索时,可使用本技能。
llm-wikiAGENTS.mdCLAUDE.mdWhen to use this skill
何时使用本技能
- Bootstrap a new Obsidian or markdown vault for long-lived knowledge work
- Convert raw articles, papers, transcripts, or notes into source summaries plus cross-linked wiki pages
- Maintain and
index.mdas navigational primitives before adding heavier search infrastructurelog.md - File good answers back into the wiki instead of losing them in chat history
- Run periodic lint passes for broken links, orphan pages, stale claims, and missing synthesis pages
- Add optional helpers such as Scrapling for URL ingestion, qmd for search, or Obsidian CLI for vault automation
- 为长期知识工作搭建新的Obsidian或Markdown库
- 将原始文章、论文、文字记录或笔记转换为源文件摘要及交叉链接的Wiki页面
- 在添加更复杂的搜索基础设施前,维护和
index.md作为导航基础log.md - 将优质查询答案归档到Wiki中,而非丢失在聊天记录里
- 定期执行检查,修复断链、孤立页面、过时结论及缺失的综合页面
- 添加可选辅助工具,如用于URL导入的Scrapling、用于搜索的qmd,或用于库自动化的Obsidian CLI
Instructions
操作步骤
Step 1: Bootstrap the vault
步骤1:初始化库
Create the wiki skeleton first:
bash
bash scripts/bootstrap-vault.sh /path/to/vaultThe bootstrap creates:
- for immutable source markdown or copied files
raw/sources/ - for downloaded images and attachments
raw/assets/ - for per-source summaries
wiki/sources/ - and
wiki/entities/for durable synthesis pageswiki/concepts/ - and
wiki/queries/for filed answers and higher-value outputswiki/reports/ - ,
index.md, andlog.mdAGENTS.md
Do not skip the schema file. The schema is what makes the agent act like a disciplined maintainer instead of a generic assistant. See references/architecture.md and references/schema-playbook.md.
先创建Wiki框架:
bash
bash scripts/bootstrap-vault.sh /path/to/vault初始化操作会创建:
- 用于存储不可变的原始Markdown文件或复制的文件
raw/sources/ - 用于存储下载的图片和附件
raw/assets/ - 用于存储每个源文件的摘要
wiki/sources/ - 和
wiki/entities/用于存储持久化的综合页面wiki/concepts/ - 和
wiki/queries/用于存储归档的答案及高价值输出wiki/reports/ - 、
index.md和log.mdAGENTS.md
不要跳过Schema文件。Schema是让Agent像严谨的维护者而非通用助手工作的关键。详见references/architecture.md和references/schema-playbook.md。
Step 2: Treat AGENTS.md
or CLAUDE.md
as the operating contract
AGENTS.mdCLAUDE.md步骤2:将AGENTS.md
或CLAUDE.md
视为操作契约
AGENTS.mdCLAUDE.mdThe schema should encode the rules that stay true across sessions:
- is source of truth and must stay immutable
raw/ - plus
wiki/andindex.mdare LLM-owned working artifactslog.md - Every ingest updates the source summary, relevant synthesis pages, , and
index.mdlog.md - Every durable query answer gets filed back into or
wiki/queries/wiki/reports/ - Lint passes must look for broken links, orphan pages, stale claims, contradictions, and missing page candidates
Keep the schema short and enforceable. A small contract that the agent actually follows is better than a giant policy file nobody will reread. The starter schema from is intentionally minimal; refine it with references/schema-playbook.md.
bootstrap-vault.shSchema应编码跨会话通用的规则:
- 是事实来源,必须保持不可变
raw/ - 加上
wiki/和index.md是LLM负责的工作制品log.md - 每次导入操作都要更新源文件摘要、相关综合页面、和
index.mdlog.md - 每个持久化的查询答案都要归档到或
wiki/queries/wiki/reports/ - 检查流程必须排查断链、孤立页面、过时结论、矛盾内容及潜在的缺失页面
保持Schema简洁且可执行。一个Agent实际能遵守的小型契约,比没人会重读的巨型政策文件更有用。提供的初始Schema故意设计得极简;可通过references/schema-playbook.md进行细化。
bootstrap-vault.shStep 3: Ingest one source at a time until the workflow is stable
步骤3:一次导入一个源文件,直到工作流稳定
If the source is already local, place it in and ask the agent to process it. If the source is a URL, use the Scrapling-powered helper:
raw/sources/bash
bash scripts/ingest-url.sh /path/to/vault "https://example.com/article"
bash scripts/ingest-url.sh /path/to/vault "https://app.example.com/post" --mode fetch --wait-selector article
bash scripts/ingest-url.sh /path/to/vault "https://protected.example.com/post" --mode stealth --solve-cloudflareExpected ingest touch points:
- Save the immutable raw capture under
raw/sources/ - Create or refresh a source page under
wiki/sources/ - Update relevant entity or concept pages
- Update
index.md - Append a chronological entry to
log.md
Prefer one-source-at-a-time ingest when starting. It forces the human to inspect what the wiki changed, surface missing conventions, and refine the schema. Once the workflow is reliable, batching is fine. Use references/ingest-playbook.md for the operating checklist.
如果源文件已在本地,将其放入并请求Agent处理。如果源文件是URL,使用基于Scrapling的辅助工具:
raw/sources/bash
bash scripts/ingest-url.sh /path/to/vault "https://example.com/article"
bash scripts/ingest-url.sh /path/to/vault "https://app.example.com/post" --mode fetch --wait-selector article
bash scripts/ingest-url.sh /path/to/vault "https://protected.example.com/post" --mode stealth --solve-cloudflare导入操作的预期处理节点:
- 将不可变的原始内容保存到下
raw/sources/ - 在下创建或刷新源文件页面
wiki/sources/ - 更新相关实体或概念页面
- 更新
index.md - 向中添加按时间顺序排列的记录
log.md
开始阶段优先一次导入一个源文件。这会促使人工检查Wiki的变更,发现缺失的规范,并细化Schema。工作流稳定后再进行批量导入。操作清单详见references/ingest-playbook.md。
Step 4: Query against the wiki, not the raw pile
步骤4:针对Wiki而非原始素材堆进行查询
When answering questions:
- Read first
index.md - Open the most relevant wiki pages
- Drill into raw sources only when the wiki needs grounding or conflict resolution
- Cite page paths and raw source paths explicitly
- File durable outputs back into the vault
Create a reusable note stub for high-value answers:
bash
bash scripts/new-query-note.sh /path/to/vault "How does Company A differ from Company B?" --question "How does Company A differ from Company B?"
bash scripts/new-query-note.sh /path/to/vault "Q2 product thesis" --section reports --citation "[[wiki/concepts/product-thesis]]"Use for question-shaped outputs and for more durable synthesized artifacts such as memos, comparisons, or presentation backbones. More detail lives in references/query-and-filing.md.
wiki/queries/wiki/reports/回答问题时:
- 先阅读
index.md - 打开最相关的Wiki页面
- 仅当Wiki需要事实支撑或冲突解决时,才深入查看原始素材
- 明确引用页面路径和原始源文件路径
- 将持久化输出归档到库中
为高价值答案创建可复用的笔记模板:
bash
bash scripts/new-query-note.sh /path/to/vault "How does Company A differ from Company B?" --question "How does Company A differ from Company B?"
bash scripts/new-query-note.sh /path/to/vault "Q2 product thesis" --section reports --citation "[[wiki/concepts/product-thesis]]"使用存储问答类输出,使用存储更持久的综合制品,如备忘录、对比分析或演示文稿框架。详细说明见references/query-and-filing.md。
wiki/queries/wiki/reports/Step 5: Lint and repair the wiki periodically
步骤5:定期检查并修复Wiki
Run the local health check:
bash
python3 scripts/lint-wiki.py /path/to/vault
python3 scripts/lint-wiki.py /path/to/vault --format jsonThis script focuses on structure, not truth. It checks required files and directories, broken wiki links, and orphan pages. Use the lint output as the starting point for a human-guided cleanup pass:
- merge duplicate concepts
- promote heavily referenced ideas into their own page
- retire stale claims superseded by newer sources
- add backlinks or summary pages where the graph is too sparse
See references/maintenance-and-scaling.md for the higher-level lint checklist.
运行本地健康检查:
bash
python3 scripts/lint-wiki.py /path/to/vault
python3 scripts/lint-wiki.py /path/to/vault --format json该脚本专注于结构检查,而非内容真实性。它会检查必需的文件和目录、断链及孤立页面。以检查输出为起点,进行人工引导的清理:
- 合并重复的概念
- 将被大量引用的想法升级为独立页面
- 淘汰被新素材取代的过时结论
- 在知识图谱过于稀疏的地方添加反向链接或摘要页面
更高级别的检查清单见references/maintenance-and-scaling.md。
Step 6: Add search and automation only when scale justifies it
步骤6:仅当规模需要时才添加搜索和自动化工具
index.mdlog.md- Scrapling when URL ingestion becomes common
- qmd when the index is no longer sufficient for wiki search
- Obsidian CLI when you want shell-driven vault automation against a running desktop app
- Dataview when you start relying on frontmatter-driven tables and lists
- Git from day one for version history, branching, and reviewable diffs
Do not force embeddings, MCP, or browser automation on day one. The point of this workflow is that a simple markdown repo already compounds knowledge surprisingly well.
对于中小型库,加已足够。后续再添加更复杂的工具:
index.mdlog.md- 当URL导入变得频繁时,使用Scrapling
- 当索引不足以支撑Wiki搜索时,使用qmd
- 当需要针对运行中的桌面应用进行Shell驱动的库自动化时,使用Obsidian CLI
- 当开始依赖前置元数据驱动的表格和列表时,使用Dataview
- 从第一天起就使用Git来记录版本历史、分支和可审查的差异
不要在第一天就强制使用嵌入向量、MCP或浏览器自动化。本工作流的优势在于,一个简单的Markdown仓库就能很好地实现知识积累。
Examples
示例
Example 1: Bootstrap a fresh vault
示例1:初始化新库
bash
bash scripts/bootstrap-vault.sh ~/vaults/company-researchbash
bash scripts/bootstrap-vault.sh ~/vaults/company-researchExample 2: Capture a static article into raw sources and create a source stub
示例2:将静态文章捕获到原始素材中并创建源文件模板
bash
bash scripts/ingest-url.sh ~/vaults/company-research "https://example.com/article"bash
bash scripts/ingest-url.sh ~/vaults/company-research "https://example.com/article"Example 3: Capture a JavaScript-rendered page
示例3:捕获JavaScript渲染的页面
bash
bash scripts/ingest-url.sh ~/vaults/company-research "https://app.example.com/dashboard" --mode fetch --network-idlebash
bash scripts/ingest-url.sh ~/vaults/company-research "https://app.example.com/dashboard" --mode fetch --network-idleExample 4: Create a durable query note
示例4:创建持久化查询笔记
bash
bash scripts/new-query-note.sh ~/vaults/company-research "Why this market is consolidating" \
--question "Why is this market consolidating?" \
--citation "[[wiki/concepts/market-structure]]"bash
bash scripts/new-query-note.sh ~/vaults/company-research "Why this market is consolidating" \
--question "Why is this market consolidating?" \
--citation "[[wiki/concepts/market-structure]]"Example 5: Create a report stub instead of a query note
示例5:创建报告模板而非查询笔记
bash
bash scripts/new-query-note.sh ~/vaults/company-research "Q3 diligence memo" --section reportsbash
bash scripts/new-query-note.sh ~/vaults/company-research "Q3 diligence memo" --section reportsExample 6: Run the structure lint
示例6:运行结构检查
bash
python3 scripts/lint-wiki.py ~/vaults/company-researchbash
python3 scripts/lint-wiki.py ~/vaults/company-researchBest practices
最佳实践
- Keep immutable. Corrections belong in wiki pages or follow-up source notes, not in rewritten raw captures.
raw/ - Update and
index.mdon every ingest, query filing, and lint pass. If these drift, the whole workflow gets harder to navigate.log.md - Prefer a few strong entity and concept pages over hundreds of weak fragments. Compounding happens through synthesis, not page count.
- Read before doing expensive retrieval work. It is the simplest useful search system for moderate vault sizes.
index.md - Distinguish facts from synthesis. Source pages should be grounded; concept pages can be more interpretive.
- File good answers back into the vault. If the answer mattered once, it will probably matter again.
- Use git commits to separate ingest, query, and lint operations so the wiki stays auditable.
- Keep the schema alive. Update when you notice repeated drift or ambiguity.
AGENTS.md
- 保持不可变。修正内容应放在Wiki页面或后续的源文件笔记中,而非重写原始捕获内容。
raw/ - 每次导入、查询归档和检查操作都要更新和
index.md。如果这两个文件失效,整个工作流的导航会变得困难。log.md - 优先创建少量高质量的实体和概念页面,而非数百个零散的片段。知识积累源于综合,而非页面数量。
- 在执行昂贵的检索工作前先阅读。对于中等规模的库,它是最简单实用的搜索系统。
index.md - 区分事实与综合内容。源文件页面应基于事实;概念页面可以更具解释性。
- 将优质答案归档到库中。如果某个答案曾经有用,将来很可能再次有用。
- 使用Git提交来区分导入、查询和检查操作,确保Wiki可审计。
- 保持Schema的时效性。当发现重复的偏差或歧义时,更新。
AGENTS.md
References
参考资料
- references/architecture.md
- references/schema-playbook.md
- references/ingest-playbook.md
- references/query-and-filing.md
- references/maintenance-and-scaling.md
- scripts/bootstrap-vault.sh
- scripts/ingest-url.sh
- scripts/new-query-note.sh
- scripts/lint-wiki.py
- Karpathy gist: llm-wiki
- references/architecture.md
- references/schema-playbook.md
- references/ingest-playbook.md
- references/query-and-filing.md
- references/maintenance-and-scaling.md
- scripts/bootstrap-vault.sh
- scripts/ingest-url.sh
- scripts/new-query-note.sh
- scripts/lint-wiki.py
- Karpathy gist: llm-wiki