원클릭으로
llm-wiki
Karpathy's LLM Wiki: build/query interlinked markdown KB.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Karpathy's LLM Wiki: build/query interlinked markdown KB.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | llm-wiki |
| description | Karpathy's LLM Wiki: build/query interlinked markdown KB. |
| version | 2.2.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["wiki","knowledge-base","research","notes","markdown","rag-alternative"],"category":"research","related_skills":["obsidian","arxiv"]}} |
Build and maintain a persistent, compounding knowledge base as interlinked markdown files. Based on Andrej Karpathy's LLM Wiki pattern.
Unlike traditional RAG (which rediscovers knowledge from scratch per query), the wiki compiles knowledge once and keeps it current. Cross-references are already there. Contradictions have already been flagged. Synthesis reflects everything ingested.
Division of labor: The human curates sources and directs analysis. The agent summarizes, cross-references, files, and maintains consistency.
Location: Set via WIKI_PATH environment variable (e.g. in ~/.hermes/.env).
Default: ~/.agents/wiki (i.e. /home/hlr/.agents/wiki)
NOTE: If the wiki doesn't exist at
~/.agents/wiki, check~/wikias fallback. If unset, defaults to~/wiki.
WIKI="${WIKI_PATH:-$HOME/.agents/wiki}"
The wiki is just a directory of markdown files — open it in Obsidian, VS Code, or any editor. No database, no special tooling required.
wiki/
├── SCHEMA.md # Conventions, structure rules, domain config
├── index.md # Sectioned content catalog with one-line summaries
├── log.md # Chronological action log (append-only, rotated yearly)
├── raw/ # Layer 1: Immutable source material
│ ├── articles/ # Web articles, clippings
│ ├── papers/ # PDFs, arxiv papers
│ ├── transcripts/ # Meeting notes, interviews
│ └── assets/ # Images, diagrams referenced by sources
├── entities/ # Layer 2: Entity pages (people, orgs, products, models)
├── concepts/ # Layer 2: Concept/topic pages
├── comparisons/ # Layer 2: Side-by-side analyses
└── queries/ # Layer 2: Filed query results worth keeping
Layer 1 — Raw Sources: Immutable. The agent reads but never modifies these.
Layer 2 — The Wiki: Agent-owned markdown files. Created, updated, and
cross-referenced by the agent.
Layer 3 — The Schema: SCHEMA.md defines structure, conventions, and tag taxonomy.
When the user has an existing wiki, always orient yourself before doing anything:
① Read SCHEMA.md — understand the domain, conventions, and tag taxonomy.
② Read index.md — learn what pages exist and their summaries.
③ Scan recent log.md — read the last 20-30 entries to understand recent activity.
WIKI="${WIKI_PATH:-$HOME/.agents/wiki}"
# Orientation reads at session start
read_file "$WIKI/SCHEMA.md"
read_file "$WIKI/index.md"
read_file "$WIKI/log.md" offset=<last 30 lines>
Only after orientation should you ingest, query, or lint. This prevents:
For large wikis (100+ pages), also run a quick search_files for the topic
at hand before creating anything new.
When the user asks to create or start a wiki:
WIKI_PATH env var if set, otherwise ~/.agents/wiki as the wiki pathSCHEMA.md customized to the domain (see references/schema-template.md)index.md with sectioned headerlog.md with creation entrySchema 与 frontmatter 模板见 references/schema-template.md(初始化 wiki 时按需加载)。
[Define 10-20 top-level tags for the domain. Add new tags here BEFORE using them.]
Example for AI/ML:
Rule: every tag on a page must appear in this taxonomy. If a new tag is needed, add it here first, then use it. This prevents tag sprawl.
_archive/, remove from indexOne page per notable entity. Include:
One page per concept or topic. Include:
Side-by-side analyses. Include:
When new information conflicts with existing content:
contradictions: [page-name]When the user provides a source (URL, file, paste), integrate it into the wiki:
① Capture the raw source:
web_extract to get markdown, save to raw/articles/web_extract (handles PDFs), save to raw/papers/raw/ subdirectoryraw/articles/karpathy-llm-wiki-2026.mdsource_url, ingested, sha256 of the body).
On re-ingest of the same URL: recompute the sha256, compare to the stored value —
skip if identical, flag drift and update if different. This is cheap enough to
do on every re-ingest and catches silent source changes.② Discuss takeaways with the user — what's interesting, what matters for the domain. (Skip this in automated/cron contexts — proceed directly.)
③ Check what already exists — search index.md and use search_files to find
existing pages for mentioned entities/concepts. This is the difference between
a growing wiki and a pile of duplicates.
④ Write or update wiki pages:
updated date.
When new info contradicts existing content, follow the Update Policy.[[wikilinks]]. Check that existing pages link back.^[raw/articles/source.md]
markers to paragraphs whose claims trace to a specific source.confidence: medium or low in frontmatter. Don't mark high unless the
claim is well-supported across multiple sources.⑤ Update navigation:
index.md under the correct section, alphabeticallylog.md: ## [YYYY-MM-DD] ingest | Source Title⑥ Report what changed — list every file created or updated to the user.
A single source can trigger updates across 5-15 wiki pages. This is normal and desired — it's the compounding effect.
When the user asks a question about the wiki's domain:
① Read index.md to identify relevant pages.
② For wikis with 100+ pages, also search_files across all .md files
for key terms — the index alone may miss relevant content.
③ Read the relevant pages using read_file.
④ Synthesize an answer from the compiled knowledge. Cite the wiki pages
you drew from: "Based on [[page-a]] and [[page-b]]..."
⑤ File valuable answers back — if the answer is a substantial comparison,
deep dive, or novel synthesis, create a page in queries/ or comparisons/.
Don't file trivial lookups — only answers that would be painful to re-derive.
⑥ Update log.md with the query and whether it was filed.
When the user asks to lint, health-check, or audit the wiki:
① Orphan pages: Find pages with no inbound [[wikilinks]] from other pages.
# Use execute_code for this — programmatic scan across all wiki pages
import os, re
from collections import defaultdict
wiki = "<WIKI_PATH>"
# Scan all .md files in entities/, concepts/, comparisons/, queries/
# Extract all [[wikilinks]] — build inbound link map
# Pages with zero inbound links are orphans
② Broken wikilinks: Find [[links]] that point to pages that don't exist.
③ Index completeness: Every wiki page should appear in index.md. Compare
the filesystem against index entries.
④ Frontmatter validation: Every wiki page must have all required fields (title, created, updated, type, tags, sources). Tags must be in the taxonomy.
⑤ Stale content: Pages whose updated date is >90 days older than the most
recent source that mentions the same entities.
⑥ Contradictions: Pages on the same topic with conflicting claims. Look for
pages that share tags/entities but state different facts. Surface all pages
with contested: true or contradictions: frontmatter for user review.
⑦ Quality signals: List pages with confidence: low and any page that cites
only a single source but has no confidence field set — these are candidates
for either finding corroboration or demoting to confidence: medium.
⑧ Source drift: For each file in raw/ with a sha256: frontmatter, recompute
the hash and flag mismatches. Mismatches indicate the raw file was edited
(shouldn't happen — raw/ is immutable) or ingested from a URL that has since
changed. Not a hard error, but worth reporting.
⑨ Page size: Flag pages over 200 lines — candidates for splitting.
⑩ Tag audit: List all tags in use, flag any not in the SCHEMA.md taxonomy.
⑪ Log rotation: If log.md exceeds 500 entries, rotate it.
⑫ Report findings with specific file paths and suggested actions, grouped by severity (broken links > orphans > source drift > contested pages > stale content > style issues).
⑬ Append to log.md: ## [YYYY-MM-DD] lint | N issues found
# Find pages by content
search_files "transformer" path="$WIKI" file_glob="*.md"
# Find pages by filename
search_files "*.md" target="files" path="$WIKI"
# Find pages by tag
search_files "tags:.*alignment" path="$WIKI" file_glob="*.md"
# Recent activity
read_file "$WIKI/log.md" offset=<last 20 lines>
When ingesting multiple sources at once, batch the updates:
When content is fully superseded or the domain scope changes:
_archive/ directory if it doesn't exist_archive/ with its original path (e.g., _archive/entities/old-page.md)index.mdThe wiki directory works as an Obsidian vault out of the box:
[[wikilinks]] render as clickable linksraw/assets/ folder holds images referenced via ![[image.png]]For best results:
raw/assets/TABLE tags FROM "entities" WHERE contains(tags, "company")If using the Obsidian skill alongside this one, set OBSIDIAN_VAULT_PATH to the
same directory as the wiki path.
On machines without a display, use obsidian-headless instead of the desktop app.
It syncs vaults via Obsidian Sync without a GUI — perfect for agents running on
servers that write to the wiki while Obsidian desktop reads it on another device.
Setup:
# Requires Node.js 22+
npm install -g obsidian-headless
# Login (requires Obsidian account with Sync subscription)
ob login --email <email> --password '<password>'
# Create a remote vault for the wiki
ob sync-create-remote --name "LLM Wiki"
# Connect the wiki directory to the vault
cd ~/.agents/wiki
ob sync-setup --vault "<vault-id>"
# Initial sync
ob sync
# Continuous sync (foreground — use systemd for background)
ob sync --continuous
Continuous background sync via systemd:
# ~/.config/systemd/user/obsidian-wiki-sync.service
[Unit]
Description=Obsidian LLM Wiki Sync
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/path/to/ob sync --continuous
WorkingDirectory=/home/user/.agents/wiki
Restart=on-failure
RestartSec=10
[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable --now obsidian-wiki-sync
# Enable linger so sync survives logout:
sudo loginctl enable-linger $USER
This lets the agent write to ~/.agents/wiki on a server while you browse the same
vault in Obsidian on your laptop/phone — changes appear within seconds.
raw/ — sources are immutable. Corrections go in wiki pages.log-YYYY.md and start fresh.
The agent should check log size during lint.llm-wiki(结构化知识)与 knowledge(过程记忆)可双向联动。
| 维度 | llm-wiki | knowledge |
|---|---|---|
| 用途 | 知识编译 | 过程记录 |
| 类型 | entities/concepts/comparisons | tips/problems/sessions/decisions |
| 引用 | [[wikilinks]](强制) | related 字段(可选) |
| 来源 | 文献/文章 | 开发过程 |
在 frontmatter 中添加 knowledge_ref: 链接 knowledge 条目:
---
title: Dependency Injection
type: concept
knowledge_ref: knowledge:library-tips/dotnet-di-tips.md
---
从 knowledge 提取通用概念到 llm-wiki:
library-tips/*.md → concepts/(使用模式)problem-analysis/*.md → entities/(问题实体)decisions/*.md → concepts/(决策模式)判断是否提取:
| 条件 | 提取 |
|---|---|
| 通用模式/概念 | ✅ |
| 项目特定细节 | ❌ |
| 可复用知识 | ✅ |
| 一次性问题 | ❌ |
查询 llm-wiki 概念辅助问题解决:
<!-- 在 problem-analysis 中引用 -->
wiki_ref: [[onnx-gpu-acceleration]]
<!-- llm-wiki 概念页 -->
knowledge_ref: knowledge:library-tips/dotnet-di-tips.md
<!-- knowledge 条目 -->
wiki_ref: [[dependency-injection]]
concepts/(提取通用模式)entities/(提取问题实体)concepts/(提取决策模式)在 lint 时检查联动完整性:
# 检查 knowledge_ref 链接
grep -r "knowledge_ref:" ~/.agents/wiki/
# 检查断裂的 knowledge 引用
# 验证 knowledge_ref 指向的文件是否存在
llm-wiki-compiler is a Node.js CLI that compiles sources into a concept wiki with the same Karpathy inspiration. It's Obsidian-compatible, so users who want a scheduled/CLI-driven compile pipeline can point it at the same vault this skill maintains. Trade-offs: it owns page generation (replaces the agent's judgment on page creation) and is tuned for small corpora. Use this skill when you want agent-in-the-loop curation; use llmwiki when you want batch compile of a source directory.
Use when parsing novel chapters into a structured knowledge base with chapter summaries, entity updates, change logs, memory points, and strict multi-step extraction/query/update discipline.
MiniMax API 调用指南,包含 M2.5/M2.7 模型选择、Python 调用示例、错误处理与性能对比。触发词:MiniMax API、调用 MiniMax、minimax-api
MiniMax M2.5/M2.7 模型上下文测试套件,支持 Recall、筛选、数学、代码、推理多维度测试。触发词:MiniMax 测试、上下文测试、minimax-context-testing
Use mmx to generate or analyze images via MiniMax (image-01 for generation, vision for understanding). Use when the user wants to generate images from text, analyze/describe images, extract text from images, check image content, or do character-consistent image generation. Triggers on "生成图片", "图片生成", "看图", "图片识别", "image generate", "describe image", "图片理解", "从图生图", "角色一致性".
一站式 MiniMax 图片生成封装脚本 mmx-image 的技能入口。 适用场景:(1)文生图(t2i);(2)人物转换风格(i2i,保持同一人物特征);(3)水印自动检测与裁剪;(4)参考图含 UI 元素时自动预清洗。 当用户说"生成图片"、"画一张图"、"把照片转成古风"、"人物换装"、或直接提供参考图要求 AI 基于该人物生成新图时使用此技能。
使用 mmx CLI 通过 MiniMax AI 生成音乐和歌曲翻唱。当用户想要创作音乐、生成歌曲、制作背景音乐(BGM)、创作器乐曲、翻唱歌曲,或提到"生成音乐"、"作曲"、"BGM"、"music generate"、"music cover"时使用。