wiki-context-pack

Generate token-bounded, citation-ready context slices from an Obsidian vault for downstream agents.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill wiki-context-pack-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wiki-context-pack
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/wiki-context-pack
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill wiki-context-pack-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires obsidian-wiki.

What problem does it solve? Feeding an entire Obsidian vault into an agent wastes tokens and loses focus. This Skill produces a bounded, citation-ready context slice on a specific topic (or recent activity) so downstream agents get exactly the relevant knowledge without manual copy-pasting. ## Core Features & Use Cases - Topic-Based Context Packing: Extract a token-budgeted slice of vault notes for a given topic with citations preserved. - Recent Activity Mode: Pack recently changed notes using the --recent flag instead of a topic. - Visibility and Metadata Controls: Filter with --public-only or --metadata-only, and emit machine-readable output with --json. - Use Case: Before delegating a research task to a sub-agent, run a context pack on the topic "distributed systems" with an 8000-token budget and pass the cited excerpts directly as its reference material. ## Quick Start Ask the agent to pack your Obsidian vault for a topic, for example: use my vault as context for "project planning" with a budget of 8000 tokens.

Frequently Asked Questions about wiki-context-pack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use my Obsidian vault as context for an AI agent?

Run the context-pack command with your vault path and a topic, for example obsidian-wiki context-pack --vault "$OBSIDIAN_VAULT_PATH" "my topic" --budget 8000. The output is a token-bounded, citation-ready slice you can pass directly to the agent.

How do I limit the token size of vault context?

Use the --budget flag to cap the context slice size; the default budget is 8000 tokens. The CLI enforces the budget while preserving citations and visibility boundaries in the output.

Can I pack only recent changes from my Obsidian vault?

Yes, pass the --recent flag instead of a topic to build a context pack from recent vault activity. The default 8000-token budget still applies unless you override it with --budget.

What if the obsidian-wiki command is not installed?

If the obsidian-wiki executable is unavailable, the Skill falls back to running python3 -m obsidian_wiki.cli from a configured OBSIDIAN_WIKI_REPO clone. If neither exists, install it with pip install obsidian-wiki or rerun setup from a valid clone.

Does the context pack modify my Obsidian vault?

No, the Skill is strictly read-only and never modifies the vault, including log.md, index.md, hot.md, or .manifest.json. It only reads notes and returns the generated context slice as output.

How do I get machine-readable JSON output from a context pack?

Append the --json flag to the context-pack command. The Skill returns the CLI stdout only, with no surrounding prose, so the JSON can be parsed directly by downstream tooling.