Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Context Pack

Atlas CreativeAtlas Creative16 downloads

Bundle selected vault notes into one LLM-ready text block with a token estimate.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Bundle selected notes from your vault into one LLM-ready block of text, with a token estimate and a check against the context limits of the models you care about.

Commands

Open the command palette and run:

  • Build context pack opens a dialog. Pick a source, set the options, then Build to see the note count, the token estimate and a pass or fail line for each model limit. Copy puts the result on your clipboard. Save pack stores the source and options under a name.
    • Folder: every markdown file in the folder, including subfolders.
    • Tag: every note carrying the tag, in frontmatter or inline. Matching ignores case and the leading #.
    • Note and its links: the chosen note, plus every note it links to when Include linked notes is on. Broken links and non-markdown files are skipped.
  • Pack current note and its links builds a pack from the active note (depth 1) with your default options and copies it right away.
  • Rebuild saved pack lets you pick a saved pack, then rebuilds it from the vault as it is now and copies it.

File menu

Right-click a folder or a note in the file explorer and choose Copy as context pack. A folder packs everything under it; a note packs just that note. Both use your default options.

Output

Notes are sorted by path.

  • Markdown: each note becomes a ## Title section, optionally followed by Path: ... and a fenced yaml block of its frontmatter, then the body. Notes are separated by ---.
  • XML: everything is wrapped in <context>, with one <note path="..." title="..."> per note containing an optional <frontmatter> and a <body>. Bodies and frontmatter are wrapped in CDATA, so the content is not escaped.

Options (set per pack, with defaults in settings):

Option Effect
Format Markdown or XML
Include frontmatter Add each note's frontmatter as YAML
Include file paths Add each note's vault path
Strip embeds Remove ![[...]] embeds
Strip images Remove ![alt](url) images and image embeds such as ![[photo.png]]

Runs of three or more blank lines are collapsed to two.

Settings

In Settings → Context Pack:

  • Defaults for new packs: the format and the four toggles above.
  • Model limits: a list of names and token limits that each pack is checked against. The two entries that ship with the plugin are placeholders, so edit them to match the models you use. Add or remove entries as needed.
  • Saved packs: rename or delete the packs you saved.

Token counts are estimates

Token counts are a fast approximation (about four characters per token, with runs of whitespace collapsed). They are not produced by any model's real tokenizer, and the real count varies by model and by content. Leave some headroom when a pack is close to a limit.

Installation

Community plugins

Once Context Pack is listed, open Settings → Community plugins → Browse, search for "Context Pack", then select Install and Enable.

Manual

  1. Download main.js, manifest.json and styles.css from the latest release.
  2. Copy them into <your vault>/.obsidian/plugins/context-pack/.
  3. Reload Obsidian and enable Context Pack under Settings → Community plugins.

Development

npm install
npm run dev     # watch build
npm test        # unit tests (Vitest)
npm run build   # type-check and production build

tests/fixtures/vault is a small sample vault for manual testing. Open it as a vault in Obsidian and link or copy the built plugin files into its .obsidian/plugins/context-pack/ folder.

How to release

  1. Make sure main builds and the tests pass.

  2. Bump the version. This updates package.json, manifest.json and versions.json together and stages the changes:

    npm version patch   # or minor, major, or an exact version such as 0.2.0
    

    npm version also creates a git commit and a tag named exactly like the version, with no v prefix, which is what Obsidian requires.

  3. Push the commit and the tag:

    git push origin main --follow-tags
    
  4. The Release Obsidian plugin workflow builds the plugin and creates a draft GitHub release with main.js, manifest.json and styles.css attached. Review the draft, add notes, then publish it.

License

MIT

HealthExcellent
ReviewSatisfactory
About
Bundle selected notes into a single LLM-ready text block and estimate token usage against model context limits, showing a pass/fail for each model. Export as Markdown or XML, include frontmatter and paths, strip embeds/images as needed, and copy or save packs for quick rebuilding.
AIExport
Details
Current version
0.1.0
Last updated
5 days ago
Created
5 days ago
Updates
1 release
Downloads
16
Compatible with
Obsidian 1.5.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
GitHub Sponsors
Buy Me a Coffee
Support
Author
Atlas CreativeAtlas Creativeatlas-creative
atlascreative0.gumroad.com/
GitHubbzucker4
  1. Community
  2. Plugins
  3. AI
  4. Context Pack

Related plugins

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

Copilot

Run AI agents such as Claude Code, Codex, and OpenCode inside your vault. Turn your second brain into a smart assistant that gets knowledge work done.

Karpathy LLM Wiki

Karpathy's LLM Wiki implementation plugin for Obsidian - turns notes and PDFs into a linked, LLM-powered knowledge base with entity pages, concept pages, graph-powered Q&A, and local-first privacy.

Agent Client

Chat with Claude Code, Codex, Gemini CLI, and more via the Agent Client Protocol — right from your vault.

Gemini Scribe

Allows you to interact with Gemini and use your notes as context.

Text Generator

Generate text content using GPT-3 (OpenAI).

Voice

Listen to your notes as natural speech with text-to-speech (TTS). Read notes aloud, play them like an audiobook in the voice player, download MP3 audio and listen offline hands-free on mobile.