dsh-prompt-optimizer

Adds an Optimize button to the composer. One click rewrites the current draft with the model you already selected, using the "basic optimization" prompt from linshenkx/prompt-optimizer (41.5k stars) verbatim, and writes the result straight back into the input box without adding a chat turn. A running rewrite can be cancelled by clicking again; requests time out after 150 seconds and the previous draft stays one click away. English and Chinese copy, no runtime dependencies, no stored credentials, no port of its own: the route rides DSH's authenticated /api mount.

Overview

Adds an Optimize button to the composer. One click rewrites the current draft with the model you already selected, using the "basic optimization" prompt from linshenkx/prompt-optimizer (41.5k stars) verbatim, and writes the result straight back into the input box without adding a chat turn. A running rewrite can be cancelled by clicking again; requests time out after 150 seconds and the previous draft stays one click away. English and Chinese copy, no runtime dependencies, no stored credentials, no port of its own: the route rides DSH's authenticated /api mount.

Installation

Install from npm

dsh plugin --profile web add @lklkuu/dsh-prompt-optimizer

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:lklkuu/dsh-prompt-optimizer

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands