Agent skill

Sage Wiki

by xoai in xoai/sage-wiki

Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.

MITAuto-check passedKnowledge Management

Install Sage Wiki

skills CLI
$ npx skills add xoai/sage-wiki --skill sage-wiki -a claude-code

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

GitHub CLI
$ gh skill install xoai/sage-wiki sage-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/xoai/sage-wiki.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sage-wiki .claude/skills/sage-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
sage-wiki
GitHub stars
623
Token cost
~2.4k tokens
SKILL.md length
940 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.

  • Works in 5 steps: Tiers are 0 / 1 / 3 — there is no Tier… → ontology.temporal.enabled defaults true… → as_of requires… → …
  • Tasks that involve LLM wikis
  • SKILL.md covers How to connect, The 19 MCP Tools, Error Codes and Opt-In Features, plus 3 more sections
  • Calls npx; needs SAGE_WIKI_TOKEN

What it does

Sage Wiki is an agent skill from xoai/sage-wiki. Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.

Its SKILL.md is about 2.4k 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 graphs and REST APIs. It works with Model Context Protocol and Obsidian. The repository describes itself as: sage-wiki is a graph memory and knowledge base that AI agents and humans build and query together. Drop in documents; an LLM compiler turns them into an interlinked wiki with a… The licence is MIT.

When your agent uses it

  • Tasks that involve LLM wikis
  • Tasks that involve Knowledge graphs
  • Tasks that involve REST APIs

Example prompts

  • “/sage-wiki”

Requirements

  • Node.js
  • A credential in SAGE_WIKI_TOKEN

Workflow steps

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

  1. Tiers are 0 / 1 / 3 — there is no Tier 2. Documents and tooltips that claim a Tier 2 are wrong.
  2. ontology.temporal.enabled defaults true (per code). ontology.triples, ontology.resolve, and ontology.communities default false.
  3. as_of requires ontology.temporal.enabled; mode=global requires ontology.communities.enabled.
  4. compile and lint are job submissions — they return 202 Accepted with a job_id, not a blocking result. Poll GET /v1/jobs/{id} for status.
  5. Evidence spans (provenance) quote the compiled summary, not the source document. The summary is the distilled, LLM-processed form.

What it can do on your machine

Read from SKILL.md and the folder at commit d3ef3a1. 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

    Shell commands in SKILL.md call:

    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SAGE_WIKI_TOKEN

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

Context cost

Sage Wiki loads about 2.4k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 940 words of instructions outside code blocks.

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

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 xoai/sage-wiki at commit d3ef3a1, republished under its MIT licence (© xoai). 940 words, ~2,420 tokens.

