Agent skill

Wiki

by SethGammon in SethGammon/Citadel

Markdown-first knowledge base where the LLM acts as librarian.

MITAuto-check passedKnowledge Management

Install Wiki

skills CLI
$ npx skills add SethGammon/Citadel --skill wiki -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SethGammon/Citadel wiki --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SethGammon/Citadel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/wiki .claude/skills/wiki && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wiki
GitHub stars
922
Token cost
~1.5k tokens
SKILL.md length
656 words
Files
1
Skills in repo
48
Repo updated
First seen
Licence
MIT

At a glance

Markdown-first knowledge base where the LLM acts as librarian.

  • Works in 4 steps: Read wiki/index.md, identify 1-5… → Read those topics; follow… → Produce a clear answer citing specific… → …
  • Tasks that involve LLM wikis
  • SKILL.md covers Orientation, Directory Structure, Commands and Protocol, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Wiki is an agent skill from SethGammon/Citadel. Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering LLM wikis, Knowledge bases and Embeddings. The repository describes itself as: The operating layer for Claude Code + OpenAI Codex: persistent project memory, intent routing, safety hooks, cost telemetry, and parallel agent fleets. The licence is MIT.

When your agent uses it

  • Tasks that involve LLM wikis
  • Tasks that involve Knowledge bases
  • Tasks that involve Embeddings

Example prompts

  • “/wiki”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read wiki/index.md, identify 1-5 relevant topic files, explain reasoning briefly
  2. Read those topics; follow [[cross-links]] up to 2 hops if relevant
  3. Produce a clear answer citing specific topic files used
  4. If the wiki lacks enough information: state what it knows, list gaps, suggest /wiki --add for missing areas

What it can do on your machine

Read from SKILL.md and the folder at commit e41ff1d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wiki loads about 1.5k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 656 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SethGammon/Citadel at commit e41ff1d, republished under its MIT licence (© SethGammon). 656 words, ~1,514 tokens.

