返回目錄

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它能幫你完成什麼?

  • 在工作階段裡隨時切換模型的輸出風格

    一行 `/style concise` 之後每則回覆都精簡;`/style off` 回到專案預設;選擇依工作階段記住,重新啟動後仍在

    想讓回答更短或更講解原理、又不想改提示詞或重新載入 harness 的 DSH 使用者

  • 把回答風格做成可審閱的 Markdown 檔案,而不是藏在提示詞裡

    一種風格一個 Markdown 檔案(`styles/*.md`,frontmatter 存中繼資料、正文即模型指令),內建六種,支援分層 `stylesDir` 資料夾與 Claude Code `outputStyles` JSON

    需要依專案沉澱、可版控回答格式的團隊與外掛作者

  • 把工作階段匯出成 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` 指令(列出 / 切換 / 回復預設)

    工作階段裡的 `/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 外掛,絕不濫發。