ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 deepskyblue86

md-render

將助理訊息重新繪製為彩色 Markdown 的 Claude Code mod。

deepskyblue86@deepskyblue86

deepskyblue86/claude-markdown-mod

已翻譯

關於這個 mod

md-render 是一個 Claude Code mod,會在串流完成後將助理回應重新設定為彩色 Markdown。它會以可設定的色彩呈現標題、粗體、斜體、刪除線、行內程式碼、清單、引用與連結;圍欄程式碼區塊與表格則回退到 Claude Code 自己的轉譯器。由於使用者 mod 無法取代 classic.MessageDisplay,串流中的文字本身會先以純文字重繪,只在完成後重新套用樣式。使用 claude plugin marketplace add deepskyblue86/claude-markdown-mod,再執行 claude plugin install md-render@md-render-marketplace 安裝;也可以用 claude --plugin-dir 試用一個工作階段。色彩與樣式對應位於 hooks/register.tsx 頂端的 CONFIG 中,不需要建置步驟。採用 MIT 授權。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add deepskyblue86/claude-markdown-mod
claude plugin install md-render
原文 / README

md-render

Claude Code mod that redraws assistant messages as colored markdown.

<table width="100%"> <tr> <th width="50%" align="center">Before</th> <th width="50%" align="center">After</th> </tr> <tr> <td width="50%" valign="top"><img width="100%" src="resources/claude.png" alt="Claude Code's default markdown rendering of examples/showcase.md"></td> <td width="50%" valign="top"><img width="100%" src="resources/claude-markdown-mod.png" alt="The same message rendered by md-render"></td> </tr> </table>

Both screenshots show the reply to "Print examples/showcase.md verbatim".

| Markdown | Rendering | |---|---| | # Heading | bold purple | | **bold** | bold orange | | *italic* | italic amber | | ***bold italic*** | bold italic | | ~~strike~~ | strikethrough | | `code` | green | | - item, 1. item | orange markers, nested lists indented | | > quote | dim │ bar, italic text | | fenced code, tables | drawn by Claude Code's own renderer (syntax highlighting, wrapping) | | [text](url) | the text followed by the dim address | | images, anything else | plain text |

Unclosed **, `, ~~, or a fence (mid-stream) stay plain text until they close. If the message text can't be read or parsing throws, the default rendering is used.

The reply streams as plain text drawn by Claude Code and is restyled when the message completes. A mod can't change the streamed text: classic.MessageDisplay is bypassed for user mods by cc-plugin-sec-default.

Install

From a marketplace (this repo is one):

claude plugin marketplace add deepskyblue86/claude-markdown-mod
claude plugin install md-render@md-render-marketplace

Try it for one session without installing:

claude --plugin-dir /path/to/claude-markdown-mod

Configure

Colors and the style mapping are in CONFIG at the top of hooks/register.tsx. A style's color is a key of CONFIG.colors or a raw color.

Develop

No build step: Claude Code loads hooks/register.tsx directly.

claude plugin validate .
claude plugin test .

.claude-plugin/types/ is generated by Claude Code on load and is gitignored.

License

MIT. See LICENSE.

其他同名作品

更多類似作品