Download SKILL.mdSave it as .claude/skills/wiki/SKILL.md (or your agent's skills folder).
name
wiki
description
Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.
license
MIT
user-invocable
true
auto-trigger
false
trigger_keywords
wiki, knowledge base, llm wiki, project wiki, build a wiki, maintain knowledge, knowledge management, llm-wiki, karpathy wiki
last-updated
2026-04-06

/wiki -- LLM-Native Knowledge Base

Orientation

Use when: building and querying a markdown-first knowledge base -- ingests raw notes, deduplicates, surfaces answers. Don't use when: capturing session learnings into the evolve pipeline (use /learn); generating structured code documentation (use /doc-gen).

Directory Structure

text
wiki/
  index.md              # Master index
  raw/                  # Unprocessed sources (timestamped files)
  topics/               # Compiled topic files (one per topic, interlinked)
  .wiki-meta.json       # Stats: topic count, source count, last compaction

Commands

CommandBehavior
/wikiStatus overview: topic count, last update, pending raw sources
/wiki --add [source]Ingest a new source into the wiki
/wiki --query [question]Answer a question using wiki knowledge
/wiki --statusDetailed wiki health: topic count, staleness, orphan detection
/wiki --compactMerge, deduplicate, and reorganize topics
/wiki --rebuild-indexRegenerate index.md from current topic files
/wiki init [path]Initialize a new wiki at the specified path

Protocol

Command: /wiki init [path]

Create wiki/, wiki/raw/, wiki/topics/, an empty wiki/index.md, and wiki/.wiki-meta.json with fields: created, lastUpdated, topicCount: 0, sourceCount: 0, totalWords: 0, lastCompaction: null. Default path: wiki/ at project root.

Command: /wiki --add [source]

Ingest a new source into the wiki.

Step 1: Determine source type — URL (fetch with WebFetch), file path (read), raw text (use directly), no argument (ask user).

Step 2: Write raw content to wiki/raw/source-{timestamp}.md with header: title/URL, ingested date, type, original reference.

Step 3: Identify 1-5 topics. For each: check if a topic file already exists — append to existing or create wiki/topics/{slug}.md.

Step 4: Each topic file has: title, > Last updated, > Sources, compiled content, and ## Related Topics with [[slug]] cross-links. Scan existing topics for cross-links when writing.

Step 5: Regenerate wiki/index.md with stats header, Topics table ([[slug]] | summary | last updated), and Recent Sources table.

Step 6: Update wiki/.wiki-meta.json with new counts.

Step 7: Output: source description, topics created, topics updated, index counts.

Command: /wiki --query [question]
  1. Read wiki/index.md, identify 1-5 relevant topic files, explain reasoning briefly
  2. Read those topics; follow [[cross-links]] up to 2 hops if relevant
  3. Produce a clear answer citing specific topic files used
  4. If the wiki lacks enough information: state what it knows, list gaps, suggest /wiki --add for missing areas
Command: /wiki --status

Read meta, count topic files and raw sources, check for orphaned topics, broken cross-links, and stale topics (30+ days). Output: topic/source/word counts, last updated/compaction dates, and health issues with counts and lists.

Command: /wiki --compact
  1. Read wiki/index.md and all topic files
  2. Identify: merge candidates (overlapping subjects), split candidates (multiple distinct subjects), stale/outdated content, duplicates
  3. For each change: describe what and why, make the change, update all affected cross-links
  4. Rebuild wiki/index.md and update wiki/.wiki-meta.json with lastCompaction and new counts
  5. Output: topics merged/split/removed/resolved, final count, estimated words
Show full SKILL.md (241 more words)Show less
Command: /wiki --rebuild-index

Read all topic files, extract title/summary/date, write a fresh wiki/index.md. Output: "Index rebuilt with {count} topics."

Fringe Cases

  • .planning/ does not exist: Run /do setup first to initialize the harness state directory.
  • No wiki directory: Prompt to run /wiki init. Do not auto-create on query or status.
  • Source >50K words: Split into sections, warn the user.
  • Topic name collision: Merge into existing topic, do not overwrite.
  • Empty wiki queried: "The wiki is empty. Add sources with /wiki --add."
  • Broken cross-link: During compaction/rebuild — flag. During --add — create stub [[missing-topic]] (stub -- needs content) if no context.
  • URL fetch fails: Report failure, suggest pasting content directly.
  • Wiki >~400K words: Warn during --status, suggest archiving or /wiki --compact.

Contextual Gates

Disclosure: "Updating wiki at .planning/wiki/. Files will be created or modified." Reversibility: amber — creates and modifies .planning/wiki/ files; undo by deleting or reverting changed files. Trust gates:

  • Any: all wiki commands (init, add, query, status, compact, rebuild-index).

Quality Gates

  • Every topic file must have a title, last-updated date, and sources list
  • Every topic file must have at least one cross-link to another topic (unless it is the only topic)
  • The index must accurately reflect all topic files (no orphans after --add or --compact)
  • No duplicate topic files (same slug = same file)
  • Raw sources are preserved in wiki/raw/ and never deleted
  • The --query command must cite specific topic files, not fabricate information

Exit Protocol

Output a summary appropriate to the command executed, then:

---HANDOFF---
- Wiki: {command executed} at {wiki path}
- Topics: {count} total, {new/updated/merged count} changed
- Status: {healthy | needs compaction | has orphans/broken links}
---

© SethGammon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/wiki of SethGammon/Citadel.

Open the folder on GitHubat commit e41ff1d

Compare with similar skills

Wiki next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wiki compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wiki this skillSethGammon/Citadel922—~1.5kAutomated safety check: PassMIT
LLM Wiki Knowledge GraphEgonex-AI/Understand-Anything85k1 repos~1.5kAutomated safety check: PassMIT
LLM Wikilewislulu/llm-wiki-skill655—~3.7kAutomated safety check: PassNone
Wiki Builderrohitg00/pro-workflow2.9k—~1kAutomated safety check: PassNone
Arkon Editnduckmink/arkon1.5k—~1.6kAutomated safety check: PassCustom licence
Research Wiki Builderdair-ai/dair-academy-plugins614—~1.3kAutomated safety check: PassMIT

Similar skills

  • LLM Wiki Knowledge Graph

    Egonex-AI/Understand-Anything

    Detects a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit relationships and topic clusters.

    85k GitHub starsUsed in 1 repo~1.5k tokens
    Knowledge ManagementAuto-check passed
  • LLM Wiki

    lewislulu/llm-wiki-skill

    Build and maintain a Karpathy-style LLM knowledge base — a self-compiling Obsidian markdown wiki where an Agent ingests raw sources, compiles cross-linked concept/entity/summary pages, answers…

    655 GitHub stars~3.7k tokensUpdated 5 mo ago
    Knowledge ManagementAuto-check passed
  • Wiki Builder

    rohitg00/pro-workflow

    Start, structure, and grow a persistent research wiki indexed in pro-workflow's SQLite knowledge base.

    2.9k GitHub stars~1k tokensUpdated 8 days ago
    Knowledge ManagementAuto-check passed
  • Arkon Edit

    nduckmink/arkon

    Propose or directly apply edits to Arkon wiki pages, including proposing brand new pages.

    1.5k GitHub stars~1.6k tokensUpdated 4 mo ago
    Knowledge ManagementAuto-check passed
  • Research Wiki Builder

    dair-ai/dair-academy-plugins

    Creates and maintains configurable research wikis: scaffold a folder, add sources, compile pages and indexes, and file query answers back.

    614 GitHub stars~1.3k tokensUpdated 2 mo ago
    Knowledge ManagementAuto-check passed
  • Arkon Query

    nduckmink/arkon

    Answer questions using the Arkon knowledge base. An agent skill from nduckmink/arkon.

    1.5k GitHub stars~1k tokensUpdated 4 mo ago
    Knowledge ManagementAuto-check passed

More from SethGammon/Citadel

All 48 skills in this repo
  • Create Skill

    SethGammon/Citadel

    Creates new skills from the user's repeating patterns. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed
  • Houseclean

    SethGammon/Citadel

    Cross-drive storage audit and cleanup. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.2k tokensUpdated 6 days ago
    Auto-check passed
  • Loop

    SethGammon/Citadel

    Bounded foreground repetition for the current session. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.4k tokensUpdated 6 days ago
    Auto-check passed
  • Triage

    SethGammon/Citadel

    GitHub issue and PR investigator. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check passed
  • Watch

    SethGammon/Citadel

    File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills.

    922 GitHub stars~2.9k tokensUpdated 6 days ago
    Auto-check passed
  • Archon

    SethGammon/Citadel

    Autonomous multi-session campaign agent. An agent skill from SethGammon/Citadel.

    922 GitHub stars~5.4k tokensUpdated 6 days ago
    Auto-check passed

Questions about Wiki

What does Wiki do?

Markdown-first knowledge base where the LLM acts as librarian. Wiki is an agent skill from SethGammon/Citadel. Markdown-first knowledge base where the LLM acts as librarian.

When should I use Wiki?

Wiki fits situations like: tasks that involve LLM wikis; tasks that involve Knowledge bases; tasks that involve Embeddings.

How do I install Wiki in Claude Code?

Run `npx skills add SethGammon/Citadel --skill wiki -a claude-code`. Or copy the skill folder (skills/wiki in SethGammon/Citadel) into .claude/skills/wiki in your project. Claude Code loads it when a task matches its description.

How do I install Wiki in Codex?

Run `npx skills add SethGammon/Citadel --skill wiki -a codex`. Or copy the skill folder (skills/wiki in SethGammon/Citadel) into .agents/skills/wiki in your project. Codex loads it when a task matches its description.

Can I use Wiki in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SethGammon/Citadel --skill wiki -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wiki, .gemini/skills/wiki, .github/skills/wiki and .opencode/skills/wiki in your project.

What does Wiki need to run?

SKILL.md names no scripts, command-line tools or credentials: Wiki is instructions for the agent only.

Does Wiki access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Wiki safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Wiki use?

Wiki is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wiki use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wiki?

Skills that share tags, products or a category with Wiki: LLM Wiki Knowledge Graph (Egonex-AI/Understand-Anything, 85k stars), LLM Wiki (lewislulu/llm-wiki-skill, 655 stars), Wiki Builder (rohitg00/pro-workflow, 2.9k stars) and Arkon Edit (nduckmink/arkon, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wiki?

SethGammon (a GitHub user) maintains it in SethGammon/Citadel, which has 922 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 1, 2026.

Source: SethGammon/Citadel on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.