mtmtian/cc-mods/tree/main/mods/md-prompt/plugins/md-prompt
md-prompt
Claude Code のプロンプト欄に入力中の Markdown を描画します。囲みコードは閉じる前から構文強調カードになり、インラインコード、太字、斜体、リスト、タスクリスト、引用、表、リンク、見出しもスタイル付きになります。描画だけで文字は変更しません。
この mod について
md-prompt
Claude Code のプロンプト欄に入力中の Markdown を描画します。囲みコードは閉じる前から構文強調カードになり、インラインコード、太字、斜体、取り消し線、リスト、タスクリスト、引用、見出し、表、リンクもスタイル付きになります。
描画だけ。 プラグインは草稿の文字を色付けするだけで変更しないため、入力内容もモデルに送る内容も入力したものと完全に同じです。
スクリーンショット、描画対象の全一覧、トラブルシューティング:github.com/nogu66/md-prompt。
Hooks の動作
プラグインは 1 つの hooks モジュール、hooks/register.tsx です。
| Hook | 動作 | | --- | --- | | prompt.edit | 各編集または貼り付け後、プロンプト欄の草稿に style runs(decorations)を追加。文字、カーソル、他プラグインの decorations は変更せず通過 | | prompt.fill | 草稿全体が置き換えられたとき、新しい草稿に同じ style runs を追加 | | session.start | /md-prompt コマンドを登録 | | command.run(/md-prompt) | 描画のオン・オフを表示または切り替え、プラグインの enabled 設定として保存 |
ファイルを読まず、プロセスを実行せず、ネットワークやモデルを呼び出さず、ツール呼び出しや送信内容にも触れません。
変更する設定
- md-prompt.enabled はプラグイン独自の Markdown painting 設定(/config の切り替え)です。オンなら描画、オフならプロンプト欄をプレーンテキストのままにし、デフォルトはオンです。/md-prompt on | off | toggle は $.config.set でこの 1 つだけを書き込み、/config での変更と同じです。
- 環境変数:なし。Claude Code 2.1.285 と 2.1.286 では、function hooks を有効にするため CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 を自分で設定します。プラグインは設定しません。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add mtmtian/cc-mods claude plugin install md-prompt
原文 / README
md-prompt
Markdown, painted onto Claude Code's prompt box as you type. Fenced code becomes a syntax-highlighted card before you even close the fence; inline code, bold, italic, strikethrough, lists, task lists, quotes, headings, tables and links are styled too.
Paint only. The plugin colours the characters of the draft but never changes them, so what you type, and what is sent to the model, is exactly what you typed.
Screenshots, the full list of what is painted, and troubleshooting: github.com/nogu66/md-prompt.
What the hooks do
The plugin is one hooks module, hooks/register.tsx:
| Hook | What it does |
| --- | --- |
| prompt.edit | After each edit or paste, adds style runs (decorations) over the draft in the prompt box. The text, the cursor and other plugins' decorations pass through unchanged |
| prompt.fill | When the whole draft is replaced (a plugin or the engine filling the box), adds the same style runs to the new draft |
| session.start | Registers the /md-prompt command |
| command.run (/md-prompt) | Shows or switches painting on or off, and saves it as the plugin's enabled setting |
It reads no files, runs no processes, makes no network or model calls, and does not touch tool calls or what you submit.
Settings it changes
md-prompt.enabled, the plugin's own Markdown painting setting (a toggle in/config): on paints, off leaves the prompt box as plain text. The default is on./md-prompt on | off | togglewrites this one setting with$.config.set, as a change in/configwould. It changes no other setting.- Environment variables: none. On Claude Code 2.1.285 and 2.1.286 you turn on function hooks yourself with
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1; the plugin does not set it.
