当前位置: 首页 > Skill >

基于wiki的知识库系统

基于wiki的知识库系统

1.0.1 2026.11.22 浏览:772
获取Skill文件查看使用说明
作者:苏澄许可证:
本文目录展开

LLM Wiki Skill

Transform your LLM into a knowledge base maintainer. Instead of just retrieving from raw documents, the LLM incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files.

Core Philosophy

The wiki is a persistent, compounding artifact. The cross-references are already there. The contradictions have already been flagged. The synthesis already reflects everything you've read. The wiki keeps getting richer with every source you add and every question you ask.

Three-Layer Architecture

wiki-project/
├── raw/                        # Layer 1: Source documents (immutable)
│   ├── articles/
│   ├── papers/
│   └── assets/
├── wiki/                       # Layer 2: LLM-maintained knowledge base
│   ├── index.md                # Content index
│   ├── overview.md             # Synthesis overview
│   ├── entities/               # Entity pages (people, orgs, products)
│   ├── concepts/               # Concept pages (ideas, theories, methods)
│   ├── sources/                # Source summaries
│   └── comparisons/            # Comparison analyses
├── log.md                      # Chronological activity log
└── WIKI.md                     # Layer 3: Schema configuration

Core Operations

1. Ingest Operation

When to use: User adds a new source document and wants it integrated into the wiki.

Workflow:

1. Read the source document from raw/
2. Discuss key takeaways with user (if interactive mode)
3. Create/update source summary in wiki/sources/
4. Extract and update entity pages in wiki/entities/
5. Extract and update concept pages in wiki/concepts/
6. Update wiki/index.md with new entries
7. Append entry to log.md

Interactive vs Batch Mode:

  • Interactive (important sources): Pause after reading source, discuss with user, get guidance on emphasis
  • Batch (secondary sources): Process autonomously without user interaction

Configure mode in WIKI.md:

workflow:
  default_mode: interactive  # or batch
  batch_threshold: 3  # Process N sources at once when batch mode

Ingest Checklist:

  • Source summary created/updated
  • Entities extracted and pages updated
  • Concepts extracted and pages updated
  • Cross-references added ([[page-name]] syntax)
  • Frontmatter metadata added
  • index.md updated
  • log.md appended

2. Query Operation

When to use: User asks a question against the wiki.

Workflow:

1. Read wiki/index.md to locate relevant pages
2. Read relevant wiki pages
3. Synthesize answer with citations
4. (Optional) Write answer back to wiki as new page

Key Insight: Good answers can be filed back into the wiki as new pages. A comparison you asked for, an analysis, a connection you discovered — these are valuable and shouldn't disappear into chat history.

Output Formats:

  • Markdown page (default)
  • Comparison table
  • Marp slide deck (if requested)
  • Chart/visualization (if appropriate)

Write-back Decision: Ask user: "Should I save this analysis to the wiki?" If yes, file under appropriate directory.

3. Lint Operation

When to use: Periodic health checks, or when user asks to check wiki health.

Workflow:

