From llm-wiki
Use when the user wants to build, maintain, or query a personal knowledge base using the LLM Wiki pattern (raw sources → compiled wiki → schema). Triggers on keywords: ingest, wiki, knowledge base, lint wiki, enhance page, compile knowledge, raw sources, wiki index. Also triggers when the user drops new files into raw/ and wants them processed, or asks questions that should be answered from the wiki.
npx claudepluginhub kaellim/llm-wiki --plugin llm-wikiThis skill uses the workspace's default tool permissions.
> Based on Andrej Karpathy's LLM Wiki pattern (April 2026).
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Generates Angular code and provides architectural guidance for projects, components, services, reactivity with signals, forms, dependency injection, routing, SSR, ARIA accessibility, animations, Tailwind styling, testing, and CLI tooling.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Based on Andrej Karpathy's LLM Wiki pattern (April 2026). The correct way to use LLMs is not Q&A — it's compilation.
This skill turns a coding agent into a disciplined wiki maintainer. Instead of rediscovering knowledge from scratch on every question (RAG), the agent compiles raw sources into a persistent, interlinked Markdown wiki that compounds over time.
The agent owns the wiki layer. The human owns the raw sources and the schema. The human reads; the agent writes.
Do NOT create or update any wiki page without: (1) YAML frontmatter with all required fields, (2) at least one raw/ source citation, (3) at least two [[wiki-links]] to related pages, (4) an update to wiki/index.md and wiki/log.md. Violating any of these degrades the wiki's compounding value over time.The wiki is a single, central knowledge base — not one per project. The agent resolves the wiki root in this order:
wiki-root: directive:
wiki-root: /absolute/path/to/wiki
~/.config/llm-wiki/root (contains a single line: the absolute path)raw/ AND wiki/ both exist in the current directoryIf none of these resolve, ask the user where the wiki lives. Do NOT guess.
Do NOT create raw/ or wiki/ in a non-wiki project directory.
Once resolved, ALL raw/ and wiki/ paths in this skill are relative to the
wiki root, NOT the current working directory.
NO WIKI PAGE WITHOUT FRONTMATTER + SOURCE CITATION + CROSS-REFERENCES.
NO MODIFICATION TO raw/ — EVER.
NO OPERATION WITHOUT UPDATING index.md AND log.md.
Violating the letter of this process is violating the spirit of the process. A wiki page without frontmatter is a loose note. A claim without a source is hallucination. A page without cross-references is an orphan. An operation without a log entry is invisible. These rules exist because the wiki's value comes from structural integrity compounding over time — skip one step and the compound interest stops.
raw/ is the source of truth. Never modify it. Create new files instead.| Action | Human | Agent | Both |
|---|---|---|---|
Add files to raw/ | ✓ | ||
Modify files in raw/ | |||
| Create/update wiki pages | ✓ | ||
| Read wiki pages | ✓ | ✓ | ✓ |
Update wiki/index.md | ✓ | ||
Update wiki/log.md | ✓ | ||
Edit CLAUDE.md schema | ✓ | ||
| Choose what to ingest | ✓ | ||
| Decide emphasis during ingest | ✓ | ||
| Propose schema improvements | ✓ | ||
| Approve schema changes | ✓ |
raw/ ← Human-owned. Immutable source material.
articles/ Web articles, blog posts (via Obsidian Web Clipper)
papers/ Papers, whitepapers, PDFs
repos/ README excerpts, code notes
notes/ Freeform notes, thoughts
images/ Screenshots, diagrams
wiki/ ← Agent-owned. Compiled knowledge.
concepts/ Concept pages (e.g., REST API, TDD, spaced repetition)
entities/ Entity pages (e.g., React, Rust, a specific book)
guides/ How-to guides (e.g., Docker deployment, Git branching)
comparisons/ Side-by-side comparisons (e.g., PostgreSQL vs MySQL)
learning/ Learning logs, reading notes
index.md Master index (agent-maintained)
log.md Append-only operation log
CLAUDE.md ← Co-owned. Schema that governs wiki conventions.
Every wiki page MUST have YAML frontmatter:
---
title: Page Title
type: concept | entity | guide | comparison | learning
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources:
- raw/articles/2026-04-09-source.md
tags:
- tag1
- tag2
confidence: high | medium | low
---
Body conventions:
[[wiki-links]] for all cross-references (Obsidian-compatible)raw/ sourcedigraph llm_wiki {
rankdir=TB;
"User message" [shape=doublecircle];
"New file in raw/?" [shape=diamond];
"Says ingest/process?" [shape=diamond];
"Asks a question?" [shape=diamond];
"Says lint/health?" [shape=diamond];
"Says enhance/improve?" [shape=diamond];
"Says compile/rebuild?" [shape=diamond];
"Says evolve schema?" [shape=diamond];
"INGEST" [shape=box, style=filled, fillcolor="#ccffcc"];
"QUERY" [shape=box, style=filled, fillcolor="#ccccff"];
"LINT" [shape=box, style=filled, fillcolor="#ffffcc"];
"ENHANCE" [shape=box, style=filled, fillcolor="#ccccff"];
"COMPILE" [shape=box, style=filled, fillcolor="#ffcccc"];
"EVOLVE-SCHEMA" [shape=box, style=filled, fillcolor="#ffffcc"];
"Normal response" [shape=ellipse];
"User message" -> "New file in raw/?";
"New file in raw/?" -> "INGEST" [label="yes"];
"New file in raw/?" -> "Says ingest/process?";
"Says ingest/process?" -> "INGEST" [label="yes"];
"Says ingest/process?" -> "Asks a question?";
"Asks a question?" -> "QUERY" [label="yes"];
"Asks a question?" -> "Says lint/health?";
"Says lint/health?" -> "LINT" [label="yes"];
"Says lint/health?" -> "Says enhance/improve?";
"Says enhance/improve?" -> "ENHANCE" [label="yes"];
"Says enhance/improve?" -> "Says compile/rebuild?";
"Says compile/rebuild?" -> "COMPILE" [label="yes"];
"Says compile/rebuild?" -> "Says evolve schema?";
"Says evolve schema?" -> "EVOLVE-SCHEMA" [label="yes"];
"Says evolve schema?" -> "Normal response" [label="no match"];
}
digraph ingest {
rankdir=TB;
"Read source" [shape=box];
"Extract key takeaways" [shape=box];
"Discuss with user" [shape=box, style=filled, fillcolor="#ffffcc"];
"User confirms direction" [shape=diamond];
"Page exists?" [shape=diamond];
"Update existing page" [shape=box, style=filled, fillcolor="#ccccff"];
"Create new page" [shape=box, style=filled, fillcolor="#ccffcc"];
"Add wiki-links" [shape=box];
"Update index + log" [shape=box];
"Verify (Iron Law)" [shape=box, style=filled, fillcolor="#ffcccc"];
"Report summary" [shape=doublecircle];
"Read source" -> "Extract key takeaways";
"Extract key takeaways" -> "Discuss with user";
"Discuss with user" -> "User confirms direction";
"User confirms direction" -> "Discuss with user" [label="revise"];
"User confirms direction" -> "Page exists?" [label="proceed"];
"Page exists?" -> "Update existing page" [label="yes"];
"Page exists?" -> "Create new page" [label="no"];
"Update existing page" -> "Add wiki-links";
"Create new page" -> "Add wiki-links";
"Add wiki-links" -> "Update index + log";
"Update index + log" -> "Verify (Iron Law)";
"Verify (Iron Law)" -> "Report summary";
}
Announce: "Using llm-wiki skill to ingest new sources."
Trigger: User says "ingest", drops files in raw/, or says "process new sources."
Checklist:
updated date[[wiki-links]] to connect new/updated pages to related existing pageswiki/index.md with any new pageswiki/log.md using format: ## [YYYY-MM-DD] ingest | <source title>Red flags — DO NOT:
raw/ — sources are immutablewiki/index.mdAnnounce: "Using llm-wiki skill to query the knowledge base."
Trigger: User asks a question that the wiki should be able to answer.
Checklist:
wiki/index.md to locate relevant pagesRed flags — DO NOT:
Announce: "Using llm-wiki skill to run wiki health check."
Trigger: User says "lint", "health check", or "audit wiki."
Checklist:
[[wiki-links]]wiki/index.md is complete and accuratewiki/log.md using format: ## [YYYY-MM-DD] lint | <summary>Announce: "Using llm-wiki skill to enhance a wiki page."
Trigger: User says "enhance", "improve", "expand" a specific page.
Checklist:
wiki/log.md using format: ## [YYYY-MM-DD] enhance | <page title>Announce: "Using llm-wiki skill to compile wiki from scratch."
Trigger: User says "compile", "rebuild", or "full recompile."
WARNING: This is expensive (many tokens). Confirm with user before proceeding.
Checklist:
raw/ recursivelywiki/index.md from scratchwiki/log.md using format: ## [YYYY-MM-DD] compile | full rebuild from <N> sourcesAnnounce: "Using llm-wiki skill to suggest schema improvements."
Trigger: After every 5 ingest operations, or when the LLM notices recurring patterns that the current schema doesn't capture well, or user says "evolve schema."
Checklist:
wiki/log.md for recent operations and any recurring frictionCLAUDE.md schemastatus: active | archived to frontmatter because X pages are outdated"wiki/patterns/ subdirectory because Y guides are actually design patterns"related-projects frontmatter field because cross-project references keep appearing"wiki/log.mdRed flags — DO NOT:
---
title: Event-Driven Architecture
type: concept
created: 2026-04-01
updated: 2026-04-09
sources:
- raw/articles/2026-03-28-event-driven-design.md
- raw/papers/fowler-event-sourcing.md
tags:
- architecture
- distributed-systems
confidence: high
---
# Event-Driven Architecture
A software design pattern where components communicate by producing and
consuming events rather than direct calls. See also [[message-queue]] and
[[pub-sub-pattern]].
## Core Concepts
Events are immutable records of something that happened. Unlike commands
(which request an action), events state facts. This distinction is critical
for [[event-sourcing]] where the event log IS the source of truth
(raw/papers/fowler-event-sourcing.md, §3).
## Trade-offs
Compared to [[request-response-pattern]], event-driven systems offer better
decoupling but introduce eventual consistency challenges
(raw/articles/2026-03-28-event-driven-design.md).
**Note:** Fowler and the 2026 article disagree on whether event ordering
guarantees are necessary. Fowler argues they are essential; the article
suggests idempotent handlers make ordering optional. Both views documented.
Complete frontmatter. Two sources cited. Five wiki-links to related pages. Contradiction between sources explicitly noted. Focused on one concept.
# Event Driven Architecture and Microservices
Event driven architecture is when you use events. It's used a lot in
microservices. You can use Kafka or RabbitMQ. Microservices are small
services that work together. They often use REST APIs or gRPC.
Some advantages:
- Decoupling
- Scalability
- Flexibility
No frontmatter. No sources cited. No wiki-links. Mixes two concepts (EDA and microservices) in one page. No contradictions noted. Claims are unsourced assertions. This page provides no compounding value.
When the wiki directory structure doesn't exist yet:
# Run from project root
mkdir -p raw/{articles,papers,repos,notes,images}
mkdir -p wiki/{concepts,entities,guides,comparisons,learning}
touch wiki/index.md wiki/log.md
Then create initial wiki/index.md:
---
title: Knowledge Base Index
updated: YYYY-MM-DD
---
# Knowledge Base Index
## Software Development
(No pages yet)
## Personal Learning
(No pages yet)
---
*This index is maintained by the LLM. Do not edit manually.*
The wiki is a single, central knowledge base — not one per project. Knowledge compounds across domains: a concept from Project A may connect to insights from Project B. Splitting into separate wikis loses this cross-pollination.
After bootstrapping the wiki (e.g. at ~/my-wiki), point each project to it:
Option A — Per-project CLAUDE.md (recommended):
Add this line to each project's CLAUDE.md:
wiki-root: /absolute/path/to/my-wiki
Option B — Global config (one-time setup):
mkdir -p ~/.config/llm-wiki
echo "/absolute/path/to/my-wiki" > ~/.config/llm-wiki/root
The bootstrap script (scripts/wiki-bootstrap.sh) sets up Option B automatically.
~/my-wiki/ ← The ONE wiki (wiki root)
raw/
articles/ ← General articles, blog posts
papers/ ← Papers, whitepapers
notes/ ← Freeform notes
images/ ← Screenshots, diagrams
projects/ ← Per-project sources
project-a/
project-b/
wiki/
concepts/
entities/
...
~/projects/ ← Your code repos (unchanged)
project-a/
CLAUDE.md ← Contains: wiki-root: ~/my-wiki
project-b/
CLAUDE.md ← Contains: wiki-root: ~/my-wiki
The wiki/ layer remains flat — pages are organized by knowledge type, not by
project. Use frontmatter tags (e.g. tags: [project-a]) to track provenance.
Obsidian Dataview can filter by tag.
NEVER create raw/ or wiki/ inside a code project directory. If the agent
is working in ~/projects/project-a/ and the user says "ingest", the agent must
resolve the wiki root first (see Wiki Root Resolution above), then operate on
the central wiki — not create a local wiki in the project.
At small scale (~50 pages), wiki/index.md is sufficient for the LLM to navigate.
As the wiki grows:
wiki/concepts/_index.md) and keep the master index as a high-level overview.grep over wiki/log.md using the ## [date] operation | description format gives fast chronological navigation.The wiki is designed to be opened as an Obsidian vault:
[[wiki-links]] render as clickable linksraw/articles/The agent never needs to interact with Obsidian directly. Obsidian is the human's reading interface; the agent works with files on disk.
Recommended: version control the entire wiki.
git init
echo "node_modules/" > .gitignore
git add -A && git commit -m "wiki: initial setup"
After each significant ingest or compile, commit:
git add -A && git commit -m "wiki: ingest <source-description>"
Creating a wiki page without frontmatter, source citations, or cross-references because "I'll fix it later." You won't. The page becomes an orphan that degrades wiki quality. Every page goes through the full template — no exceptions.
Answering a question from general knowledge when wiki content exists. The wiki IS the knowledge base. If the answer isn't in the wiki, that's a gap to fill — not an excuse to bypass it. Always check wiki first.
Cramming multiple concepts into a single page because they came from the same source. One source might produce 5-10 wiki pages. Each page covers one concept or entity. The value is in the cross-references between them.
Running ingest/lint/enhance without updating wiki/log.md. If it's not in the
log, it didn't happen. Future sessions rely on the log to understand what's been
done.
If you catch yourself thinking any of these, STOP. Return to the Iron Law.
ALL of these mean: STOP. Check the Iron Law. Follow the checklist.
| Rationalization | Reality |
|---|---|
| "Too simple for frontmatter" | Frontmatter takes 30 seconds. Without it, the page is invisible to Dataview and LINT. |
| "Only one related page exists" | Then create the second related page, or link to a broader concept. Two links minimum. |
| "The user didn't ask me to update the index" | Index updates are automatic — the user shouldn't have to ask. |
| "This source contradicts the wiki, I'll just use the newer one" | Note the contradiction explicitly. Both views may be valid. |
| "I'll batch the log entries" | One operation, one log entry. Always. |
| "The wiki is small, cross-references don't matter yet" | Cross-references matter MORE when the wiki is small — they're the scaffold for growth. |