From d1e3c660b802302608afad03a763e5cfb11615db Mon Sep 17 00:00:00 2001 From: claude_dev Date: Fri, 3 Jul 2026 15:19:07 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B8=85=E7=90=86=E5=85=A8=E5=B1=80=20?= =?UTF-8?q?CLAUDE.md=EF=BC=8C=E8=AF=A6=E7=BB=86=E7=94=A8=E6=B3=95=E7=A7=BB?= =?UTF-8?q?=E8=87=B3=20skills/llmwiki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 全局 CLAUDE.md: 删除详细 wiki 内容,只保留简短引用 - skills/llmwiki/SKILL.md: 添加详细用法(查询规则、知识管理流程) - 在 llmwiki 条目中添加 location 信息 Co-Authored-By: Claude Opus 4.8 (1M context) --- skills/llmwiki/SKILL.md | 117 ++++++++++++++++++++++++++++++---------- 1 file changed, 90 insertions(+), 27 deletions(-) diff --git a/skills/llmwiki/SKILL.md b/skills/llmwiki/SKILL.md index e792642..ee3bc6f 100644 --- a/skills/llmwiki/SKILL.md +++ b/skills/llmwiki/SKILL.md @@ -8,6 +8,13 @@ trigger: 当用户查询知识库、优秀实践,总结经验、或管理 wiki LLM Wiki 是你的持久化知识库,支持跨会话记忆、自动索引、智能关联。 +## Wiki 位置 + +| 路径 | 用途 | 类型 | +|------|------|------| +| `/Volumes/KnowledgeBase/wiki-vault` | 编译后的 LLM Wiki (Obsidian 格式) | 生产 | +| `/Volumes/KnowledgeBase/knowledge_base` | 原始材料 | 源文件 | + ## 使用场景 ### 查询知识库 @@ -37,6 +44,84 @@ LLM Wiki 是你的持久化知识库,支持跨会话记忆、自动索引、 "发现缺失的交叉链接" ``` +## 查询触发规则 + +**BEFORE answering any question, first check wiki for existing knowledge:** + +1. **User asks "优秀实践" / "最佳实践" / "best practice"** → MUST search `practices/` first +2. **Doing research/analysis/investigation** → MUST search `practices/` for existing experience +3. **Technical selection/architecture design** → MUST search wiki for related patterns +4. **Multi-agent orchestration questions** → Check `practices/moziplus-*` first +5. **SQLite/concurrency questions** → Check `practices/sanguo-team-experience` first + +### 查询流程 + +``` +1. Read /Volumes/KnowledgeBase/wiki-vault/index.md +2. Search relevant sections (practices/, concepts/, projects/) +3. Synthesize answer with [[wikilink]] citations +4. Log query to wiki-vault/log.md +``` + +## 知识管理流程 + +``` +┌─────────────────┐ wiki-query ┌──────────────┐ +│ Problem/Decision │ ──────────────────→ │ Search Wiki │ +└─────────────────┘ └──────────────┘ + │ │ + ↓ Not found ↓ Found +┌─────────────────┐ ┌──────────────┐ +│ Research/Solve │ ←────────────────── │ Apply Answer │ +└─────────────────┘ wiki-update └──────────────┘ + │ + ↓ After solving +┌─────────────────┐ +│ wiki-update │ → Distill to wiki +└─────────────────┘ +``` + +### 何时更新 Wiki + +**DO distill to wiki:** +- Architecture decisions and *why* they were made +- Patterns discovered (things you'd Google again) +- Key abstractions and mental models +- Trade-offs evaluated and choices made +- Lessons learned not obvious from code + +**DON'T distill:** +- File listings, boilerplate +- Individual bug fixes with no broader lesson +- Dependency versions +- Implementation details code already states + +**Heuristic**: *If reading the codebase answers the question, don't wiki it. If you'd have to re-derive reasoning from git blame across 20 commits, wiki it.* + +## Wiki 结构 + +``` +/Volumes/KnowledgeBase/wiki-vault/ +├── practices/ # 最佳实践、经验教训 +├── concepts/ # 概念、思维模型 +├── entities/ # 人物、公司、工具 +├── projects/ # 项目文档 +├── skills/ # 如何做教程 +├── references/ # 外部资料摘要 +├── synthesis/ # 跨项目分析 +├── journal/ # 日常笔记 +├── index.md # 主索引 +├── log.md # 查询/更新日志 +└── wiki-instructions.md # 触发规则 +``` + +## 与项目集成 + +在任何项目中工作时: +1. **Before starting**: 检查 wiki 中是否有相关模式/实践 +2. **During work**: 在讨论中引用相关 wiki 页面 +3. **After completion**: 运行 wiki-update 蒸馏新知识 + ## MCP 工具 后台自动调用,无需手动: @@ -70,22 +155,6 @@ LLM Wiki 是你的持久化知识库,支持跨会话记忆、自动索引、 | **P2** | `graph-colorize` | 着色 Obsidian 图形 | | **P2** | `wiki-agent` | 录入 agent 历史 | -## Wiki 结构 - -``` -wiki-vault/ -├── practices/ # 最佳实践、经验教训 -├── concepts/ # 概念、思维模型 -├── entities/ # 人物、公司、工具 -├── projects/ # 项目文档 -├── skills/ # 如何做教程 -├── references/ # 外部资料摘要 -├── synthesis/ # 跨项目分析 -├── journal/ # 日常笔记 -├── index.md # 主索引 -└── hot.md # 热门内容 -``` - ## Frontmatter 模板 ```yaml @@ -99,15 +168,9 @@ metadata: --- ``` -## 相关命令 +## 注意 -```bash -# 查询 wiki -/wiki-query "关键词" - -# 重建索引 -/wiki-rebuild - -# 健康检查 -/wiki-lint -``` +- Wiki 可以从**任何项目目录**使用(不只是 obsidian-wiki) +- 所有 wiki 页面使用 `[[wikilinks]]` 进行交叉引用 +- 页面有生命周期标记: `draft`, `verified`, `archived`, `disputed` +- 陈旧页面(>90 天)会在查询结果中标注