Download SKILL.mdSave it as .claude/skills/sage-wiki/SKILL.md (or your agent's skills folder).
name
sage-wiki
description
Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.
version
0.1.0
generated
skillgen — do not hand-edit

sage-wiki

Local-first knowledge graph that compiles documents into an interlinked, human-readable wiki with provenance. Exposes 19 MCP tools over stdio/SSE and a versioned REST API under /v1/. Output is Obsidian-compatible markdown.

How to connect

MCP (primary): The server runs as a subprocess over stdio, or over SSE/HTTP:

json
{
  "mcpServers": {
    "sage-wiki": {
      "command": "sage-wiki",
      "args": ["serve", "--transport", "stdio", "--project", "/path/to/wiki"]
    }
  }
}

REST (/v1/): When the server is running with --ui, the REST facade is at /v1/. Auth is Bearer-token (same as SAGE_WIKI_TOKEN); loopback is zero-config. All errors use a fixed {error: {code, message, details}} envelope.

The 19 MCP Tools

wiki_add_ontology (write)

Create an ontology entity or relation.

  • REST: POST /v1/ontology/entities / POST /v1/ontology/relations
    ArgumentTypeRequiredDefault
    entity_idstringno—
    entity_namestringno—
    entity_typestringno—
    relationstringno—
    source_idstringno—
    target_idstringno—
wiki_add_source (write)

Add a source file to a source folder and update the manifest.

  • REST: POST /v1/sources
    ArgumentTypeRequiredDefault
    pathstringyes
    typestringno—
wiki_capture (write)

Capture knowledge from a conversation or text.

  • REST: POST /v1/capture
    ArgumentTypeRequiredDefault
    contentstringyes
    contextstringno—
    tagsstringno—
wiki_commit (write)

Git add and commit all changes.

  • REST: POST /v1/git/commit
    ArgumentTypeRequiredDefault
    messagestringno—
wiki_compile (async)

Run the full compile pipeline: diff → summarize → extract concepts → write articles.

  • REST: POST /v1/jobs/compile (async — 202 + job_id)
    ArgumentTypeRequiredDefault
    dry_runbooleannofalse
    freshbooleannofalse
    prunebooleannofalse
wiki_compile_diff (read)

Show added/modified/removed source files compared to the manifest.

  • REST: GET /v1/compile/diff
wiki_compile_topic (async)

Compile sources for a specific topic on demand.

  • REST: POST /v1/jobs/compile?topic=... (async — 202 + job_id)
    ArgumentTypeRequiredDefault
    max_sourcesnumberno—
    topicstringyes
wiki_graph_query (read)

Answer a relational question by graph traversal: seed entities are resolved from the question (aliases resolve to their canonical entity), a bounded multi-hop subgraph is serialized, and the answer is grounded ONLY in those edges — every citation carries source_doc and confidence provenance.

  • REST: POST /v1/graph/query
    ArgumentTypeRequiredDefault
    as_ofstringno—
    hopsnumberno—
    max_edgesnumberno—
    modestringno—
    questionstringyes
wiki_learn (write)

Store a learning entry for the self-learning loop.

  • REST: POST /v1/learnings
    ArgumentTypeRequiredDefault
    contentstringyes
    tagsstringno—
    typestringyes
wiki_lint (async)

Run linting passes on the wiki.

  • REST: POST /v1/jobs/lint (async — 202 + job_id)
    ArgumentTypeRequiredDefault
    fixbooleannofalse
    passstringno—
wiki_list (read)

List wiki articles, optionally filtered by entity type.

  • REST: GET /v1/entities
    ArgumentTypeRequiredDefault
    typestringno—
wiki_ontology_query (read)

Query the ontology graph.

  • REST: GET /v1/ontology/{entity}/traverse
    ArgumentTypeRequiredDefault
    depthnumberno—
    directionstringno—
    entitystringyes
    relationstringno—
wiki_provenance (read)

Show source-article provenance.

  • REST: GET /v1/provenance
    ArgumentTypeRequiredDefault
    articlestringno—
    sourcestringno—
wiki_query (compound)

Ask a free-form question against the wiki: searches sources and compiled articles, synthesizes a cited answer with the LLM (spends LLM budget), and files the result to wiki/under_review/ by default (trust output review) or wiki/outputs/ only when trust include_outputs is 'true'.

  • REST: —
    ArgumentTypeRequiredDefault
    questionstringyes
    top_knumberno—
wiki_read (read)

Read the full content of a wiki article by path.

  • REST: GET /v1/articles/{path}
    ArgumentTypeRequiredDefault
    pathstringyes
wiki_search (read)

Search the wiki with hybrid retrieval: BM25 + vector over documents and chunks, fused with ontology-graph proximity.

  • REST: GET /v1/search
    ArgumentTypeRequiredDefault
    boost_tagsstringno—
    channelsstringno—
    expandbooleannofalse
    limitnumberno—
    querystringyes
    rerankbooleannofalse
    tagsstringno—
Show full SKILL.md (372 more words)Show less
wiki_status (read)

Show wiki stats: sources, concepts, entries, vectors, entities, relations.

  • REST: GET /v1/status
wiki_write_article (write)

Write a concept article, create ontology entity, and embed vector.

  • REST: PUT /v1/articles/{concept}
    ArgumentTypeRequiredDefault
    conceptstringyes
    contentstringyes
wiki_write_summary (write)

Write a summary markdown file, index in FTS5, and optionally embed vector.

  • REST: PUT /v1/summaries
    ArgumentTypeRequiredDefault
    conceptsstringno—
    contentstringyes
    sourcestringyes

Error Codes

Branch on code, never on message:

CodeHTTPWhen
invalid_argument400Missing, malformed, or out-of-range argument.
unauthenticated401Missing or invalid Bearer token.
forbidden403Host not allowed; path containment violation.
not_found404Article, entity, or job does not exist.
conflict409Compile already in progress; job already finished.
feature_disabled412as_of without temporal enabled; mode=global without communities enabled.
payload_too_large413Capture content over 100 KB.
internal500Unclassified tool failure. Message must not leak paths.
unavailable503Backend / store unavailable.

Opt-In Features

All opt-in flags live under config.yaml → ontology:

FlagDefaultUnlocks
ontology.temporal.enabledtrueHistorical queries (as_of in graph_query), temporal validity edges.
ontology.triples.enabledfalseSubject-predicate-object fact extraction from articles.
ontology.resolve.enabledfalseEntity resolution — merges duplicate entities across documents.
ontology.communities.enabledfalseCommunity detection via Louvain; mode=global in graph_query.

Tiers

Sources are assigned a tier determining compile depth:

TierLabelWhat Happens
0IndexFile metadata only — no LLM cost.
1EmbedVector embeddings — no LLM summarization.
3Full CompileSummarize → extract concepts → write articles. Tier 3 is ~5–8 min/doc. There is no Tier 2.

There is no Tier 2. Tiers go 0 → 1 → 3.

Important Correctness Points

  1. Tiers are 0 / 1 / 3 — there is no Tier 2. Documents and tooltips that claim a Tier 2 are wrong.
  2. ontology.temporal.enabled defaults true (per code). ontology.triples, ontology.resolve, and ontology.communities default false.
  3. as_of requires ontology.temporal.enabled; mode=global requires ontology.communities.enabled.
  4. compile and lint are job submissions — they return 202 Accepted with a job_id, not a blocking result. Poll GET /v1/jobs/{id} for status.
  5. Evidence spans (provenance) quote the compiled summary, not the source document. The summary is the distilled, LLM-processed form.

Install

bash
# MCP (stdio — primary integration path)
sage-wiki serve --project /path/to/wiki

# REST (with Web UI)
sage-wiki serve --ui --project /path/to/wiki

# Agent skill installation
npx skills add https://github.com/xoai/sage-wiki --skill sage-wiki

Pre-1.0 notice: Every surface here is experimental. Tool semantics, argument names, and REST routes may change between versions. Pin the version you depend on.

Generated by tools/skillgen — 19 tools in registry.

© xoai, 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/sage-wiki of xoai/sage-wiki.

Open the folder on GitHubat commit d3ef3a1

Compare with similar skills

Sage 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.

Sage Wiki compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sage Wiki this skillxoai/sage-wiki623—~2.4kAutomated safety check: PassMIT
Confluence To Markdowniurykrieger/claude-bedrock1051 repos~2.8kAutomated safety check: NotesMIT
Swarmvaultswarmclawai/swarmvault710—~6.1kAutomated safety check: PassMIT
Arkon Editnduckmink/arkon1.5k—~1.6kAutomated safety check: PassCustom licence
Arkon Querynduckmink/arkon1.5k—~1kAutomated safety check: PassCustom licence
LLM Wikizosmaai/pi-llm-wiki608—~4.4kAutomated safety check: PassMIT

Similar skills

  • Confluence To Markdown

    iurykrieger/claude-bedrock

    Internal fetcher module for Confluence pages. An agent skill from iurykrieger/claude-bedrock.

    105 GitHub starsUsed in 1 repo~2.8k tokens
    Knowledge ManagementAuto-check: notes
  • Swarmvault

    swarmclawai/swarmvault

    Use SwarmVault when the user needs a local-first knowledge vault that writes durable markdown, graph, search, dashboard, review, chat-session, context-pack, task-ledger, static AI export, retrieval…

    710 GitHub stars~6.1k tokensUpdated 3 mo 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
  • 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
  • LLM Wiki

    zosmaai/pi-llm-wiki

    Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern.

    608 GitHub stars~4.4k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Arkon Review

    nduckmink/arkon

    Review, approve, request changes on, or reject pending wiki edit drafts in Arkon.

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

More from xoai/sage-wiki

  • Sage Wiki Integrate

    xoai/sage-wiki

    Pipeline skill that wires sage-wiki into an existing project — detects language, installs the client, runs a smoke test, and reports.

    623 GitHub stars~861 tokensUpdated 4 days ago
    Auto-check passed

Questions about Sage Wiki

What does Sage Wiki do?

Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output. Sage Wiki is an agent skill from xoai/sage-wiki. Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.

When should I use Sage Wiki?

Sage Wiki fits situations like: tasks that involve LLM wikis; tasks that involve Knowledge graphs; tasks that involve REST APIs.

How do I install Sage Wiki in Claude Code?

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

How do I install Sage Wiki in Codex?

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

Can I use Sage 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 xoai/sage-wiki --skill sage-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/sage-wiki, .gemini/skills/sage-wiki, .github/skills/sage-wiki and .opencode/skills/sage-wiki in your project.

What does Sage Wiki need to run?

Going by SKILL.md and its folder, Sage Wiki needs the command-line tools its instructions call (npx) and credentials named SAGE_WIKI_TOKEN. Our summary lists: Node.js; A credential in SAGE_WIKI_TOKEN.

Does Sage Wiki access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Sage 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 Sage Wiki use?

Sage Wiki is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sage Wiki use?

About 2.4k tokens (SKILL.md is roughly 9.7k 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 Sage Wiki?

Skills that share tags, products or a category with Sage Wiki: Confluence To Markdown (iurykrieger/claude-bedrock, 105 stars), Swarmvault (swarmclawai/swarmvault, 710 stars), Arkon Edit (nduckmink/arkon, 1.5k stars) and Arkon Query (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 Sage Wiki?

xoai (a GitHub user) maintains it in xoai/sage-wiki, which has 623 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

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