obsidian-llm-wiki: Skill for Claude Code

.claude/skills/ingest/SKILL.md

ingest is a skill for Claude Code from levi-qiao/obsidian-llm-wiki. It costs 114 tokens per session (3,419 once invoked), scanned A, original, MIT.

A workflow for importing raw files into an Obsidian knowledge base, a collection of linked Markdown notes. It processes files from a raw folder into organized wiki sections and archives the source files after processing.

In plain words
What is it for?
Use it to scan and import Markdown, PDF, or text files, create concepts, entities, sources, and synthesis notes, and archive completed inputs. It requires showing the pending file list before processing.
Why use it?
It provides a repeatable way to turn incoming documents into searchable notes while tracking what has already been handled. It also keeps processed source files separate from the inbox.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md.

This is levi-qiao/obsidian-llm-wiki's own configuration. It tells Claude Code how to work on obsidian-llm-wiki itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything obsidian-llm-wiki configures →

Reuse

Borrowing it

Nothing to install: this file belongs to levi-qiao/obsidian-llm-wiki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/levi-qiao/obsidian-llm-wiki/main/.claude/skills/ingest/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/levi-qiao/obsidian-llm-wiki

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ingest

README.md
[![agentmods](https://agentmods.dev/badge/skills/levi-qiao/obsidian-llm-wiki/ingest/github.svg)](https://agentmods.dev/skills/levi-qiao/obsidian-llm-wiki/ingest)
Your own site
<a href="https://agentmods.dev/skills/levi-qiao/obsidian-llm-wiki/ingest"><img src="https://agentmods.dev/badge/skills/levi-qiao/obsidian-llm-wiki/ingest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ingest

Your own site · 80×15
<a href="https://agentmods.dev/skills/levi-qiao/obsidian-llm-wiki/ingest"><img src="https://agentmods.dev/badge/skills/levi-qiao/obsidian-llm-wiki/ingest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00114 $0.03419
Opus 5 $0.00057 $0.01709
Sonnet 5 $0.00023 $0.00684
Haiku 4.5 $0.00011 $0.00342

Measured 11d ago against content hash 6327395b4ad4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ingest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/ingest/SKILL.md · 327 lines

How it starts

The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ingest 技能

核心目标

你正在维护一个 LLM Wiki(Obsidian 知识库)。raw/ 目录是"待处理收件箱",wiki/ 是"编译输出层"。本技能负责将原始资料编译到知识库中,并自动归档。

目录结构

  • raw/ — 用户自定义的分类结构(可动态调整)
  • raw/09-archive/已处理文件的归档目录,禁止读取(固定,写死)
  • wiki/concepts/ — 概念(框架、方法论、理论)
  • wiki/entities/ — 实体(人物、公司、工具、产品)
  • wiki/sources/ — 资料摘要
  • wiki/syntheses/ — 综合研究报告

触发条件

  1. 用户执行 /ingest — 扫描 raw/ 所有子目录(排除 09-archive/),找出待处理文件
  2. 用户执行 /ingest <path> — 仅处理指定文件
  3. 隐式触发 — 用户说"把这个资料摄入知识库"、"导入这篇文章"时,自动执行

工作流程

前置检查:扫描待处理文件

关键准则

  1. 使用 Glob 扫描 raw/**/*.{md,pdf,txt}(自动排除 raw/09-archive/
  2. 读取 raw/.processed.json,识别已处理的文件
  3. 为每个待处理文件创建处理清单,确保不遗漏任何文件
  4. 按文件名字母顺序处理,便于追踪进度

处理清单示例

📋 待处理文件清单:
- [ ] raw/01-articles/文件A.md (ID: file-a)
- [ ] raw/01-articles/文件B.md (ID: file-b)
- [ ] raw/02-papers/文件C.pdf (ID: file-c)

重要:在开始处理前,向用户展示这个清单,让用户确认要处理的文件列表。


对每个待处理源文件,严格按以下步骤执行:

步骤 1:读取源文件

  • 如果是 .md 文件:使用 Read 工具完整读取内容
  • 如果是 .pdf 文件:使用 Read 工具尝试提取文本。如果无法提取或内容为空,改为记录文件元信息(文件名、页数)
  • 检查点 ✓:确认文件内容已完整读取,记录文件路径和字数

步骤 2:内容分析与 ID 生成

生成稳定 ID

  • 从文件名提取(去除扩展名和路径)
  • 转换为 kebab-case
  • 示例:raw/01-articles/Attention Is All You Need.md → ID: attention-is-all-you-need
  • 检查点 ✓:确认 ID 已生成,且在 .processed.json 中不存在(避免重复处理)

从源文件中提取

  • 核心主旨 — 这段资料讲什么(1-2句话)
  • 实体 — 人物、公司、工具、产品等具体名词(列出所有实体)
  • 概念 — 框架、方法论、理论等抽象名词(列出所有概念)
  • 关键标签 — 3-5个细粒度标签(优先复用 index.md 标签云中的现有标签)

如果是非中文内容,则翻译成中文。

检查点 ✓:确认已提取实体列表、概念列表、标签列表

步骤 3:知识网络化(动态 Top-K)

读取总索引

Read wiki/index.md

智能定位候选页面

  1. 用步骤 2 提取的实体、概念、标签作为关键词
  2. 在 index.md 中匹配相关页面(不限数量)
  3. 按相关性排序,动态决定更新数量:
    • 简单博客/短文(< 1000 字):2-5 个页面
    • 技术文章/论文(1000-5000 字):5-15 个页面
    • 书籍章节/长文(> 5000 字):15-30 个页面
  4. 如果需要更新超过 20 个页面 → 询问用户是否批量处理

只读取 Top-K 页面的内容(避免全量扫描)

对于步骤 2 提取的每个实体和概念:

目标目录

  • 实体 → wiki/entities/
  • 概念 → wiki/concepts/

处理逻辑

  1. 页面不存在 → 按照 CLAUDE.md 的 Frontmatter 规范创建新页面
  2. 页面已存在 → 读取现有内容,增量合并新信息
  3. 发现冲突 → 根据冲突类型处理:
    • 时间性冲突(旧版本 vs 新版本)→ 直接更新,在页面中标注 ## 历史版本
    • 观点性冲突(A 说法 vs B 说法)→ 在页面中新建 ## 知识冲突 区块
    • 复杂冲突(无法判断)→ 在 wiki/_conflicts/ 创建冲突文件,暂停并询问用户

Read the full file on GitHub · 327 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 327 lines · 114 tokens per session scan A 6327395b4ad4

Subscribe to this mod's changes

ingest is a skill published in the GitHub repository levi-qiao/obsidian-llm-wiki (10 stars, last pushed 28d ago), licensed MIT. It adds 114 tokens to every session and 3,419 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

kb-index

Update Knowledge Base indexes. Smart mode detects changes and updates only what's needed. Full rebuild available with --full flag. Use after adding/moving documents or when indexes feel stale.

ernestolee13/para-knowledge-base · 38 tokens

wiki-ingest

File a new source into the LLM Wiki — create its Sources page, append a log entry, apply the proposed cross-reference edits. Use when the user says "ingest this", "file this source", "add this to the wiki", drops a URL/PDF/clipped article, or pastes notes they want captured. Never auto-applies cross-refs without…

bezata/kObsidian · 82 tokens

ingest

A tool for adding a URL, file, text, or Inbox item to the LLM Wiki. It checks the material's purpose, preserves the original source, compiles a wiki page, updates indexes and logs, and reviews the result.

johnfkoo951/cmds-llm-wiki · 56 tokens

patent-application

A patent-application document workflow that turns supplied invention materials into claims, a description, an abstract, and black-and-white drawings. It can also produce Markdown and Word files.

handsomestWei/patent-disclosure-skill · 95 tokens

patent-reader

A plain-language reader for Chinese patents that turns a publication number or PDF into notes, diagrams, and an Obsidian entry. Obsidian is a note-taking app that stores linked Markdown files.

handsomestWei/patent-disclosure-skill · 31 tokens

llm-wiki

Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern. Extension-backed with auto-generated metadata, guardrails, and 14 custom tools (+3 opt-in agent-trajectory tools).

zosmaai/pi-llm-wiki · 52 tokens