modules/home/programs/cli-agents/shared/skills/workflows/llm-wiki/SKILL.md
Build a comprehensive, LLM-friendly Obsidian wiki for any codebase using parallel subagents. Use when the user asks to "document the repository", "build a wiki", "create a knowledge base", "generate docs for the whole project", or wants an LLM-navigable map of a codebase. Produces atomic, interlinked notes with YAML frontmatter, Mermaid diagrams, and a graph-view-ready structure.
npx skillsauth add not-matthias/dotfiles-nix 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.
Build a comprehensive Obsidian wiki that gives any LLM (or developer) a navigable knowledge graph of an entire codebase. The wiki is a set of atomic, interlinked markdown notes with YAML frontmatter, organized into a flat folder structure with a Map-of-Content (MOC) index.
read, write, find/search, and agent/task tools (for parallel subagents)Cargo.toml, package.json, go.mod, pyproject.toml, etc.) or a discoverable module structure<target-dir>/ # user-specified or .agents/wiki/
├── index.md # Main entry point (MOC)
├── glossary.md # Shared terminology
├── log.md # Prepend-only build log
├── .obsidian/ # Graph view config (optional)
├── architecture/ # System-level design notes
├── modules/ # One note per crate/package/module
├── concepts/ # Domain concepts and patterns
├── guides/ # How-to guides
└── reference/ # Reference material (APIs, existing docs, links)
Folder names adapt to the project. For a Rust workspace: crates/. For a monorepo: packages/. For a Python project: modules/. Keep it to 5-7 top-level folders.
Search for current LLM-wiki and Obsidian-vault best practices:
Key principles to apply:
| Principle | What it means in practice |
|-----------|--------------------------|
| Three-layer architecture | Codebase is source of truth; wiki is agent-maintained markdown; schema (CLAUDE.md) co-evolves |
| Atomic notes | One concept/crate/component per note |
| Flat structure | 5-7 top-level folders, MOC index notes instead of deep nesting |
| YAML frontmatter | Every note: title, type, tags, related, last_updated |
| [[wikilinks]] | Bidirectional links for graph view; link liberally |
| Mermaid diagrams | Architecture, data flow, sequence diagrams |
| Concise + structured | LLMs perform better with focused context |
Do NOT skip scouting. You need the full work-list before fanning out.
Cargo.toml, package.json, go.mod, etc.) to identify all workspace members/packagesread each top-level directory to map structureAGENTS.md, CLAUDE.md, README.md, docs/*.md, .github/copilot-instructions.mdRecord:
Write a shared context markdown file to a normal relative path within the project (e.g. <target-dir>/_shared-context.md). Include:
Gotcha: Do NOT use
local://URIs for the shared context file. Some tooling creates a literallocal:directory (with the colon) that Pythonos.path.expandusercannot resolve. Use a normal relative path and pass the absolute path to subagents.
Group modules into 6-9 task groups by subsystem. Each subagent:
lib.rs/mod.rs/index.ts/__init__.py, AGENTS.md, tests)write toolTask grouping strategy (adapt to language):
| Group | What it covers |
|-------|---------------|
| Core types/IR | Central data structures, domain model |
| Compilers/lifters | Translation pipelines |
| Analysis tools | Slicers, analyzers, passes |
| CLI + tests + guides | Entry points, test suites, user guides |
| Foundational crates | Binary parsing, config, utilities |
| Legacy/alternative implementations | Older versions, excluded modules |
| Project-level packages | FFI bindings, external tools, generators |
| Existing docs synthesis | Read all docs/*.md, write architecture + concept notes |
Each subagent prompt must include:
[[wikilinks]] and the note templateAfter Wave 1 returns, write the top-level files:
index.md — Main MOC:
glossary.md — Shared terminology:
[[wikilink]]log.md — Prepend-only build log:
[YYYY-MM-DD] summary: what was done, decisions, coverage, quality stats.obsidian/ config (optional, for graph view):
app.json: alwaysUpdateLinks: true, useMarkdownLinks: falsecore-plugins.json: enable graph, backlink, outgoing-link, tag-panegraph.json: color groups per folder, force layout settingsRun a completeness audit:
[[target]] links that don't resolve to a note. Fix by creating missing notes or correcting the link.--- YAML frontmatter.## Summary section.False positive: Literal mentions of
[[wikilinks]]in backticks (e.g. in log.md describing the syntax) will appear as broken links. Filter these out.
_shared-context.md temp file| Metric | How to count |
|--------|-------------|
| Total notes | find <dir> -name '*.md' \| wc -l |
| Wikilinks | grep -roh '\[\[[^]\|#]*' <dir> --include='*.md' \| wc -l |
| Mermaid diagrams | grep -r '```mermaid' <dir> --include='*.md' \| wc -l |
| Broken links | Should be 0 after audit |
Every note MUST follow this format. See references/note-template.md for the full template and references/obsidian-config.md for the .obsidian/ config files.
---
title: <Note Title>
type: <architecture | module | concept | guide | reference>
tags: [list, of, tags]
related: ["[[other-note]]", "[[another-note]]"]
last_updated: YYYY-MM-DD
---
# <Title>
## Summary
One paragraph summary.
## Details
... (technical content, code blocks, Mermaid diagrams)
## Key Types / APIs
- `TypeName` - brief description
## Relationships
- Links to related notes via [[wikilinks]]
| Repository size | Subagents | Notes per agent | |----------------|-----------|-----------------| | < 10 modules | 3-4 | 2-3 | | 10-30 modules | 6-9 | 3-5 | | 30-60 modules | 9-12 | 4-6 | | 60+ modules | 12-15 | 4-6 (split by subsystem) |
Issue: Subagents write to relative paths instead of the wiki directory.
Issue: Broken wikilinks after audit.
Issue: Notes are too shallow (just a summary, no technical detail).
Issue: Duplicate content across notes.
documentation
Save notes, journal entries, and research to the personal-notes Obsidian vault (personal-vault-v2). Use when the user asks to 'save note', 'save to notes', 'write to personal notes', 'save to daily notes', 'note this down', or wants to persist findings/analysis to their personal vault.
documentation
Use whenever the user asks to address, fix, resolve, review, or respond to pull-request comments or review feedback.
development
Apply Not Matthias's Rust-first personal coding style. Use whenever the user explicitly asks to apply or review their code style, make Rust match their preferences, perform a style pass, or simplify/refactor according to their conventions. Inspect only task-touched code, honor local project conventions first, and make only safe opt-out style edits.
development
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.