llm-wiki

llm-wiki is a skill for Claude Code, Codex from Joe-rq/siyuan-llm-wiki. It costs 74 tokens per session (1,629 once invoked), scanned A, original, MIT.

A workflow that uses Siyuan Note and Claude Code to build and maintain a linked knowledge wiki from your documents. It adds pages, connections between related ideas, and checks for conflicting information.

In plain words
What is it for?
Use it to import notes or documents, search the knowledge base, explore relationships between pages, verify links, and run quality or contradiction checks.
Why use it?
It reduces the work of organising notes and finding related information by hand. It also helps uncover broken links, poor-quality pages, and contradictions in the knowledge base.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to import notes or documents, search the knowledge base, explore relationships between pages, verify links, and run quality or contradiction checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Joe-rq/siyuan-llm-wiki --skill siyuan-llm-wiki
Clone the repo
git clone --depth 1 https://github.com/Joe-rq/siyuan-llm-wiki

Made for: Claude Code, Codex.

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 llm-wiki

README.md
[![agentmods](https://agentmods.dev/badge/skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki/github.svg)](https://agentmods.dev/skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki)
Your own site
<a href="https://agentmods.dev/skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki"><img src="https://agentmods.dev/badge/skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki/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 llm-wiki

Your own site · 80×15
<a href="https://agentmods.dev/skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki"><img src="https://agentmods.dev/badge/skills/joe-rq/siyuan-llm-wiki/siyuan-llm-wiki.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,629 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.00074 $0.01629
Opus 5 $0.00037 $0.00814
Sonnet 5 $0.00015 $0.00326
Haiku 4.5 $0.00007 $0.00163

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

Security

Grade A, and why

llm-wiki 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 12d 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.

SKILL.md · 176 lines

How it starts

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

LLM Wiki Skill

让 LLM 持续维护你的结构化知识库。

不是 RAG,而是 Wiki:LLM 主动构建和维护知识库,每次摄入都更新相关页面、建立交叉链接、发现矛盾。


前置条件

初始化

首次使用前,运行初始化脚本创建知识库结构:

# 先安装 siyuan-skill,然后初始化 LLM Wiki
node wiki-init.js

# 或指定 siyuan-skill 路径
node wiki-init.js --skill-path /path/to/siyuan-skill/siyuan.js

# 预览模式(不实际创建)
node wiki-init.js --dry-run

初始化完成后,所有文档 ID 记录在 wiki.config.json 中。

快速开始

全自动摄入(推荐)

/wiki <docId>

全自动执行,无需确认。完成后报告:新建实体、更新索引、检测矛盾。

只有以下情况才打断你:文档无法读取、检测到矛盾、实体 >15 个、API 连续失败。

交互式摄入

/wiki ingest <docId> -i

适用于复杂文档或首次学习知识库结构。每步确认:提取实体 → 冲突检测 → 创建 → 更新索引。


命令索引

知识摄入

命令 用途
/wiki <docId> 一键摄入(全自动)
/wiki ingest <docId> -i 交互式摄入
wiki-ingest --file <path> 从文件摄入
wiki-ingest-history 查看摄入历史

知识查询

命令 用途
graph-traverse <docId> 遍历知识图谱关系
verify-refs <docId> 验证双链正确性
search <query> 搜索知识库内容

质量检查

命令 用途
contradiction-detect 检测内容矛盾
quality-check <docId> 检查文档质量

核心理念

链接格式(重要)

✅ 正确:((<docId> '显示标题'))
❌ 错误:((RAG))           ← 缺少 docId,改名会断链
❌ 错误:[[RAG]]           ← Obsidian 格式
❌ 错误:<docId>            ← 裸 docId(残留文本块)

Index 更新规则

禁止 prepend:新内容不能插入到页面顶部,必须合并到已有分类中。

标准分类(8 类):笔记方法论、人物、LLM/Agent 技术、向量数据库、技术概念、投资/金融、工具、系统/概念

新增分类规则:新领域内容 ≥5 个实体且不匹配任何已有分类时,才可新增。

命令选择规则(重要)

选错命令会导致结构混乱,必须严格按照下表选择:

文档类型 更新方式 命令 原因
index 重写整页 update 需要合并到已有分类,禁止 prepend
log 重写整页 update 保持格式统一,避免裸 docId
实体页 追加块 bi 块级追加新描述
主题页 追加块 bi 追加相关实体链接

禁止操作

  • ❌ 用 bi 更新 index/log → 导致 prepend 和裸 docId
  • ❌ 用 update 更新实体页 → 覆盖已有描述

四层元架构

基于阳志平元反思技巧,提供四层保护:

Layer 机制 脚本
认知边界 实体约束、元反思 entity_check.py, meta_reflect.py
意图防护 三重防护、兜底策略 triple_protection.py
执行可靠 后置验证、幂等性 validate_ingest.py
持续优化 同类扫描、模式积累 similar_scan.py, pattern_accumulate.py

Read the full file on GitHub · 176 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. 12d ago First seen · 176 lines · 74 tokens per session scan A 78a372169447

Subscribe to this mod's changes

llm-wiki is a skill published in the GitHub repository Joe-rq/siyuan-llm-wiki (2 stars, last pushed 4mo ago), licensed MIT. It adds 74 tokens to every session and 1,629 once invoked, about $0.0004 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

llm-wiki

The foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources…

Ar9av/obsidian-wiki · 113 tokens

wiki-export

Export the Obsidian wiki's knowledge graph to structured formats for use in external tools. Use this skill when the user says "export wiki", "export graph", "export to JSON", "export to Gephi", "export to Neo4j", "export to Postgres", "export to SQL", "graphml", "visualize wiki", "knowledge graph export", "export to…

Ar9av/obsidian-wiki · 172 tokens

wiki-query

Answer questions by searching the compiled Obsidian wiki. Use this skill when the user asks a question about their knowledge base, wants to find information across their wiki, asks "what do I know about X", "find everything related to Y", or wants synthesized answers with citations from their wiki pages. Also use when…

Ar9av/obsidian-wiki · 200 tokens

wiki-status

Show the current state of the wiki — what's been ingested, what's pending, and the delta between sources and wiki content. Use this skill when the user asks "what's the status", "how much is ingested", "what's left to process", "show me the delta", "what changed since last ingest", "wiki dashboard", or wants an…

Ar9av/obsidian-wiki · 210 tokens

cross-linker

Scan the Obsidian wiki and automatically discover missing cross-references between pages. Use this skill when the user says "link my pages", "find missing links", "cross-reference", "connect my wiki", "add wikilinks", "what pages should be linked", or after any large ingestion to ensure new pages are woven into the…

Ar9av/obsidian-wiki · 137 tokens

pi-history-ingest

Ingest Pi coding agent session history into the Obsidian wiki. Use this skill when the user wants to mine their past Pi sessions for knowledge, import their /.pi/agent/sessions folder, extract insights from previous coding sessions, or says things like "process my Pi history", "add my Pi sessions to the wiki", "ingest…

Ar9av/obsidian-wiki · 112 tokens