返回目录

dsh-output-styles

精选清单收录维护状态: 活跃

perrylink/dsh-output-styles

Claude Code 风格输出样式:会话级持久、运行时可切换,通过 /style 命令与系统提示注入。

前往 GitHub项目主页
$ dsh plugin --profile web add github:PerryLink/dsh-output-styles

15

星标

2

Fork

TypeScript

语言

Apache-2.0

许可证

2026-08-13

创建于

2026-11-22

最近推送

Apache-2.0 的 DSH 插件,为 DeepSeek Harness 重做 Claude Code 的 `outputStyles`:一条 `/style` 命令把风格按会话持久化,并在每次提示组装时注入系统提示。

DSH 适配

原生运行时

作者声明

安全审计

未审计

最后核验

2026-11-23

许可证

Apache-2.0

01它能帮你完成什么?

  • 在 DSH 会话里随时切换模型的输出风格

    一条 `/style concise` 之后每条回复都简洁;`/style off` 回到项目默认;选择按会话记住,重启后仍在

    想让回答更短或更讲原理、又不想改提示词或重载 harness 的 DSH 用户

  • 把回答风格做成可评审的 Markdown 文件,而不是藏在提示词里

    一种风格一个 Markdown 文件(`styles/*.md`,frontmatter 存元数据、正文即模型指令),内置六种,支持分层 `stylesDir` 目录与 Claude Code `outputStyles` JSON

    需要按项目沉淀、可版本化回答格式的团队与插件作者

  • 把 DSH 会话导出为 Markdown 或净化 HTML

    `{ original, rendered }` 并列结果、`/transcript` 的 `md` / `html` 输出,以及审批后 `--save` 把净化文档写入工作区

    需要把会话记录用于报告、交接或留档的用户

02如何接入 DeepSeek Harness?

前置条件

  • 已装好 DeepSeek Harness 以便挂载插件 —— README 最近一次核验的是 `dsh-v0.2.3-alpha.1`(2026-11-22)
  • Node.js 需为 `^22.19.0 || >=24.9.0`(见 README 兼容性表)

安装步骤

  1. 01

    给 profile 装上插件:`dsh plugin --profile web add github:PerryLink/dsh-output-styles` 取最新 `main`,或 `dsh plugin --profile web add dsh-output-styles` 取 npm 发布版(`pnpm pack` 出的 tarball 同样可以)。

    $ dsh plugin --profile web add github:PerryLink/dsh-output-styles

  2. 02

    可选:在 profile patch 里插入一条 `output-styles`,并把 `defaultStyle` 设为 `concise`;不配则按默认值运行。

验证接入成功

  • 执行 `dsh --profile web --dump-config | grep -A3 'id: output-styles'`,应能看到插入的插件行。
  • 在会话里输入 `/style` 会列出当前选择与每个风格;`/style concise` 应回 `switched to concise`。

回滚

  • 执行 `dsh plugin --profile web remove dsh-output-styles`,或从 profile patch 里删掉那一行。

03DSH 适配与能力边界

DSH 适配原生运行时

原生 DSH 插件:用 `dsh plugin --profile <name> add dsh-output-styles` 装进某个 profile 后,它注册 `/style` 命令、`output_style` 存储域,并在每次提示组装时贡献一个 `systemPrompt.section()` 注入段。

  • `/style` 命令(列出 / 切换 / 恢复默认)

    DSH 会话里的 `/style`、`/style <name>`、`/style off`→当前选择,外加每个风格一行;切换会为该会话持久保存

    每次切换都写入会话级的 `output_style` 存储域,并在会话日志里留下痕迹
  • 按预算截断的系统提示注入

    当前会话选中的风格正文→顺序 90 的 `systemPrompt.section()` 携带该正文,超过 `maxStyleChars` 时带标记截断

    每次提示组装都会把风格正文并入系统提示
  • 渲染器注册表与按工具规则

    `rules` 规则,以及经 `ctx.outputRenderers` 注册的纯 presenter→内置 `concise` / `step-by-step` presenter 的渲染结果,随 `{ original, rendered, rendererId, changed }` 一起给出

    渲染只改展示层,原文始终可以从会话日志重建
  • `/transcript` 导出

    `/transcript`、`/transcript md`、`/transcript html`、`--save <path>`→当前会话的 Markdown 或净化 HTML

    `--save` 会往工作区写盘,且只在审批放行后写入 —— 没有审批或没有 fs 服务就不写

