wiki
Wiki
This skill formalizes a notebook into a generated wiki workspace for easier indexing, organization, and retrieval.
What This Skill Owns
- Source notes stay in the notebook.
- Generated wiki artifacts live in a separate wiki root.
- The approved category tree lives at the top of
index.mdand is the classification reference. - User preferences live in the
RULES.mdfile to guide or override categorization decisions. - Category, subcategory, and topic layers each get a generated markdown synthesis page.
- Search combines
obsidian-cli search-contentwhen available, tag-aware note matching, and generated index/category search. log.mdis the persistent record of adds, removals, and lint runs.- Layer labels are written deterministically as
layer1: ...,layer2: ...,layer3: ..., and deeper when needed, so prompts and search can target a specific depth.
Retrieval-First Principles
Use these principles when indexing or searching:
- Taxonomy should optimize for how a user will try to find a note later, not for academic purity alone.
- Prefer consolidating semantically overlapping branches when they lead to the same retrieval behavior.
- For dense concept families like frameworks, optimizers, or evaluation loops, keep sibling notes clustered unless there is a strong browsing reason to split them.
- Search should infer nearby concepts, aliases, tags, and hierarchy cues instead of depending on the exact phrase the user typed.
- Good answers should return note path, hierarchy, and a short evidence snippet, not just a title match.
Dispatch
Based on user intent, choose one of the following agent to dispatch the workflow.
-
agents/setup.mdUse when the task is to establish the wiki for the first time by proposing an initial category tree. -
agents/add.mdUse for targeted note ingestion or when the user wants to add a few notes into the wiki. The agent will also maintain existing concept pages by integrating new information and noting contradictions. -
agents/index.mdUse for notebook-wide or folder-wide indexing, incremental refreshes, and rebuilds. -
agents/search.mdUse when the user wants answers or browsing help from the generated wiki. -
agents/synthesize.mdUse when the user wants a synthesized presentation of a topic assembled from matching notes. The agent can save valuable syntheses back into the user's notebook as new source notes to compound knowledge over time. -
agents/lint.mdUse when the user wants validation, cleanup guidance, or integrity checks.
Config Contract
The backend resolves config in this order:
--config <path><generated_root>/config.json~/.wiki/config.json- built-in defaults
Prefer keeping the active notebook config in _WIKI/config.json, next to index.md and log.md.
Use templates/config.json.example as the starting template.
Supported config fields:
{
"notebook_root": "/absolute/path/to/notebook",
"include_roots": [".", "Projects"],
"exclude_globs": ["_WIKI/**", ".obsidian/**", "Templates/**"],
"generated_root": "/absolute/path/to/notebook/_WIKI",
"search": {
"lexical_limit": 8
}
}
include_roots are resolved relative to notebook_root unless absolute.
Model choice is not part of the backend config. Subagents should inherit the active model from the invoking skill/session.
Hierarchy Shape
The generated wiki should default to three hierarchy layers before note leaves, but may add deeper layers when a branch gets crowded or a concept is clearly dense enough to deserve a finer split.
Rule of thumb:
- Keep each level to roughly 5-20 children.
- Prefer broad, durable buckets over narrow one-off branches.
- Prefer real topics over generic buckets like
Research,Papers,General, orMisc. - Do not shoehorn notes into an existing branch when they point to a clearer topical subtree.
- Treat fallback branches as explicit review queues, not as real long-term categories.
- Expand the tree only when a concept clearly does not fit an existing branch.
- If a branch grows past roughly 20 direct children, or multiple notes form a clear dense cluster, add another layer instead of leaving an overloaded bucket.
- Consolidate overlapping systems buckets when they reflect the same browsing intent.
- Prefix each category row with its depth marker so the tree stays machine- and prompt-friendly.
Small example:
- layer1: [Computer Science](Computer Science)
- layer2: [Artificial Intelligence](Artificial Intelligence)
- layer3: [AI Agents](AI Agents)
- layer4: [Optimization](Optimization)
- Note 1 on DSPy
- Note 2 on GEPA
Operating Rules
- Always run
uvcommands from the wiki skill directory, or use--directory <wiki skill path>to ensure dependencies are loaded correctly. - Let subagents interpret notes and queries.
- Let
src/wikicliown deterministic operations like file IO, category-page regeneration, log updates, indexing, delegated search, and lint checks. - Keep the approved category tree at the top of
index.mdas the classification reference foraddand first-timeindex. - Keep
index.mdfocused on the category tree itself. Do not regenerate a second browse-by-category section below it. - Prefer
indexfor broad refreshes andaddfor small targeted updates. indexdetects missing source notes, reports modified notes via sourcemtime, and rebuilds generated views.- For notebook-wide indexing, classify new notes with subagents in parallel when feasible, but cap concurrency at 8 notes at a time.
- For broad or ambiguous note sets, have subagents propose better topical branches instead of forcing notes into a weak existing category.
- For taxonomy disputes, prefer the branch that would make future search queries easier to succeed.
- When a concept shows up across projects, papers, and inbox notes, cluster it consistently unless there is a strong reason to preserve source-folder distinctions.
- Use
addonly when a subagent has already normalized a single note into one packet:
# ensure you're in the wiki skill directory, or use uv run --directory <path to wiki skill> wiki ...
uv run wiki add --packet '{"title":"Note title","summary":"One paragraph summary","category":"Layer 1 > Layer 2 > Layer 3","tags":["#tag-a"],"source":"relative/path/to/note.md"}'
uv run wiki index
- Keep three layers as the default floor, not a hard ceiling. Add deeper layers when a branch becomes crowded or needs a finer conceptual split.
- Use the approved category tree from the top of
index.mdwhen classifying new notes. Add new subtrees only when the existing tree is clearly insufficient. - When the notebook mixes
AI SystemsandMachine Learning Systems, prefer consolidating them under a sharedArtificial Intelligencesubtree when that matches how the user retrieves notes. - Use the deterministic
layer1:,layer2:,layer3:, and deeperlayerN:labels when referring to branches in prompts, searches, or follow-up edits. - Search responses should include hierarchy for each returned note whenever the backend can resolve it.
- Search responses should favor semantic matches with direct evidence over literal-but-weak text matches.
- Treat source notes as references; do not rewrite them in place.
- When changing this skill, always test it with a clean-slate subagent run rather than relying only on the current session context.
More from hxy9243/skills
zettel-brainstormer
Build structured brainstorming notes from a seed zettel by retrieving linked notes, preprocessing each note with subagents for relevance extraction, drafting with cited evidence, and publishing a natural blog-style post with a final References section. Use when asked to expand, research, synthesize, or publish from local Obsidian/Zettelkasten notes.
15zettel-link
This skill maintains the Note Embeddings for Zettelkasten, to search notes, retrieve notes, and discover connections between notes.
11podcast-generator
Generate high-quality audio podcasts or briefings with background music. Handles script drafting, TTS generation, and mixing with ambient tracks. Use for briefings, podcasts, or audio reports.
2