cs-mermaid
Reviewed
at commit 7ad2886
Draws mermaid flowcharts in replies inline, as coloured blocks and lines, and tells the model they draw.
0 upvotes
Log in to upvote or save- Made by
- cs
- Pinned commit
-
7ad2886c8acc0e7cb40861a2c6f78c5bb9af8fb0 - What we checked
-
Draws mermaid flowchart code blocks in Claude's replies as coloured blocks and line characters in the terminal, and adds a show-me skill that suggests a small diagram or text sketch when you ask for one. It reads only the reply text, your theme setting and two terminal colour variables, runs no programs, makes no network calls and stores nothing. One setting turns the drawing off.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since c248fe2; the rest carries over from the review at that commit. Registers a ui.render handler for AssistantMessage that, in the terminal, splits the reply into prose and mermaid fences, parses the flowchart subset (limits 200 nodes, 400 edges, 60 cell labels, 200000 layout cells), lays it out and renders it with Box and Text elements, falling back to the source with the reason; it reads the theme row of $.config.list and keeps a 32-entry in-memory layout cache. The userConfig drawDiagrams option (default on) disables the drawing. The skills/show-me/SKILL.md tells Claude to explain a topic with a mermaid flowchart or a text sketch beside a few lines of prose; it has no allowed-tools, runs no commands and installs nothing. Changes in this version: fence detection in the reply text is stricter (Markdown-style fence markers, list items and indentation are parsed, so fences inside lists or quotes are found), failures are drawn through the drawPart helper, text.ts measures cell width of emoji and wide characters, and paletteFor now also takes the environment variables CS_TERM_THEME and CS_TERM_BG_RGB, read with $.env.get, to choose light or dark colours when the theme setting does not say. These are only used to pick colours. No fetch, process, file access, state storage or model calls. No npm dependencies.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: no
- Shows something on screen: yes
- Hooked events
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/cs-mermaid/)