docs: 清理全局 CLAUDE.md,详细用法移至 skills/llmwiki

- 全局 CLAUDE.md: 删除详细 wiki 内容,只保留简短引用
- skills/llmwiki/SKILL.md: 添加详细用法(查询规则、知识管理流程)
- 在 llmwiki 条目中添加 location 信息

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 15:19:07 +08:00
parent f87aad52db
commit d1e3c660b8
+90 -27
View File
@@ -8,6 +8,13 @@ trigger: 当用户查询知识库、优秀实践,总结经验、或管理 wiki
LLM 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 工具 ## MCP 工具
后台自动调用,无需手动: 后台自动调用,无需手动:
@@ -70,22 +155,6 @@ LLM Wiki 是你的持久化知识库,支持跨会话记忆、自动索引、
| **P2** | `graph-colorize` | 着色 Obsidian 图形 | | **P2** | `graph-colorize` | 着色 Obsidian 图形 |
| **P2** | `wiki-agent` | 录入 agent 历史 | | **P2** | `wiki-agent` | 录入 agent 历史 |
## Wiki 结构
```
wiki-vault/
├── practices/ # 最佳实践、经验教训
├── concepts/ # 概念、思维模型
├── entities/ # 人物、公司、工具
├── projects/ # 项目文档
├── skills/ # 如何做教程
├── references/ # 外部资料摘要
├── synthesis/ # 跨项目分析
├── journal/ # 日常笔记
├── index.md # 主索引
└── hot.md # 热门内容
```
## Frontmatter 模板 ## Frontmatter 模板
```yaml ```yaml
@@ -99,15 +168,9 @@ metadata:
--- ---
``` ```
## 相关命令 ## 注意
```bash - Wiki 可以从**任何项目目录**使用(不只是 obsidian-wiki
# 查询 wiki - 所有 wiki 页面使用 `[[wikilinks]]` 进行交叉引用
/wiki-query "关键词" - 页面有生命周期标记: `draft`, `verified`, `archived`, `disputed`
- 陈旧页面(>90 天)会在查询结果中标注
# 重建索引
/wiki-rebuild
# 健康检查
/wiki-lint
```