Wiki Ingest

作者 sanyuan070408b6572ef108無授權條款3.9K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 個月前更新

Compile articles, documents, or notes into a structured wiki knowledge base. Use when user says 'ingest to wiki', 'compile to knowledge base', 'update wiki', 'wiki ingest', 'add this to wiki', or invokes /wiki-ingest. Supports single or batch ingest. Triggers: wiki, ingest, knowledge base, compile, digest, index, catalog.

AI 產生的概覽

將文章、文件或筆記編譯成具交叉參照的結構化 wiki 知識庫。

功能
接收貼上的文字、檔案路徑或目錄,將知識實體擷取為概念、產品、模式和比較等獨立 wiki 頁面。它會建立或更新頁面、維護交叉參照,並更新 index.md 和 log.md。最後回報建立了哪些頁面、更新了哪些頁面,以及建立了哪些連結。
適用情境
當使用者要求將內容匯入 wiki、把素材編譯成知識庫或更新現有 wiki 時使用。適合文章、文件與筆記的單次或批次匯入。
執行需求
沒有指令碼,只有指示。它會在 wiki 目錄(預設為 wiki/)中讀寫檔案,並載入 references/page-templates.md 取得頁面範本。不需要憑證或網路存取。

Wiki Ingest — Knowledge Base Compiler

Compile any text content (articles, documents, notes) into structured wiki pages with cross-references, building a searchable, interconnected knowledge network.

IRON LAW: One wiki page = one knowledge entity. Never cram multiple concepts into one page.

Wiki Directory Structure

Wiki defaults to wiki/ under the current project root. User may specify a different path.

wiki/├── index.md              # Full table of contents├── log.md                # Append-only operation log├── concepts/             # Core concept pages├── products/             # Product/tool entity pages├── patterns/             # Engineering patterns & design decisions└── comparisons/          # Cross-topic comparison pages

Workflow

1. Confirm Input

Accept user-specified content source:

  • Pasted text directly
  • File path(s) (md, txt, pdf, etc.)
  • Directory path (batch processing)

If user doesn't specify a wiki path, use wiki/. Create the directory if it doesn't exist.

2. Check Existing Wiki

Read wiki/index.md (if exists) to understand existing pages and avoid duplicates.

3. Extract Knowledge Entities

Extract from content:

  • Concepts (concepts/): Abstract ideas, terminology, theories
  • Products (products/): Specific products, tools, services
  • Patterns (patterns/): Engineering patterns, design decisions, methodologies
  • Comparisons (comparisons/): Cross-product or cross-approach analysis

Extraction threshold: An entity deserves its own page only if it would be referenced by other pages.

4. Create or Update Pages

Each entity maps to one wiki page.

→ Load references/page-templates.md [blocked] for page templates.

Rules:

  • If page already exists → update it, append new information, don't overwrite existing content
  • Keep the one-line definition stable unless the new content provides a clearly better one
  • Prioritize updating "Sources" and "Related Pages" sections

5. Update Cross-References

Check all existing wiki pages. If new content involves concepts referenced in other pages:

  • Update their Related Pages list
  • Update their Sources list
  • Supplement new information in their detail sections

6. Update index.md

Add new page entries to wiki/index.md, organized by category.

7. Append to log.md

Append to wiki/log.md:

markdown
## YYYY-MM-DD: Ingest <source title>
**Source**: <file path or "user input">**New pages**: list newly created pages**Updated pages**: list modified pages**New cross-references**: list newly established links

8. Report Results

Tell user: what pages were created, what pages were updated, what new cross-references were established.

File Naming

  • All lowercase, hyphen-separated: agent-loop.md, kv-cache.md
  • Name by entity, not by number

Cross-Reference Format

  • Use [[category/page-name]] double-link format (Obsidian-compatible), e.g. [[concepts/agent-loop]], [[products/claude-code]]
  • Always include the category prefix to avoid ambiguity across directories
  • List all related pages at the bottom of each page

Guidelines

  • Never create duplicate pages — always check wiki/ first
  • Don't extract trivial entities — if a concept appears once and won't be referenced elsewhere, skip it
  • For batch processing: extract all entities first, then create pages and update references in one pass to avoid inconsistent intermediate states
  • Always update index.md and log.md after every ingest

來源與署名

來源:sanyuan0704/sanyuan-skills位於skills/wiki-ingest提交08b6572

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架