nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:devzer0o0/dsh-prompt-optimizer
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DSH plugin that rewrites what you type into the composer into a precise prompt before the model sees it, using one cheap side call on the session's own route.

The rewritten text is what enters the durable log, so the chat bubble and the model always agree: you never see one thing and send another.
dsh plugin --profile <profile> add @feiyu999/dsh-prompt-optimizer
Or install the prebuilt tarball from the
latest release
through the app's plugin manager. No build step, no allowBuilds approval.
Also listed in the plugin catalog: awesome-dsh-plugin.com/p/devzer0o0/dsh-prompt-optimizer.
The switch is the whale in the composer's tool row
(conversation.input.right), between the model selector and Send.

Click it to toggle; the state lives in ~/.dsh/prompt-optimizer/state.json and
survives a restart. Hover it to read the last before/after pair for the current
conversation.
![]()
| state | rendering |
|---|---|
| off (default) | a dark silhouette used as a CSS mask over currentColor, so it carries no fill colour of its own and follows the host theme |
| on | the full-colour gold artwork |
Both states are inlined into client.js as data URIs. The chip is a 16px
control that must paint on the first frame, and a round trip per state would
flash an empty button. assets/ keeps the source PNGs the constants are
generated from.
While it is on, every message you send that looks like prose gets one non-streaming call that turns it into a structured prompt: goal first, then the constraints and acceptance criteria already implied by what you typed. Concrete details — paths, names, numbers, error text — are preserved, chit-chat is dropped, and the original language is kept.
/compact, …), messages shorter than minChars, messages
longer than maxInputChars, and image-only messages.dsh-prompt-optimizer: rewrite failed; …).agent/pre-step — the one waterfall that decides which messages enter a step.
agent/request is deliberately not used (the loop refuses message changes
there), and a request-side hook would rewrite a message already in the durable
log, so the transcript would disagree with the model.
The listener spreads the incoming decision ({ ...decision, messages }), so
fields such as startsRequestSeries and notices added by later listeners
survive.
cordis.patch.yml in this bundle is the only config surface:
- insert:
- id: prompt-optimizer
name: dsh-prompt-optimizer
config:
enabled: false
The switch in the composer writes the state file, which wins over this row;
enabled here is just the initial posture. The rest of the knobs live in the
state file and can be edited by hand:
| field | default | meaning |
|---|---|---|
enabled |
false |
the switch |
provider / model |
"" |
pin the rewrite route; empty = the session's own route |
minChars |
8 |
shorter messages are sent untouched |
maxInputChars |
6000 |
longer messages are sent untouched |
maxOutputTokens |
1200 |
cap for the rewrite call |
timeoutMs |
12000 |
deadline for the rewrite call |
history |
20 |
how many rewrites the hover panel can read back |
GET /prompt-optimizer/state[?sessionId=…] → { ok, enabled, minChars, route, last }
POST /prompt-optimizer/state with { "enabled": true } → { ok, enabled }
Both are served by the client half's toggle. There is no remote RPC: the route is tiny and does not need one.
locale/en.json, locale/zh.json (meta.title,
meta.description).icon.png (256×256, the gold whale on a dark tile), exported as
./icon.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: prompt-optimizer。