prismantis: real charts, tables and code in Claude Code's terminal
prismantis is a Claude Code mod that redraws Claude's replies with colored tables, highlighted code and mermaid charts, and nudges Claude to actually draw them. I launched it on 2 Oct and update this page with every release.

One reply, redrawn. Everything here is text the mod drew.
Every day I watch two terminals. In one, Codex prints a table with a colored header and versions in green. In the other, Claude Code prints the same table as pipes and dashes, and a mermaid chart as its source code. prismantis is my fix, and then it stopped being only mine. In its first 40 days it went from 0.1.0 to 0.45.4, with 76 GitHub releases, and 31 people besides me have code in it. Two commands install it. Turn it off in /plugin and Claude Code's own renderer comes back.
A year ago, then 1 Oct
What I wanted was small: mermaid charts and colored tables in Claude's replies. About a year ago I built a harness around Claude Code as a VS Code extension to get them. It was bad. I dropped it, and the tables stayed pipes and dashes.
On 1 Oct Claude Code 2.1.287 shipped mods. A mod is a plugin made of TypeScript hooks that run inside Claude Code. One hook, ui.render, gets every piece of the transcript before it is drawn and returns what to draw instead.
flowchart LR
A[Claude writes markdown] --> B[ui.render hook]
B --> C[prismantis parses it]
C --> D[Box and Text tree on screen]
No extension and no second window. The mod sits between the reply and the screen.
I read the announcement in the morning and had a working table by lunch. The changelog dates 11 versions on 2 Oct. The name is prism plus mantis: the mantis shrimp has 12 to 16 kinds of color receptors, and your terminal had 8.
The feature I deleted
Version 0.2 drew real mermaid diagrams. It shelled out to mermaid-cli, rendered a PNG and showed it in terminals that speak the kitty graphics protocol.
Mods run in-process, with no sandbox. A mod that spawns programs and writes image files needs a lot more trust than one that only moves text around. So 0.3, the same afternoon, removed image mode. Diagrams draw as colored box art.
That rule bent twice since, both times only when you ask. LaTeX math, added on 9 Oct, typesets formulas as images in kitty and Ghostty through RaTeX's renderer, a single binary, and stays off until you set latex to true. The ⧉ html button runs the system clipboard helper, only on a click. It still makes no network calls.
Getting Claude to draw
Once the charts rendered, I noticed Claude almost never wrote one. It doesn't know the terminal can draw a mermaid block, so it writes a table or a paragraph.
The obvious fix is one line in the system prompt. Plugins can't touch it. So on 2 Oct I added diagramHints, a note attached to each prompt you type, read by the model and never shown. It started at about 80 tokens. After that, charts showed up in my sessions without anyone asking.
The note grew. On 12 Oct prismantis learned figures: code blocks tagged figure draw exactly as written, in the theme's colors, for pictures where position carries meaning, like a timeout racing a retry. Claude uses them only when told when, so the note now explains when a figure beats a mermaid chart. It costs about 630 tokens per prompt.
Drawing the chart was the easy part. Getting Claude to write one was the work.
Hebrew
Hebrew is my first language, and terminals disagree on how to draw it. Some reorder right-to-left letters on their own, others print them in the order they arrive. On 4 Oct prismantis started detecting the terminal and sending the letters the way that terminal needs them. Most Hebrew fixes since are per terminal: on iTerm a number now stays next to its unit in a mixed cell, on Windows Terminal next to its word.
Strangers
Two days after launch, people I've never met started filing issues, then pull requests. That first week is its own post. They fix setups I don't run. The /prismantis setup pane, which previews each style before you pick it, came from @b33eep.
Early on I also asked a second model, Codex, to review the code. It flagged 12 issues. The worst was quiet: a table's copy button gave back my redrawn table instead of Claude's markdown. The fixes came with 10 regression tests, and I ran them against the old code first. 7 failed there, which is the only way I trust a regression test.
What it draws today (0.47.0, 16 Nov)
| Area | What you get |
|---|---|
| Themes | 19, from Catppuccin to mono, switched with /prismantis theme <name> |
| Tables | colored headers, alignment, colored numbers, sized to the terminal or stacked as cards when too narrow, and opt-in colors for status, test, benchmark, schema, API, config, comparison and grouped tables |
| Code | Prism highlighting in 24 languages, shell lines colored like a prompt, long blocks folded or open, plain or in a frame, a fill or a card |
| Diagrams | flowchart, sequence, state, class and ER diagrams, bar, line and pie charts (pies drawn smooth in kitty and Ghostty), gantt, quadrant charts, mind maps, user journeys, kanban boards and git graphs |
| Figures | text pictures drawn as written, checked for glyphs that would break |
| LaTeX | typeset formulas in kitty and Ghostty, text elsewhere |
| Chat | your prompts on the right with their markdown drawn, in the terminal and the desktop app, Claude's replies in a bubble of their own, in three styles, with label size and frame colors to pick. Opt in and the whole desktop app takes the theme |
| Lists | numbers kept, • and ◦ bullets, or - so a list you select with the mouse pastes as markdown |
| Tool rows | Ran gh pr view 12 on one line, edits as diff cards, a blinking dot while a tool runs |
| Right to left | Hebrew and Arabic right aligned, tables mirrored |
| Copy buttons | Markdown, drawn art, HTML for tables, a section under a heading, and a PNG of tables, diagrams and figures on macOS and Windows, on the background you pick. They sit dim until you point at one |
| OpenCode (0.48.0, 17 Nov) | the 8 mermaid kinds OpenCode leaves as source (bar and line charts, pie, quadrant charts, mind maps, journeys, kanban boards, class and ER diagrams) drawn from a ```chart block in the OpenCode theme's colors, on a shape @buer5 proposed. 0.48.1 (18 Nov) keeps chart series apart in the default theme, where most colors are orange |
The code is about 9,500 lines of TypeScript with 1,288 tests. CI runs them on Linux, macOS and Windows. It runs in Codex and OpenCode too, Codex waiting on two Codex issues for parity.
What doesn't work yet: the parser covers what Claude writes, not full CommonMark, so HTML draws as plain text. Terminals disagree on a few emoji widths, so those can be off by one. I test by hand in the macOS terminal only.
How do I try it?
/plugin marketplace add NahumLitvin/prismantis
/plugin install prismantis@prismantis
Needs Claude Code 2.1.287 or later. Then run /prismantis setup to pick a theme and styles from drawn samples, and /prismantis demo for a tour. MIT licensed, source and changelog at https://github.com/NahumLitvin/prismantis.
Credits
Diagrams come from beautiful-mermaid, highlighting from Prism, math from RaTeX. The palettes belong to their authors, all credited in the repo's third-party notices. And thanks to everyone on the contributors page.
Nahum Litvin, Lead Platform Engineer.
References
- issue · closed NahumLitvin/prismantis#539: OpenCode: a chart block for xychart and pie, the two mermaid kinds OpenCode leaves as source


Comments