npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-prompt-desk

v0.4.0

Published

DSH 提示词工作台:看清 system prompt 的每一段、写下你自己的家规、体检重复与矛盾,并记下每次改动。

Readme

dsh-prompt-desk

English | 简体中文

npm license ci DSH

npm: dsh-prompt-desk · one-line install: dsh plugin --profile web add dsh-prompt-desk

一个"提示词工作台",不是"自动驾驶"。 A co-pilot, not an autopilot.

dsh-prompt-desk 给 DSH 的 system prompt 配了一位副驾驶:它让你看清这份说明书由哪些段组成、 写下你自己的家规、并点名重复与臃肿。它不替你改,也不打分——方向盘始终在你手里。


它做什么

| | | |---|---| | 看得见 | 把当前 system prompt 按段摊开:每段叫什么、来自谁、多少字节、原文长什么样。走的是真实的 ctx.systemPrompt.assemble(),不是猜的。 | | 改得动 | 「我的家规」:写一段话,选它落在 prompt 的哪个位置(靠前 / 中间 / 靠后)。改完立刻生效,不用重启——因为每段的正文是一个 provider,在每次组装时才读取。 | | 解得开 | 「体检」:同一条话出现在两段以上、两条互相矛盾(一个有「要」、一个有「不要」)、某段特别长、规则开着却没写正文……只看事实,不替你做决定。 | | 退得回 | 所有贡献都来自本插件自己的段名(copilot:pre / copilot:mid / copilot:post)。关掉开关或卸载插件,一切回到原样——它从不改写别人的段。 |

为什么段名不叫 deployment:persona-prefix

DSH 允许一个段按名字遮蔽同名段(这正是"预设可以盖掉部署 persona"的机制)。dsh-prompt-desk 故意不使用这种遮蔽:副驾驶是加一层你的声音,不是悄悄替换机长的声音。想覆盖 persona, 请用 DSH 自己的预设机制——那才是它的正门。


安装

# npm 上的包名是 dsh-prompt-desk(原因见下)
dsh plugin --profile web add dsh-prompt-desk

# 本地开发(link 方式,改完 build 即可)
dsh plugin --profile web add -w .    # 在插件目录里执行

# 重启 web 宿主
dsh --profile web --no-open

# 浏览器硬刷新(Ctrl+F5)

打开 设置 → 副驾驶。

本地 link 安装时,插件目录的 node_modules 里需要有 @deepseek-ai/schemastery(DSH 自带的 那份即可);从 npm 正式安装时由依赖声明自动解决。

⚠️ 给 DSH 插件作者的一条血泪经验(已验证):DSH 的插件 id 不支持 npm 作用域名。 包名叫 @hwayn/dsh-prompt-desk 时,宿主照常加载(路由都通),但客户端半会被悄悄丢出加载清单—— 设置页直接消失,前端一点报错都没有。名字必须三处一字不差、且不带作用域: package.json 的 name、cordis.patch.yml 里的 name、profile 的 dependencies 键 + dsh.profile.bundles。 所以这个仓库叫 dsh-prompt-desk,npm 上叫 dsh-prompt-desk。

怎么退回去

  • 只要临时静默:设置页里关掉「启用」——本插件不再往 prompt 里写任何字,别的都不动。
  • 完全卸载:把 node_modules 里的链接删掉、从 profile 的 dsh.profile.bundles 里去掉 dsh-prompt-desk,然后重启宿主。已写入过的家规留在 profile 的设置文档里,可以手动清。
  • 本插件从不修改别的插件贡献的段,所以“退回去”不需要任何补丁。

接口(主机半)

  • GET /dsh-prompt-desk/prompt → { ok, enabled, sections:[{name,bytes,text}], rendered, bytes, tools, contexts, ours, bands } 返回当前真实组装出的提示词。:3080/dsh-prompt-desk/prompt 可以直接 curl,方便排查。

设置命名空间:ui-prompt-desk。

| 字段 | 默认 | 含义 | |---|---|---| | enabled | true | 总开关。关掉后本插件不往 prompt 里写任何字 | | rules[] | [] | { id, title, text, band: pre\|mid\|post, enabled } |

段落落点(数值取自 DSH 的 SECTION_ORDERS 空闲档位):

| band | order | 位置 | |---|---|---| | pre | 700 | deployment persona 之后、工具说明之前 | | mid | 5500 | 所有工具段之后 | | post | 10150 | prompt 末尾、persona suffix 之前 |


已知限制(诚实清单)

  • 只增不改:目前能新增段,不能删除或改写别的插件贡献的段。要让某段"消失"目前只能靠 DSH 自己的配置(例如关掉那个插件),或者写一条家规去纠正它。
  • 体检是启发式:重复检测看的是"长度 ≥30 的规范化行在不止一段里出现"。它只找线索, 不是判决。
  • 预览里的 {{变量}}:主机半优先用 dsh-system-prompt 的 renderPrompt() 插值;如果那个包 在 profile 里解析不到,就退化成"原样拼接"(保留 {{model}} 之类),此时预览不等于最终文本。
  • 组装预览是在没有具体 agent scope 的情况下调用的,所以 tools 常显示 0——真实会话里的工具段 属于各次请求的 scope。

状态

🌱 v0.0.1 · 2026-09-30 夜。地基:@deepseek-ai/dsh-system-prompt 的 ctx.systemPrompt (段注册表 + assemble())。已实测:注册三段 → UI 改写 → 提示词内容随之变化 → 删除后归零。

作者:Hwayn(幻弈)