---
title: "我讓 Claude Code 在終端機裡內嵌繪製 mermaid 圖表、公式和影片"
url: "https://claudemods.dev/zh-tw/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-tw"
content_locale: "zh-tw"
---

# 我讓 Claude Code 在終端機裡內嵌繪製 mermaid 圖表、公式和影片

一組 Claude Code 模組（reply-media、reply-markdown 和狀態列），可在終端機中內嵌渲染 mermaid 圖表、數學公式、圖像和影片首幀，並附帶一個豐富的狀態列，顯示上下文、費用、每秒 token 數、快取命中率、git 狀態和使用窗口。使用早期存取的功能掛鉤外掛 API，需要支援 kitty 圖形協定的終端機（Ghostty 或 kitty），僅限 macOS，並需新增 CLAUDE.md 內容。

## Description

作者為 Claude Code 建置了三個模組：reply-media 將 mermaid 圍欄、數學公式和本機圖像渲染為終端機中的真實圖片，並顯示本機影片的首幀和播放按鈕，可在原處播放；reply-markdown 以彩色渲染標題、清單、標註和表格，並將每個程式碼圍欄放入帶複製按鈕的卡片中；狀態列顯示已用上下文、費用、每秒 token 數、快取命中率、git 狀態、使用窗口以及其他工作階段正在做什麼。它依賴 Claude Code 的早期存取模組 API（功能掛鉤外掛），僅限 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]
