用Claude Code写一段提示词,就能把Mermaid图表变成终端风格的Unicode字符画,直接跑在浏览器里,不用装东西。
xAI开源的Grok CLI编码代理中包含mermaid.rs,一个Rust编写的Mermaid图表终端渲染器。作者将其通过WebAssembly移植到浏览器,并用Claude Code for web(Fable 5)的提示词生成了该工具。该工具可将Mermaid图表转换为Unicode框艺术,无需安装任何依赖即可在网页中渲染。
Mermaid to Unicode box art (grok-mermaid)
Tool: Mermaid to Unicode box art (grok-mermaid) While exploring the codebase for the newly open-sourced Grok CLI coding agent I came across xai-grok-markdown/src/mermaid.rs , a "self-contained terminal renderer for Mermaid diagrams" written in Rust. I figured it would be fun to try that out in a browser via WebAssembly. Here's the prompt I ran in Claude Code for web (Fable 5), and this is what the resulting tool looks like: Tags: tools , rust , webassembly , mermaid , grok , xai