Foreword

The plugin ecosystem of DSH is based on the philosophy of “everything is a plugin”. The community directory is an independent site and is not equivalent to the official DeepSeek app store. For those who are already using DeepSeek in the DSH Web profile, common operations are still fragmented: draft rewriting requires manual copying, long-term preferences need to be repeatedly written in messages, it’s difficult to quickly navigate back to a specific user question in a long conversation, and there’s no immediate display for today’s, yesterday’s, or last 7 days’ consumption and balance of the API Key. Below, we introduce how the dsh-prompt-optimize plugin addresses these issues.

What Is This

dsh-prompt-optimize is a DSH Web plugin maintained by 1847123733, licensed under MIT. It provides four capabilities: prompt optimization, personalized custom instructions, user question anchors, and a floating DeepSeek API usage card in the bottom-right corner.

Core Features

Prompt Optimization

The plugin first reads the current draft, then calls the model to rewrite it. The default rewriting parameters are:

provider: deepseek-official
model: deepseek-v4-flash

After clicking the icon, the result is previewed in a bubble; only when “Apply” is clicked will the content be written into the input box.

If the default provider is not configured, the host will fall back to the first available provider and mark it as “Fallback” in the bubble metadata.

Personalized Custom Instructions

Edit custom instructions in “Settings → Personalization”. After saving, they will be written into the DSH host configuration file and persist after refresh or restart. Once saved, they take effect in real-time and are injected into the system context starting from the next AI request; you can also clear and save to deactivate custom instructions.

User Question Anchors

The plugin collects user questions and accepted follow-up questions in conversation order and displays anchors on the right side. When hovered or focused via keyboard, the full question content is displayed; clicking an anchor smoothly scrolls to the corresponding user message. On narrow screens, the anchors move above the input area and rearrange horizontally.

DeepSeek API Floating Usage Card

A usage card is displayed in the bottom-right corner of the page, showing the current Key name, masked identifier, today’s, yesterday’s, and last 7 days’ consumption amounts, and the account balance.

Amounts are calculated based on the GMT+8 natural day, and platform data may have a delay of about 5 minutes. The full API Key and platform token are only parsed on the DSH host side and are not returned to the browser. Single Key consumption relies on DeepSeek’s internal platform API; when the login state expires, WAF intercepts the request, or the API changes, the card will indicate that the current Key usage is unavailable.

Installation and Enabling

Before using the plugin, DSH / npx @deepseek-ai/dsh must be installed, and pnpm must be in the PATH.

The provided GitHub installation command in the documentation is:

dsh plugin --profile web add "github:184712373/dsh-prompt-optimize"

After installation or update, restart the Web profile:

dsh --profile web

Or:

npx @deepseek-ai/dsh web

Please note: The installation command in the current documentation has a discrepancy between the GitHub owner and the repository address 1847123733/dsh-prompt-optimize. Please verify the repository, command source, and release status before actual installation.

Uninstallation:

dsh plugin --profile web remove dsh-prompt-optimize

Then restart DSH.

Configuration

The following configuration items can be set in cordis.patch.yml / profile patch:

provider: deepseek-official
model: deepseek-v4-flash
maxInputChars: <number>
maxOutputTokens: <number>
temperature: <number>

Here, provider and model correspond to the default rewriting configuration for prompt optimization; maxInputChars, maxOutputTokens, and temperature should be filled according to the plugin configuration requirements.

Typical Usage

  1. Write a draft in the input box and click the prompt optimization icon; after the bubble preview is complete, click “Apply” to write the optimized result into the input box.

  2. Enter long-term preferences in “Settings → Personalization”; after saving, they take effect starting from the next AI request.

  3. Use the question anchors on the right in long conversations; hover to view the full question, and click to scroll to the corresponding message.

  4. View the current Key’s today’s, yesterday’s, last 7 days’ consumption amounts and account balance in the usage card at the bottom-right corner.

Applicable Scenarios and Notes

  • Suitable for users who are already using DeepSeek in the DSH Web profile and wish to have draft optimization, long-term preferences, conversation navigation, and Key usage in a single interface.
  • The plugin runs with the current DSH process permissions; check the source code and license before installation; the license is MIT.
  • DSH / npx @deepseek-ai/dsh must be installed, and pnpm must be in the PATH.
  • Single Key usage relies on DeepSeek’s internal platform API and may be unavailable when the login state expires, WAF intercepts the request, or the API changes.
  • Amounts are calculated based on the GMT+8 natural day, and platform data may have a delay of about 5 minutes.
  • The full API Key and platform token are only parsed on the DSH host side and are not returned to the browser.

Links

  • GitHub: https://github.com/1847123733/dsh-prompt-optimize
  • Directory page: The current documentation does not provide a confirmable URL.