natsukium/claude-code-figures-plugin
13 stars · Last commit 2026-10-25
Draw diagrams, LaTeX math, and tool-result images inline in kitty-graphics terminals — a Claude Code plugin
README preview
# figures A Claude Code mod that draws diagrams, LaTeX math, and tool-result images inline in the terminal transcript, using the kitty graphics protocol.  ## What it draws - **Diagrams.** A code block tagged `mermaid`, `dot` (or `graphviz`), `d2`, or `svg` in Claude's reply is rendered and drawn under the reply. The code stays visible above the picture. - **Math.** LaTeX display math, `$$ … $$`, `\[ … \]`, or a `math`, `latex`, or `tex` code block, is typeset with [MathJax](https://www.mathjax.org). Inline `$…$` stays text, since a picture cannot sit inside a line, and a `latex` block holding a whole document (`\documentclass`) stays code. - **Tool-result images.** `Read` on a PNG, JPEG, GIF, WebP, or SVG file, or a screenshot an MCP tool returns, is drawn under the tool's row, where Claude Code otherwise shows only a size line; an SVG read only in part is left alone. In a collapsed tool group they are thumbnails; ctrl+o unfolds the group and draws them full size. A PNG, JPEG, GIF, WebP, or SVG Claude sends to another device with `SendUserFile` is drawn under its attachment line too, so it is on screen when you come back to the terminal. It is read from disk when the row is first drawn; overwriting the file