04适合谁?何时不该用?

适合

  • 想让回答更短或更讲原理、又不想改提示词或重载 harness 的 DSH 用户
  • 需要按项目沉淀、可版本化回答格式的团队与插件作者
  • 需要把会话记录用于报告、交接或留档的用户

不适合

  • workshop 清单声明 `fs:read`、`fs:write`、`fs:watch`、`storage:read`、`storage:write` 与 `settings:read`,因此插件既读风格目录,也能把导出写进工作区。
  • 风格只作用于主会话;子代理会话保留各自的提示,与 Claude Code 一致。
  • 一旦检测到第一方 `outputStyles` 服务,插件就跳过自己的提示词注入,只保留热切换、rules 与 `/transcript`。

05兼容性、维护与安全提示

  • workshop 清单声明 `fs:read`、`fs:write`、`fs:watch`、`storage:read`、`storage:write` 与 `settings:read`,因此插件既读风格目录,也能把导出写进工作区。
  • 风格只作用于主会话;子代理会话保留各自的提示,与 Claude Code 一致。
  • 一旦检测到第一方 `outputStyles` 服务,插件就跳过自己的提示词注入,只保留热切换、rules 与 `/transcript`。
  • 风格正文超过 `maxStyleChars`(默认 4000)会带标记截断;损坏的风格文件带警告跳过,不会弄坏 profile。
2026-08-132026-11-18v0.8.5

Apache-2.0 · 活跃维护,最后推送 2026-11-18,最新发布 v0.8.5

06常见问题

怎么在 DeepSeek Harness 里装上 dsh-output-styles?

执行 `dsh plugin --profile web add dsh-output-styles`,把 `web` 换成你自己的 profile 名称即可。git 通道 `dsh plugin --profile web add github:PerryLink/dsh-output-styles` 取最新 `main`,`pnpm pack` 出的 tarball 也能装。装完用 `dsh --profile web --dump-config | grep -A3 'id: output-styles'` 核对。

`/style` 命令到底做什么?

不带参数时列出当前选择和每个风格一行;`/style <name>` 切换并回 `switched to concise`;`/style off` 回到项目默认。多词风格名取整行余下部分,所以文件名是 `Diagrams first` 时就输入 `/style Diagrams first`。

重启之后选择还在吗?会联网吗?

对这个会话来说是还在的:选择放在 `output_style` 存储域、按 sessionId 隔离,重启后仍然保留。除此之外不持久化任何状态,也没有网络请求 —— 风格正文每次组装时从 `styles/` 与 `stylesDir` 重新读取。

对 DSH 版本有什么要求?官方以后自带 outputStyles 会冲突吗?

README 最近一次核验的是 `dsh-v0.2.3-alpha.1`(2026-11-22)。若出现第一方 `outputStyles` 服务,插件会停掉自己的提示注入,降级为热切换、rules 与 `/transcript`;此时每条 `/style` 回复都会写明降级,而不会假装风格已生效。

怎么卸载?它声明的权限有哪些?

执行 `dsh plugin --profile web remove dsh-output-styles`,或从 profile patch 里删掉那一行。它的 workshop 清单声明了 `fs:read`、`fs:write`、`fs:watch`、`storage:read`、`storage:write` 与 `settings:read`。

08数据与来源

  • 作者声明github.com51b6759ce9cb…

    dsh plugin --profile <name> add dsh-output-styles

  • 作者声明github.com51b6759ce9cb…

    `dsh-output-styles` 是 DeepSeek Harness 的 Claude Code `outputStyles` 等价实现:一个 `/style` 命令,在运行时切换模型输出风格,按会话持久化,并在每次提示组装时注入。

页面基于项目公开文档、仓库元数据和 DSH Plugins 的结构化解析生成;最后核验于 2026-11-23。发现错误?提交更正。

🏆

最佳 DeepSeek Harness 插件

从全目录挑出的 12 个值得优先安装的插件,覆盖各个分类。

DSH Plugins 是独立的 DeepSeek Harness 插件目录,与 DeepSeek 官方无关,也不代表官方背书。第三方插件未经安全审计,安装前请审查源码。

每周获取最新的 DeepSeek Harness 插件,绝不滥发。