Multilingual, token-aware context routing for Obsidian and AI assistants.
Prepare compact local context packs so AI tools can inspect fewer notes before they answer.
Context Prism turns an Obsidian vault into a local retrieval layer. It ranks notes related to the active file, explains why they were selected, estimates avoided context, and copies a compact Markdown pack that can be pasted into ChatGPT, Claude, Codex, Antigravity, Cursor, or any assistant that benefits from focused context.
Nothing is sent to external services. The index is built locally from Markdown files through the Obsidian plugin API.
- Token-aware context packs for AI-assisted workflows
- Passive suggestions for the active note
- Multilingual indexing profiles:
multilingual,en,es,fr,de,it,pt - Mixed-language vault support through comma-separated language profiles
- Title, alias, metadata, TF-IDF, and BM25 lexical ranking
- Explainable candidate reasons and snippets
- Optional review modal for inserting durable wiki-links
- Folder include and exclude filters
- Fast lexical retrieval designed to stay responsive in large vaults
- No telemetry, network calls, or external AI dependency
AI assistants often waste context by reading too many notes before discovering which files matter. Context Prism moves that discovery step into the vault:
- The active note becomes the query.
- Related notes are ranked locally.
- The user copies a compact context pack.
- The assistant receives focused evidence instead of broad vault dumps.
The result is a more controlled workflow for large vaults, multilingual notes, and AI-assisted knowledge work.
- Local-first: note content stays inside the vault.
- Fast by default: ranking uses lightweight lexical signals instead of remote models or embedding generation.
- Explainable: every candidate includes visible ranking reasons.
- Practical for AI: context packs favor useful snippets over broad note dumps.
Context Prism combines TF-IDF cosine similarity with BM25-style term scoring. Titles, headings, aliases, metadata, and note bodies are weighted separately so strong structural signals can rank without turning every repeated template phrase into a match. Metadata can also boost candidates through shared area, topics, and tags.
If metadata creates noisy matches in a vault, disable Use metadata ranking or lower Metadata weight in settings.
- Open a Markdown note.
- Check the status bar for prepared context candidates.
- Run
Copy AI context pack for current note. - Paste the pack into your AI assistant before asking for analysis, writing help, or implementation planning.
- Optionally run
Review link suggestions for current noteto insert selected links under the configured footer heading.
Context Prism defaults to multilingual, which removes common stopwords across supported language profiles. For more precise ranking, configure Index languages in settings:
en
es
en, es
fr, de, it
multilingual
The current language layer is lexical and Unicode-aware. It is designed for local retrieval, not translation or semantic embedding.
Use Node.js 20.19 or newer. Node.js 22 LTS is recommended.
npm install
npm run devProduction validation:
npm run typecheck
npm test
npm run build
npm auditCopy these files into <vault>/.obsidian/plugins/context-prism/:
main.jsmanifest.jsonstyles.css
Reload Obsidian and enable Context Prism under Community plugins.
- Update
manifest.json,package.json, andversions.json. - Run
npm run typecheck,npm test,npm run build, andnpm audit. - Create a GitHub release with a tag that exactly matches
manifest.json. - Attach
main.js,manifest.json, andstyles.css.
Pushing a matching version tag can run the release workflow and attach those assets automatically.
Context Prism reads Markdown files through the local Obsidian API and stores settings in the plugin data file. It does not make network requests, collect analytics, or send note content outside the vault.
MIT
