Foreword¶
DeepSeek Harness (DSH) uses a plug-in architecture. Developers often need to turn raw ideas into structured prompts. The dsh-prompt-optimizer plug-in injects a ♂harden button into the bottom-left corner of the conversation input box, providing one-click rewriting to turn drafts into prompts with clearer structure and a firmer tone.
What It Is¶
This is a client-side plug-in maintained by user asdnmy123 and released under the MIT license. It primarily addresses prompt structuring and supports one-click rewriting into a tough-guy style.
Core Features¶
- One-Click Rewrite: Rewrites a draft into the structure “rally opener → hard requirements checklist → self-check → urgent close.”
- Three Styles: Supports three styles:
hard(pure tough-guy),team(full muscle-group mobilization), andcool(thunderous cool). - Permanent Button: The button label is always
♂harden, totaling seven characters, with four states: idle, forging, success, and failure. - Zero Dependencies: The client depends only on React and has no third-party runtime dependencies.
- Fallback Mechanism: Provides a deterministic local fallback to ensure the button always produces output.
- HTTP Endpoints: Provides the
/dsh-prompt-optimizer/healthand/dsh-prompt-optimizer/optimizeendpoints.
Installation and Activation¶
Prerequisites¶
- Node >= 18
- DSH can run (desktop or CLI)
Option 1: Install Directly from GitHub (Recommended for Desktop)¶
The desktop version’s profile is exclusively managed by the Electron application and cannot be operated via CLI, so you must use the UI:
- Open DSH and go to Settings → Plug-ins.
- Enter the following content in the install box and confirm:
github:asdnmy123/dsh-prompt-optimizer
- After installation, click Refresh Page (
Ctrl+R), and the♂hardenbutton will appear in the bottom-left corner of the input box.
Option 2: Install Directly from GitHub (CLI Version)¶
If you are using the CLI version and the profile is managed by the CLI:
dsh plugin --profile <你的-profile> add github:asdnmy123/dsh-prompt-optimizer
Verify Installation¶
After installation, you can verify the plug-in status with the following command:
curl.exe http://127.0.0.1:19387/dsh-prompt-optimizer/health
The expected response is similar to {"ok":true,"plugin":"dsh-prompt-optimizer","version":"0.1.0"}.
Typical Usage¶
- Write a draft in the conversation input box.
- Click the
♂hardenbutton in the bottom-left corner. - Wait 3~6 seconds; the button will enter the “forging” state.
- The result will be automatically filled back into the input box. Review it before sending. If you are not satisfied, you can use
Ctrl+Zto undo.
Configuration¶
Configuration must be written on the profile’s loader row (cordis.patch.yml):
- insert:
- id: dsh-prompt-optimizer
name: dsh-prompt-optimizer
config:
style: hard # hard | team | cool
maxInputChars: 20000
maxConcurrent: 4
localFallback: true # 模型不可用时使用本地兜底
| Field | Default | Description |
|---|---|---|
style |
hard |
Style option; invalid values fall back to hard |
maxInputChars |
20000 |
Maximum number of draft characters |
maxConcurrent |
4 |
Maximum concurrency |
localFallback |
true |
Local fallback switch |
HTTP Endpoints¶
The plug-in provides same-origin, unauthenticated HTTP endpoints:
GET /dsh-prompt-optimizer/health
→ { ok, plugin, version, style, localFallback }
POST /dsh-prompt-optimizer/optimize
body: { "text": "<草稿>", "style": "hard|team|cool" }
→ { ok: true, text, engine, ms }
→ { ok: false, error: { code, message } }
Notes¶
- Desktop Limitation: The desktop version’s profile is managed by Electron and cannot be operated via CLI. You must refresh the page in Settings to see the button.
- Node Version: The runtime environment requires Node >= 18.
- Input Limits: The draft character limit is 20000, and the concurrency limit is 4.
- Factuality Fidelity: Deliverables, technology stack, dimensions, formatting, and other details must strictly meet the requirements. Do not add steps not present in the original text.