Help us improve
Share bugs, ideas, or general feedback.
From llm-wiki-compiler
Compiles Markdown source files from configured directories into topic-based wiki articles via 5-phase algorithm: scan sources, classify topics, generate templated pages. Invoked by /wiki-compile.
npx claudepluginhub ussumant/llm-wiki-compiler --plugin llm-wiki-compilerHow this skill is triggered — by the user, by Claude, or both
Slash command
/llm-wiki-compiler:wiki-compilerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill contains the 5-phase algorithm for compiling markdown source files into a topic-based wiki.
Manages LLM-compiled knowledge bases in .wiki/ or ~/wiki/: ingests sources to raw/, compiles interconnected markdown articles with indexes, queries, lints, and supports topic sub-wikis.
Compiles .agents artifacts into a structured markdown wiki with backlinks, index, lint reports, and log. Useful for closing the knowledge loop after retro/forge sessions.
Use when compiling raw sources into the wiki, querying the knowledge base, running health checks or lint on the wiki, evolving or improving wiki coverage, or when user says 'compile', 'update the wiki', 'query', 'lint', 'health check', 'evolve', 'what's missing', or 'suggest improvements'. Also triggers on questions that should be answered from the knowledge base.
Share bugs, ideas, or general feedback.
This skill contains the 5-phase algorithm for compiling markdown source files into a topic-based wiki.
Safety rule: NEVER modify any file outside the configured output directory. Source files are read-only.
Before running, read .wiki-compiler.json from the project root to get:
sources[] — directories to scan (with optional exclude patterns)output — where to write wiki articlesname — project/domain name for the wikitopic_hints[] — optional seed topics from the userlink_style — "obsidian" (default) or "markdown"sources[], list all .md files using Globexclude patterns (e.g., the wiki/ output directory itself).compile-state.json from the output directory# heading)topic_hints from config as seed topics when available.compile-state.json — avoid creating near-duplicatesd1-retention, push-notifications)Topic detection guidance:
retention/ likely belong to a retention topic)For EACH topic that has new or changed source files:
Read ALL source files classified under that topic (need full context, not just changed files)
Write the topic article to {output}/topics/{topic-slug}.md
Use the article template from ${CLAUDE_PLUGIN_ROOT}/templates/article-template.md
Fill every section with specific, factual content -- no placeholders
Summary should be a standalone briefing: someone reading just this section should understand the current state
Timeline entries must have real dates
Current State should be immediately actionable -- what's true right now
Sources must list every source file that contributed, using the configured link style
Coverage indicators -- each section heading must include a coverage tag:
[coverage: high -- N sources] -- 5+ sources contributed to this section, detailed synthesis. Reader can trust this section without checking raw files.[coverage: medium -- N sources] -- 2-4 sources, decent but may miss detail. Reader should check raw sources for granular or recent questions.[coverage: low -- N sources] -- 0-1 sources or sparse data. Reader should read the raw sources directly.Calculate coverage per section, not per article. An article might have high coverage on Summary but low coverage on Experiments. This tells the reader (human or AI agent) exactly when to trust the wiki vs when to fall back to raw files.
Link style:
obsidian: Use [[relative/path/to/file]] (without .md extension)markdown: Use [filename](relative/path/to/file.md)Relative paths should be from the topics/ directory to the source file.
Parallel compilation: When possible, compile multiple topic articles in parallel using subagents. Each subagent gets one topic + its source files. This significantly speeds up first-run compilation.
After topic articles are written, look for cross-cutting patterns that span multiple topics. These become concept articles -- stored in {output}/concepts/.
How to discover concepts:
schema.md for existing concepts -- prefer updating existing concept articles over creating new onesConcept article format:
Write to {output}/concepts/{concept-slug}.md:
---
concept: {Concept Name}
last_compiled: {YYYY-MM-DD}
topics_connected: [{topic1}, {topic2}, {topic3}]
status: active
---
# {Concept Name}
## Pattern
{1-2 paragraphs describing the cross-cutting pattern. What keeps recurring and why.}
## Instances
{Each time this pattern appeared, with dates and context}
- **{date}** in [[../topics/{topic}]]: {what happened}
- **{date}** in [[../topics/{topic}]]: {what happened}
## What This Means
{Synthesis -- what the pattern tells you about your work, decisions, or blind spots.
This is the "so what" that Farzapedia calls the writer's job.}
## Sources
- [[../topics/{topic1}]]
- [[../topics/{topic2}]]
Important: Concept articles are interpretive, not just factual. They answer "what does this pattern mean?" not just "what happened?" This is what makes them useful for strategic and creative thinking.
Create the concepts/ directory if it doesn't exist.
If {output}/schema.md does not exist (first run):
${CLAUDE_PLUGIN_ROOT}/templates/schema-template.mdIf {output}/schema.md already exists:
The schema is the source of truth for wiki structure. The human can edit it between compiles to rename topics, merge them, or change conventions. The compiler respects those changes.
Write to {output}/INDEX.md:
# {name} Knowledge Base
Last compiled: {today's date}
Total topics: {count} | Total sources: {unique file count}
## Topics
| Topic | Sources | Last Updated | Status |
|-------|---------|-------------|--------|
| [[topics/{slug}]] | {count} | {date} | active |
## Recent Changes
- {date}: {what changed in this compilation run}
Always regenerate INDEX.md, even if no topics changed (it's cheap).
{output}/log.md:## {today's date}
**Topics updated:** {list}
**New topics:** {list or "none"}
**Sources scanned:** {count}
**Sources changed:** {count}
{output}/.compile-state.json:{
"last_compiled": "{today's date}",
"topics": ["{slug1}", "{slug2}", ...],
"source_locations": ["{path1}", "{path2}", ...],
"total_sources_scanned": {count}
}
After compilation, show a summary to the user: