agentsclimarketplace

Llm wiki obsidian

Skill dreamor/llm-wiki-obsidian/skills/llm-wiki-obsidian

Personal knowledge base management skill based on Karpathy's LLM Wiki pattern.

Install
npx -y skills add dreamor/llm-wiki-obsidian --skill llm-wiki-obsidian

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

基于 Karpathy LLM Knowledge Base 模式的个人知识库管理技能。通过 Obsidian CLI 与本地 Obsidian Vault 交互。核心思想:LLM 不是在查询时从原始文档重新发现知识, 而是增量构建和维护一个持久的 Wiki——结构化的、互联的 Markdown 文件集合。 当添加新资料时,LLM 会读取、提取关键信息并整合到现有 Wiki 中。 **触发条件**:用户提到知识库、Wiki、整理知识、建立知识体系、Obsidian、摄入资料、 查询知识、维护个人知识库、或讨论 Karpathy/Wiki 模式。

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

10.3 KB, ~3.3k tokens by cl100k_base, as published. Nobody here has run it

个人知识库管理技能 — llm-wiki-obsidian

基于 Karpathy LLM Wiki 模式,通过 Obsidian CLI 操作本地 Obsidian Vault。

核心思想

不是 RAG,是持久 Wiki!

RAG持久 Wiki
每次查询从原始文档重新发现知识知识被编译并持续保持最新
无积累,问5个文档的综合问题每次都要重新拼凑交叉引用已存在,矛盾已标注,综合已形成
NotebookLM、ChatGPT 文件上传Obsidian + LLM = IDE + 程序员

关键洞察:Wiki 是一个持久、复利的产物。每添加一份资料,Wiki 就变得更丰富。

人类的工作:策划来源、引导分析、提出好问题、思考意义。 LLM 的工作:其他一切(bookkeeping 工作:更新交叉引用、保持摘要最新、标注矛盾)。


何时使用此技能

当用户进行以下操作时激活此技能:

  • 构建知识库:要求建立或整理个人知识管理系统
  • Ingest(摄入):提供新资料(文章、论文、文档)要求整理到知识库
  • Query(查询):向知识库提问,寻求综合分析
  • Lint(体检):要求检查知识库的健康状况
  • 维护 Wiki:更新、修订、补充交叉引用
  • 讨论知识管理:关于如何组织知识、构建 Zettelkasten、卡片盒等方法论

架构(三层)

知识库/
├── raw/                    # 原始资料(不可变,只读)
│   ├── minimind/          # 按主题/项目分类
│   ├── articles/          # 文章
│   ├── papers/            # 论文
│   └── assets/           # 图片、附件
├── wiki/                   # LLM 生成的 Wiki(AI 全权维护)
│   ├── entities/          # 实体页(人物、组织、项目、产品)
│   ├── concepts/         # 概念页(技术概念、理论、方法论)
│   ├── sources/          # 来源摘要页
│   ├── synthesis/        # 综合分析页
│   ├── meta/             # 仪表盘(Bases Dashboard)
│   └── canvases/         # Canvas 可视化
├── index.md               # 内容目录
├── log.md                # 操作日志
└── AGENTS.md             # 规则文件

核心操作

操作详细文档说明
Ingestwiki-ingest.md摄入新资料:保存原始资料、创建来源页、更新实体/概念页
Querywiki-query.md查询知识库:搜索、读取、综合回答、沉淀新洞察
Lintwiki-lint.md健康检查:8 轮检查(死链接、孤立页面、矛盾等)
CrossLinkwiki-crosslinker.md自动跨链:检测和创建双向链接
AutoResearchautoresearch.md自主研究:3 轮搜索→抓取→综合→摄入循环

Obsidian CLI 命令参考

Vault 名称从 obsidian.json 获取,Obsidian 应用必须正在运行。

读取与搜索

# 读取笔记
obsidian read file="页面名"

# 搜索 vault
obsidian search query="搜索词" limit=10

# 查看反向链接(谁引用了此页面)
obsidian backlinks file="页面名"

# 标签统计
obsidian tags sort=count counts

# 获取每日笔记
obsidian daily:read

创建与更新

# 创建新笔记(多行用 \n)
obsidian create name="新页面" content="# 标题\n\n内容" silent

# 追加内容到现有笔记
obsidian append file="页面名" content="新段落"

# 设置属性
obsidian property:set name="status" value="done" file="我的笔记"

# 追加到每日笔记
obsidian daily:append content="- [ ] 新任务"

Vault 定位

# 指定 vault(当多 vault 时)
obsidian vault="个人知识库" search query="关键词"

实用标志

  • silent — 不打开文件
  • --copy — 复制输出到剪贴板
  • overwrite — 覆盖已存在的文件

页面模板

页面模板有两个来源:

