skills/llm-wiki/SKILL.md
Build and maintain a personal knowledge wiki using LLMs. Bootstraps a portable markdown wiki for a subject area, ingests sources into it, answers queries against it, and health-checks it. Triggers on "/wiki-init", "/wiki-ingest", "/wiki-query", "/wiki-lint", or natural-language phrases like "set up a wiki for X", "ingest this source into my wiki", "query my wiki", "health-check my wiki", "lint my wiki". Use when the user wants a persistent, compounding knowledge base that the LLM maintains over time, rather than one-shot RAG against raw sources.
npx skillsauth add kyzooghost/audit-code-health-skill llm-wikiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A pattern for building a personal knowledge wiki that the LLM maintains incrementally, instead of re-deriving knowledge from raw sources on every query.
Three layers:
raw/) - immutable, user-curated. Articles, papers, transcripts, journal entries. The LLM reads but never modifies.wiki/) - LLM-owned markdown pages. Summaries, entity pages, concept pages, analyses, an index, a log.AGENTS.md at the wiki root) - per-wiki conventions and workflows. Co-evolved with the user. Tells any LLM working in the wiki how to behave.The wiki is a compounding artifact. Every ingest enriches it. Every query can be filed back into it. Cross-references, contradictions, and synthesis already live there - the LLM doesn't rebuild them on each turn.
The user curates sources, asks questions, and directs analysis. The LLM does the bookkeeping: summarizing, cross-referencing, filing, updating. Humans abandon wikis because maintenance grows faster than value. LLMs don't.
Match the user's invocation to one of four operations:
| Trigger phrases | Operation | Section |
| --- | --- | --- |
| /wiki-init, "set up a wiki for X", "form a wiki", "bootstrap a wiki" | Bootstrap | Operation: Bootstrap |
| /wiki-ingest, "ingest this source", "add this to my wiki", "process this article into the wiki" | Ingest | Operation: Ingest |
| /wiki-query, "query my wiki", "ask my wiki", "what does my wiki say about X" | Query | Operation: Query |
| /wiki-lint, "lint my wiki", "health-check my wiki", "audit my wiki" | Lint | Operation: Lint |
For Ingest/Query/Lint: if the current directory has no wiki (no AGENTS.md + wiki/ + raw/), ask the user for the wiki path or offer to bootstrap one.
Every operation follows these rules. They are intentionally portable: plain markdown, no editor- or plugin-specific syntax.
<wiki-root>/
AGENTS.md # schema/conventions for THIS wiki, co-evolved with user
raw/ # immutable user-curated sources
assets/ # downloaded images and binary assets (optional)
wiki/ # LLM-owned markdown pages
index.md # content-oriented catalog
log.md # chronological append-only record
<pages>.md
[Gandalf](gandalf.md). Never [[Gandalf]].wiki/.raw/ from the wiki page (e.g. [Article](../raw/some-article.md)).gandalf.md, the-shire.md, meeting-2026-04-15.md.[[brackets]].Optional. If a wiki uses YAML frontmatter (e.g. tags, source_count, updated), the wiki's AGENTS.md defines the schema. The skill never requires it.
index.md formatContent-oriented catalog. Flat lists grouped by category. Categories typical for most wikis:
# Index
## Entities
- [Gandalf](gandalf.md) - Maiar wizard, member of the Istari.
- [The Shire](the-shire.md) - Hobbit homeland in Eriador.
## Concepts
- [The One Ring](one-ring.md) - Sauron's master ring of power.
## Sources
- [The Fellowship of the Ring](fellowship-summary.md) - 2026-04-15.
## Analyses
- [Comparative power of the Maiar](analysis-maiar-power.md) - 2026-04-20.
Each entry: - [Title](path.md) - one-line summary. Update on every ingest and every filed-back query.
log.md formatAppend-only, chronological. Every entry starts with a parseable prefix:
## [2026-04-15] ingest | The Fellowship of the Ring (chapters 1-3)
- New: [fellowship-summary.md](fellowship-summary.md), [bilbo.md](bilbo.md)
- Updated: [gandalf.md](gandalf.md), [the-shire.md](the-shire.md), [index.md](index.md)
## [2026-04-20] query | How does the Ring corrupt its bearers?
- Filed: [analysis-ring-corruption.md](analysis-ring-corruption.md)
- Read: [one-ring.md](one-ring.md), [bilbo.md](bilbo.md), [frodo.md](frodo.md), [gollum.md](gollum.md)
## [2026-04-25] lint | health check
- 2 orphan pages, 1 broken link, 3 missing cross-references suggested
The ## [YYYY-MM-DD] {op} | {title} prefix lets the user run grep '^## \[' wiki/log.md | tail -10 to skim recent activity.
Most wikis settle on four page types. The AGENTS.md template encodes them but they are not strict.
raw/.Trigger: /wiki-init, or natural-language equivalents.
Ask the user, in one message:
tags, source_count, updated).Do not proceed until all five are answered.
Create the directory structure exactly as documented under Conventions: Directory layout:
<wiki-root>/raw/<wiki-root>/raw/assets/<wiki-root>/wiki/<wiki-root>/wiki/index.md - empty catalog stub with the four category headers (Entities, Concepts, Sources, Analyses)<wiki-root>/wiki/log.md - one bootstrap entry: ## [{today}] bootstrap | {subject_area}<wiki-root>/AGENTS.md - read references/agents-template.md, substitute the placeholders below, write the result.Placeholders to substitute in the template:
| Placeholder | Source |
| --- | --- |
| {SUBJECT_AREA} | Phase 1 answer 1 |
| {SOURCE_TYPES} | Phase 1 answer 3 |
| {OUTPUT_FORMATS} | Phase 1 answer 4 |
| {FRONTMATTER_CHOICE} | Phase 1 answer 5 (literal text describing the choice) |
| {BOOTSTRAP_DATE} | Today's date in YYYY-MM-DD format |
If a Phase 1 answer is vague, leave the placeholder filled with the user's literal phrasing - the user can refine AGENTS.md later.
Print the resulting tree (depth 2, leaves only) and tell the user:
/wiki-ingest <source-path> to file the first sourceAGENTS.md is meant to be edited as conventions emergeDo not ingest anything during bootstrap. Bootstrap is structural only.
Trigger: /wiki-ingest <source>, or natural-language equivalents.
Source can be:
raw/ or anywhere on disk - copy into raw/ if it isn't already there)raw/)raw/ with a kebab-case name from a 2-4 word summary)If the source already exists in raw/, do not overwrite. Ask for confirmation if the user re-ingests.
Read the source. Surface 3-7 key takeaways to the user. Ask:
wiki/index.md first to know what's there)Do not write to the wiki yet. Ingest is a discussion, not a dump. The source prompt this skill is based on emphasizes: "I prefer to ingest sources one at a time and stay involved."
Create wiki/<source-slug>.md with:
raw/<source-file>A single source typically touches 10-15 wiki pages. This phase is non-optional.
For each entity, concept, or claim mentioned in the source:
wiki/index.md - does a page already exist?> NOTE: ... blockquote).Cross-reference: every page that mentions another page must link to it.
index.mdAdd new pages under their categories. Refresh the one-line summaries of any pages whose scope changed.
log.md## [{today}] ingest | {Source Title}
- New: [page-1](page-1.md), [page-2](page-2.md)
- Updated: [page-3](page-3.md), [page-4](page-4.md), [index.md](index.md)
- Contradictions: 0 (or list)
Show the user the list of files created and modified, and a short summary of contradictions/uncertainties surfaced.
Trigger: /wiki-query <question>, or natural-language phrasings.
index.mdRead wiki/index.md first. It is a content-oriented catalog and is the cheapest way to find candidate pages at small/medium scale. No embedding RAG is required.
If the wiki has grown beyond what index.md can serve well (typically hundreds of pages), the wiki's AGENTS.md may declare a search tool to use instead. Defer to it.
Identify 3-10 pages relevant to the question and read them with the Read tool. Read linked pages transitively when needed.
If the answer requires raw-source detail not captured in the wiki summary, follow the citation back into raw/ and read there too.
Produce the answer in the format that fits the question:
Citations are wiki page links ([Gandalf](wiki/gandalf.md)), with raw-source links secondary.
Good answers are valuable artifacts. Ask the user: "File this back into the wiki as an analysis page?"
If yes:
wiki/analysis-<short-slug>.md## Analyses in wiki/index.md## [{today}] query | {Question} with new/read pages listedIf no, leave the wiki unchanged. The answer lives in the chat only.
Trigger: /wiki-lint, or natural-language equivalents.
Read-only. Do not auto-fix. Report findings, ranked by severity.
wiki/*.md that point to a missing file or missing heading. Use the same approach as commands/audit-docs.md Check 7.> NOTE: blockquotes left during ingest, or for direct contradictions in prose.index.md and log.md).Mirror commands/audit-docs.md:
## Wiki Lint: {N} issues found across {M} pages
### [HIGH] Broken link: {brief title}
- **Location:** wiki/gandalf.md:42 - links to `mithrandir.md`
- **Problem:** target file does not exist
- **Suggested fix:** {actionable recommendation}
### [MEDIUM] Missing page: {brief title}
- **Mentioned in:** wiki/the-shire.md:12, wiki/bilbo.md:8, wiki/frodo.md:23
- **Suggested fix:** create `wiki/sting.md` for the recurring entity
### [LOW] Orphan: wiki/old-notes.md
- No inbound links from any other wiki page.
- **Suggested fix:** link from a relevant page or remove.
After all findings, print [OK] lines for clean checks. Append a log entry summarizing the lint:
## [{today}] lint | health check
- {N} HIGH, {M} MEDIUM, {L} LOW
This skill produces wikis that work without Obsidian. The defaults below are non-negotiable:
[[wikilinks]] - standard markdown links onlyAGENTS.md, which Claude, Codex, Cursor, and other agents all read)tags:: or other Obsidian-only frontmatter syntaxIf the user happens to use one of these viewers, the wiki layers cleanly on top:
The wiki is a git repo of markdown files. Version history, branching, diffs, and collaboration come for free.
raw/. The LLM never modifies sources. Treat the directory as immutable.wiki/. The user reads it; the LLM writes it. The user can edit too, but the skill assumes LLM authorship.AGENTS.md. The skill seeds it during bootstrap; afterward both user and LLM co-evolve it.> NOTE: blockquotes during ingest. Lint elevates them.development
Sync a skill from this repo into the local machine's skill directories. Use when the user asks to make a repo skill available locally, sync a local skill for Claude, Agents, or Codex, update local skill symlinks, or follow the .claude/skills source link pattern with .agents/skills and .codex/skills symlinks.
development
Sync a command from this repo into local agent surfaces. Use when the user asks to make a repo command available locally, sync a local command for Claude, Agents, or Codex, update command symlinks, or expose a command to Codex as a skill.
testing
Use when the user asks to grill, interrogate, pressure-test, or relentlessly interview them about a plan until requirements, tradeoffs, dependencies, and implementation decisions are clear.
tools
Use when the user asks to create, update, draft, or generate a GitHub pull request, including /create-pr behavior or equivalent workflow.