ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 MiguelMachado-dev

prompt-enhancer

Claude Code の mod。高い effort の Sonnet 5.5 でプロンプトを書き換え、送信前に確認できるよう結果をプロンプトボックスへ戻します。書き換えは [Opus 5.5 prompting guide](https://claude.dev/blog/getting-the-most-out-of-opus-5-5/) に従い、タスク全体を 1 メッセージに入れ、変更についての「done means」行、停止して尋ねる条件を含め、「think step by step」や強調は使いません。プロンプトの言語を保ち、作業ディレクトリと直近のメッセージだけを読んで「そのバグ」のような参照を具体的な名前に変えます。

MiguelMachado-dev@MiguelMachado-dev

MiguelMachado-dev/miguel-mods/tree/main/prompt-enhancer

翻訳済み

この mod について

Claude Code 2.1.287 以降が必要です。

プライバシー:mod が何をどこへ送るか。

使い方

  • プロンプトの末尾に ++ を付けて Enter を押すと、プロンプトは送信されず、書き換え結果がボックスに戻ります。会話には何も入りません。
  • /enhance <prompt> も同じ動作ですが、コマンドと出力は会話に残ります。
  • /enhance-undo で元のプロンプトを戻します。

呼び出しに失敗した場合、入力したプロンプトがそのままボックスに戻ります。

++ を捕捉するため、mod は prompt.submit にフックします。プロンプトボックスに入力され、 ++ で終わるプロンプトだけを対象にし、送信せずに保留します。それ以外のプロンプト(別の mod が送信したものも含む)は変更せずに通します。

送る内容と送信先

各拡張は Claude Code 経由で行う claude-sonnet-5-5 への 1 回のモデル呼び出しです。自分のプランまたは API キーを使うため、使用量に加算されます。呼び出しには次が含まれます。

  • 拡張を依頼したプロンプト
  • セッションの作業ディレクトリのパス
  • テキストを含む会話の直近 6 メッセージ。各メッセージは 1,200 文字、全体は 6,000 文字で切り詰めます

他の場所には何も送信しません。mod は /enhance-undo で戻せるよう、直前の元プロンプトと書き換えを自身の状態に保存します。ファイルは読み取りません。

インストール

Claude Code で:

/plugin marketplace add MiguelMachado-dev/miguel-mods
/plugin install prompt-enhancer@miguel-mods
/reload-plugins

/enhance が表示されない場合は Claude Code を再起動してください。

mod はマシン上の Claude Code 内で、Claude Code と同じアクセス権を持って動作します。インストール前に hooks のソースを読んでください。

ライセンス

MIT。詳しくは LICENSE を参照してください。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add MiguelMachado-dev/miguel-mods
claude plugin install prompt-enhancer
原文 / README

prompt-enhancer

A Claude Code mod that rewrites a prompt with Sonnet 5.5 at high effort and puts the result back in the prompt box, so you review it before sending. The rewrite follows the Opus 5.5 prompting guide: the whole task in one message, a "done means" line for changes, when to stop and ask, and no "think step by step" or emphasis. It keeps the language of your prompt, and reads the working directory and the last few messages only to turn references like "that bug" into concrete names.

Needs Claude Code 2.1.287 or later.

Privacy: what the mod sends and where.

Usage

  • End a prompt with ++ and press Enter: the prompt is not sent, and the rewrite comes back to the box. Nothing enters the conversation.
  • /enhance <prompt> does the same, but the command and its output stay in the conversation.
  • /enhance-undo puts the original back.

If the call fails, your prompt comes back to the box as you wrote it.

To catch ++, the mod hooks prompt.submit. It acts only on a prompt typed in the prompt box that ends with ++, which it holds back instead of sending. Every other prompt, including one that another mod submits, passes through unchanged.

What it sends and where

Each enhancement is one model call to claude-sonnet-5-5 made through Claude Code, on your own plan or API key, so it counts toward your usage. The call carries:

  • the prompt you asked to enhance
  • the path of the session's working directory
  • up to the last 6 messages of the conversation that have text, each cut at 1,200 characters and 6,000 in total

Nothing is sent anywhere else. The mod keeps the last original prompt and its rewrite in its own state so /enhance-undo can restore it, and it reads no files.

Install

In Claude Code:

/plugin marketplace add MiguelMachado-dev/miguel-mods
/plugin install prompt-enhancer@miguel-mods
/reload-plugins

If /enhance doesn't show up, restart Claude Code.

A mod runs inside Claude Code on your machine with the same access Claude Code has. Read the source in hooks before installing.

License

MIT. See LICENSE.

関連作品