---
title: "我让 Claude Code 在终端里内联绘制 mermaid 图表、公式和视频"
url: "https://claudemods.dev/zh-cn/builds/i-made-claude-code-draw-mermaid-diagrams-formulas-and-video--5b8db2"
source: "https://github.com/NateCC0902/NeonCoat"
source_type: "github"
repo: "https://github.com/NateCC0902/NeonCoat"
author: "No-Creme2531"
author_handle: "No-Creme2531"
stars: 0
category: "主题与外观"
categories: ["themes"]
tags: ["function-hooks", "kitty-graphics", "markdown", "mermaid", "statusline", "terminal-rendering"]
permission_level: null
scan_complete: false
added: "2026-10-12T00:22:34.000Z"
updated: "2026-10-11T15:49:13Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# 我让 Claude Code 在终端里内联绘制 mermaid 图表、公式和视频

一组 Claude Code 模组（reply-media、reply-markdown 和状态行），可在终端中内联渲染 mermaid 图表、数学公式、图像和视频首帧，并附带一个丰富的状态行，显示上下文、费用、每秒 token 数、缓存命中率、git 状态和使用窗口。使用早期访问的 function-hook 插件 API，需要支持 kitty 图形协议的终端（Ghostty 或 kitty），仅限 macOS，并需添加 CLAUDE.md 内容。

## Description

作者为 Claude Code 构建了三个模组：reply-media 将 mermaid 围栏、数学公式和本地图像渲染为终端中的真实图片，并显示本地视频的首帧和播放按钮，可在原处播放；reply-markdown 以彩色渲染标题、列表、标注和表格，并将每个代码围栏放入带复制按钮的卡片中；状态行显示已用上下文、费用、每秒 token 数、缓存命中率、git 状态、使用窗口以及其他会话正在做什么。它依赖 Claude Code 的早期访问模组 API（function-hook 插件），仅限 macOS，需要支持 kitty 图形协议的终端，例如 Ghostty 或 kitty。只有在将 README 提供的几行内容添加到 CLAUDE.md 后，Claude 才会编写模组所绘制的表单。采用 MIT 许可证，并使用 Claude Code 本身构建。演示 GIF 和截图位于 README 中：https://github.com/NateCC0902/NeonCoat

## Original README

A reply in Claude Code is plain text, so a mermaid block stays code and a formula stays raw LaTeX. I wanted them drawn, so I wrote a few mods: **reply-media** draws `mermaid` fences, math formulas and local images as real pictures in the terminal. A local video shows its first frame with a play button and plays in place. **reply-markdown** draws headings, lists, callouts and tables in color, and puts each code fence in a card with a copy button. **a status line** with context used, cost, tokens per second, cache hit rate, git state, usage windows, and what my other sessions are doing. Demo GIF and screenshots are in the README: https://github.com/NateCC0902/NeonCoat Before you try it: It uses Claude Code's mod API (function-hook plugins). That API is early access, so it can break. macOS only, and the pictures need a terminal with kitty graphics (Ghostty or kitty). Claude writes the forms the mods draw only if you add a few lines to your CLAUDE.md. The README has them. MIT licensed, and built with Claude Code itself. Tell me what breaks. submitted by /u/No-Creme2531 [link] [comments]