Obsidian Templater 模板(_templates/

安装 Templater 插件后,新建笔记时自动填充 frontmatter:

模板用途路径
Entity实体页_templates/Entity.md
Concept概念页_templates/Concept.md
Source来源页_templates/Source.md
Synthesis综合分析页_templates/Synthesis.md

操作文档中的模板

LLM 创建页面时参考的详细模板:


关键原则

  1. Raw sources immutableraw/ 是只读的,绝不修改
  2. LLM owns wiki — 自动创建、更新、维护 Wiki
  3. Cross-reference everything — 双向 [[wikilinks]]
  4. Flag contradictions — 发现矛盾时用 Obsidian callout 标注:> [!contradiction] 与 [[X]] 矛盾
  5. Keep index current — 每次变更后更新 index.md
  6. Append to log — 每次操作记录到 log.md

index.md 格式

# 📚 个人知识库索引

## 最近更新
- [[页面名]] - 一句话描述 (2026-04-17)

## 实体
| 页面 | 摘要 | 来源 | 更新 |
|------|------|------|------|

## 概念
| 页面 | 摘要 | 来源 | 更新 |
|------|------|------|------|

## 来源
| 页面 | 摘要 | 日期 |
|------|------|------|

log.md 格式(追加到每日笔记)

## [2026-04-17] ingest | 资料标题
- 创建 wiki/sources/页面.md
- 更新 3 个实体页、2 个概念页
- 更新 index.md

## [2026-04-17] query | 用户问题
简要回答,涉及的页面

## [2026-04-17] lint
发现的问题,解决的孤立页面

实用技巧

Obsidian Web Clipper

浏览器扩展,将网页文章转 Markdown,快速获取资料到 raw/。

搜索增强

  • 小 Wiki(<100 页):index.md + obsidian search 足够
  • 增长中的 Wiki:使用 qmd CLI(BM25 + 向量搜索 + LLM 重排)

插件推荐

  • Dataview:查询页面 frontmatter,生成动态表格
  • graph view:查看 Wiki 结构,发现孤立页面
  • Marp:从 Markdown 生成幻灯片
  • Obsidian CLI:内置 CLI(1.9+),需在 obsidian.json 启用

Git 版本控制

Wiki 就是 Git 仓库,可以获得版本历史、分支和协作能力。

Bases Dashboard(Obsidian 1.9.10+)

打开 wiki/meta/dashboard.base 可查看知识库概览:

  • 按类型分视图(实体、概念、来源、综合分析)
  • 最近更新列表
  • 词数估算和更新状态

Canvas 知识地图

  • wiki/Wiki Map.canvas:知识库架构可视化,展示目录间数据流
  • wiki/canvases/welcome.canvas:新用户引导画布

为什么有效

维护知识库最繁琐的部分不是阅读或思考,而是** bookkeeping(记账工作)**:更新交叉引用、保持摘要最新、标注矛盾、保持一致性。人类放弃 Wiki 是因为维护负担增长比价值快。LLM 不会厌倦、不会忘记更新交叉引用、可以一次触及 15 个文件。


快速开始

当用户提供新资料要摄入时:

1. 请用户提供资料内容或 URL
2. 分析资料,提取关键信息
3. 确定放 raw/ 哪个子目录
4. obsidian create 创建 wiki/sources/ 来源摘要页
5. obsidian append 更新相关实体/概念页
6. 更新 index.md
7. obsidian daily:append 记录

当用户向知识库提问时:

1. obsidian search 搜索相关页面
2. obsidian read 读取匹配页面
3. 综合回答并标注来源
4. 询问用户是否要将回答存入 Wiki


自动跨链(Cross-Linker)

自动检测和创建双向链接,确保 Wiki 页面之间的互联性。

详细文档:wiki-crosslinker.md


健康检查(Lint)

自动检查知识库健康状况(8 轮检查)。

详细文档:wiki-lint.md

快速使用:./scripts/lint.sh /path/to/wiki


性能优化

针对大型 Wiki(>1000 页)的优化策略。

详细文档:performance-guide.md

快速优化

// config.json
{
  "performance": {
    "large_wiki_threshold": 1000,
    "batch_size": 50,
    "use_qmd_for_search": true
  }
}

qmd 集成

# 安装 qmd
brew install qmd

# 索引 Wiki
qmd index wiki/

# 搜索
qmd search "关键词" --top 10

测试

运行测试套件验证功能正确性。

# 单元测试
./scripts/test.sh

# 详细输出
./scripts/test.sh --verbose

# 集成测试(需要 Obsidian 运行)
./scripts/test.sh --integration

配置

复制 config.example.jsonconfig.json 并根据需要修改。

cp skills/llm-wiki-obsidian/config.example.json skills/llm-wiki-obsidian/config.json

主要配置项:

配置项说明默认值
vault.pathObsidian Vault 路径-
wiki.wiki_dirWiki 目录名wiki
crosslinker.enabled启用自动跨链true
lint.enabled_checksLint 检查项全部
performance.use_qmd_for_search使用 qmd 搜索false

参考资料

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.