# Prism plugin for Obsidian Prism is an [[Obsidian]] community plugin that renders interactive charts, diagrams, dashboards and formulas from ` ```viz ` code blocks. It's built by floorianmb, open source under the [[MIT License]], and written in [[TypeScript]]. The repository was created on 2026-10-08 and had 16 GitHub releases by 2026-10-18. Prism is designed to be written by [[AI Agents]] (namely [[Claude Code]] and [[OpenAI Codex]]), and it gives the agent a way to look at its own output. ## Why it exists An agent can write a chart, but it can't see whether that chart renders. Without feedback, you end up copy-pasting screenshots and error messages back into the chat. Prism closes that loop: 1. The agent writes a ` ```viz ` block in a note 2. It runs `node .obsidian/plugins/prism-viz/scripts/prism-render.mjs "Books.md"` 3. The note renders invisibly in the running Obsidian app 4. The script prints JSON with every error (with the note line number) and the paths of PNG snapshots, then exits with a status code (0 = ok, 1 = block errors, 2 = render failed, 3 = Obsidian not reachable) 5. The agent fixes the block, looks at the snapshot and renders again until it's clean There's also an offline mode (`--lint`) that checks YAML, unknown keys, missing tables or columns and script syntax without Obsidian running. The idea is lint first, then render for the snapshot. This is an [[Agentic loops|agentic loop]] with a real [[Feedback Loop]] wired in: the same generate-then-verify approach as [[Archify]], but inside your vault instead of in a standalone HTML file. The plugin ships an [[AI Agent Skills|agent skill]] (`SKILL.md` with a plan, write, render, fix workflow, plus `design.md` and `reference.md`). An install script copies it to `~/.claude/skills/prism` and `~/.codex/skills/prism`. For other agents, the *Prism: Generate agent rules* command writes a `PRISM.md` file and a snippet for `CLAUDE.md` or `AGENTS.md`. This fits how I like to use AI with Obsidian: the agent runs outside the app, works on plain files, and the plugin just gives it better tools. No chat sidebar needed. ## Your notes are the data Charts can read from the note itself or from the whole vault: - **No-code charts**: a YAML spec pointing at a [[Markdown]] table (`source: ^stats`). Edit the table and the chart follows - **Frontmatter**: `source: notes` gives one row per note with all its properties, so "notes per status" takes a few lines of YAML - **Tasks**: `source: tasks`, including dates and priorities from the [[Tasks plugin for Obsidian|Tasks plugin]] - **Links**: `source: links` with `type: graph` draws the link network of your notes - **Data files**: CSV, TSV, JSON, GeoJSON and YAML, read-only, limited to the folders you allow in the settings - **JavaScript**: `prism.notes()` and `prism.note()` expose frontmatter, headings, links, backlinks, tasks and tables to custom code Chart types include bar, line, KPI tiles, timelines (Gantt), Sankey diagrams, calendar heatmaps and maps. [[Mermaid]] diagrams get clickable `[[links]]` in their nodes, and formulas render with KaTeX ([[LaTeX]] syntax). It also adds a "Prism chart" view to [[Obsidian Bases]]. Widgets can write back to their own note (`prism.edit.setTask`, `setCell`, `addRow`, `setProperty`) for habit trackers, checklists or quick-entry forms. Each block asks once for permission, edits can be undone with Ctrl/Cmd+Z, and other notes are never touched. So it overlaps with a lot of plugins at once: [[Dataview plugin for Obsidian|Dataview]] queries, the [[Heatmap calendar plugin for Obsidian|Heatmap calendar]], [[Life Tracker plugin for Obsidian|Life Tracker]] visualizations, and custom code through [[CustomJS plugin for Obsidian|CustomJS]]. ## Security model A viz block runs HTML and JavaScript, so the defaults matter: - Every block runs in a sandboxed iframe (`allow-scripts` only, no same-origin) with a strict Content Security Policy - No network access by default. Chart.js, D3, Mermaid, three.js and KaTeX are bundled, so everything works offline - Network access is opt-in, per domain or per host, and off by default - No telemetry, no account - Scripts that block for more than 2 seconds get stopped, and a crash guard won't auto-run a block that froze Obsidian before The README still warns: only use blocks from sources you trust, as with any code you run. ## Limits - The render command needs the desktop app (it launches Obsidian if needed) - The blocks only render where Prism runs. On [[Obsidian Publish]] or GitHub, readers see the code block, unless you use *Prism: Bake blocks as images*, which saves a PNG of each block and links it below - PNG export and snapshots need the block to be visible; WebGL canvases need `preserveDrawingBuffer: true` It's available in the community plugin directory, or via [[BRAT plugin for Obsidian|BRAT]] for beta versions. The repository includes an `examples/` folder you can open as a vault, with a note for every feature. ## References - Source code: https://github.com/floorianmb/prism-viz - Community plugin page: https://community.obsidian.md/plugins/prism-viz - Agent skill reference: https://github.com/floorianmb/prism-viz/blob/main/skill/reference.md ## Related - [[Obsidian Community Plugins]] - [[Obsidian Plugins]] - [[Data Visualization]] - [[Mermaid]] - [[Archify]] - [[Structuring AI responses as HTML]] - [[Claude Code]] - [[OpenAI Codex]] - [[AI Agent Skills]] - [[Agentic loops]] - [[Obsidian Bases]] - [[Dataview plugin for Obsidian]] - [[Heatmap calendar plugin for Obsidian]]