1. Iterate through all wiki pages
2. Check for issues:
   - Contradictions between pages
   - Stale claims (newer sources supersede older ones)
   - Orphan pages (no inbound links)
   - Missing pages (referenced but don't exist)
   - Incomplete cross-references
   - Data gaps
3. Generate health report
4. Suggest fixes and new sources to seek

Lint Report Format:

# Wiki Health Report - [DATE]

## Issues Found

### Contradictions
- [[entities/org-a]] claims X, but [[sources/report-b]] says Y

### Orphan Pages
- [[concepts/isolated-idea]] has no inbound links

### Missing Pages
- [[entities/referenced-person]] referenced but doesn't exist

### Data Gaps
- No sources on [topic] since [date]

## Recommendations
1. Resolve contradiction in org-a by...
2. Add cross-references to isolated-idea from...
3. Create page for referenced-person using...
4. Search for recent sources on [topic]

File Conventions

Page Metadata (YAML Frontmatter)

---
title: Page Title
type: entity|concept|source|comparison
created: 2026-04-07
updated: 2026-04-07
sources: [source-id-1, source-id-2]
tags: [tag1, tag2]
related: [[related-page-1]], [[related-page-2]]
---

Index Format (wiki/index.md)

# Wiki Index

## Overview
- [[overview]] - Synthesis of all knowledge

## Entities
- [[entities/person-a]] - Brief description
- [[entities/org-b]] - Brief description

## Concepts
- [[concepts/key-idea]] - Brief description

## Sources
- [[sources/article-1]] (2026-04-01) - Brief description

## Comparisons
- [[comparisons/x-vs-y]] - Brief description

Log Format (log.md)

## [2026-04-07 10:30] ingest | Article Title
- Added source: [[sources/article-title]]
- Updated entities: [[entities/person-a]], [[entities/org-b]]
- Created concept: [[concepts/key-idea]]
- Cross-references: 5 added

## [2026-04-07 11:00] query | What is X?
- Created comparison: [[comparisons/x-comparison]]

## [2026-04-07 14:00] lint | Health check
- Issues: 1 contradiction, 2 orphans
- Fixed: 1 orphan (added cross-references)

Parsing Tip: Each entry starts with ## [DATE TIME] operation | Title, making it grep-friendly.

Tool Integration

qmd Search Engine

For large wikis (>100 sources), use qmd for search instead of index.md.

# Search wiki pages
qmd search "query text" --path wiki/

# With re-ranking
qmd search "query text" --path wiki/ --rerank

Read references/qmd-integration.md for setup instructions.

Obsidian Integration

Dataview Queries: Use YAML frontmatter for dynamic queries.

TABLE type, created, sources
FROM "wiki/entities"
WHERE contains(tags, "important")
SORT created DESC

Graph View: Visualize wiki connections in Obsidian.

Read references/obsidian-workflow.md for detailed setup.

Marp Slide Decks

Generate presentations from wiki content:

---
marp: true
---

# Title Slide

Content from wiki...

---

# Next Slide

More content...

Workflow Modes

Interactive Mode (Important Sources)

User: "Here's an important report, ingest it"
Agent: 
1. Reads source
2. "Key findings: [summary]. Should I emphasize anything specific?"
3. [User guidance]
4. Creates/updates wiki pages
5. Shows summary of changes

Batch Mode (Secondary Sources)

User: "Ingest these 5 articles"
Agent:
1. Reads all sources
2. Processes autonomously
3. Reports: "Ingested 5 sources. Created 3 entity pages, updated 7 concept pages."

Mixed Mode (Default)

Configure in WIKI.md:

workflow:
  mode: mixed
  interactive_keywords: [important, key, critical, flagship]
  # Sources with these keywords trigger interactive mode

References

  • references/wiki-architecture.md - Detailed architecture explanation
  • references/page-templates.md - Page structure templates
  • references/lint-rules.md - Health check rules
  • references/qmd-integration.md - Search engine setup
  • references/obsidian-workflow.md - Obsidian setup guide

Templates

  • templates/entity-page.md - Entity page template
  • templates/concept-page.md - Concept page template
  • templates/source-summary.md - Source summary template
  • templates/comparison-table.md - Comparison page template
  • templates/WIKI.md - Schema configuration example

Scripts

  • scripts/wiki-init.py - Initialize a new wiki project

Quick Start

  1. Initialize wiki project:

    python scripts/wiki-init.py /path/to/project
    
  2. Configure WIKI.md for your domain

  3. Add sources to raw/ directory

  4. Ingest first source:

    "Ingest raw/articles/first-article.md"
    
  5. Query wiki:

    "What do we know about [topic]?"
    
  6. Check health:

    "Run a lint check on the wiki"
    

Best Practices

  1. One source at a time for important content (interactive mode)
  2. Batch similar sources for efficiency (news updates, routine reports)
  3. Write back good queries — don't let insights disappear
  4. Lint weekly — catch issues before they compound
  5. Use tags consistently — enables Dataview queries
  6. Keep sources in raw/ immutable — wiki is the mutable layer
  7. Git commit after each ingest — version history is free

The Key Difference

Most RAG systems retrieve from raw documents on every query. Nothing accumulates.

LLM Wiki compiles knowledge once and keeps it current. Every source and every query makes the wiki richer.

The human's job: Curate sources, direct analysis, ask good questions.

The LLM's job: Everything else — summarizing, cross-referencing, filing, bookkeeping.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,040
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,033
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,021
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,021
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,019
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,016
Skill 文件
  • SKILL.md
    • LLM Wiki Skill
    • Core Philosophy
    • Three-Layer Architecture
    • Core Operations
      • 1. Ingest Operation
      • 2. Query Operation
      • 3. Lint Operation
    • File Conventions
      • Page Metadata (YAML Frontmatter)
      • Index Format (wiki/index.md)
      • Log Format (log.md)
    • Tool Integration
      • qmd Search Engine
      • Obsidian Integration
      • Marp Slide Decks
    • Workflow Modes
      • Interactive Mode (Important Sources)
      • Batch Mode (Secondary Sources)
      • Mixed Mode (Default)
    • References
    • Templates
    • Scripts
    • Quick Start
    • Best Practices
    • The Key Difference
  • 项目或源文件

相关 Skill

更多
test2333 test2333 Use this skill when the user wants information from an avatar's personal knowledge base (PKM), such as remembered notes, uploaded files, or avatar-specific reference material.
Knowledge Management Knowledge Management 按内容类型(研究、决策、洞察、经验、模式、项目、参考、教程等)将OpenClaw知识条目归类到本地文件夹中
用 LLM 构建持续积累的知识库 用 LLM 构建持续积累的知识库 Build, maintain, query, archive, and audit a Markdown / Obsidian knowledge Wiki continuously maintained by an LLM. Use this skill to initialize a personal knowledge base; import raw materials grouped by source under source/ into wiki/; organize articles, papers, book notes, interviews, and meeting notes; maintain source pages, entity pages, concept pages, synthesis pages, comparison pages, and query archive pages; update index.md and log.md; answer questions based on the Wiki and archive answers
Ai Workforce Ai Workforce Turn an OpenClaw agent into an autonomous AI Chief that runs a business. Provides trust-based autonomy, structured knowledge management (bank/), worker deleg...
上市经验总结与知识管理 上市经验总结与知识管理 产品上市知识管理专家技能。当用户提出以下意图时触发: 上市复盘、上市经验总结、上市知识管理、上市项目复盘、上市经验萃取、 上市教训总结、上市案例库建设、上市知识沉淀、产品上市回顾、 上市根因分析、上市经验归档、上市最佳实践提炼、Go-to-Market复盘、 GTM经验总结、post-launch knowledge management、launch retrospective。 涵盖从上市项目全景回顾、关键成功要素萃取、问题与教训归因分析、 经验知识条目结构化归档、案例库建设与索引到知识传播与应用指引的全流程。