DeepSeek Harness plugin

dsh-ponytail-hb123x

Ponytail for DSH — the lazy senior dev. Live intensity switching (off/lite/full/ultra) with a toggle in the composer, injecting a minimal-code ruleset before every step to cut token usage.

Jump to install

Source facts

Repository
HB123X/dsh-ponytail
Latest update
Aug 18, 2026
Category
Usage & Billing
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/HB123X/dsh-ponytail
Plugin: dsh-ponytail-hb123x
Author: HB123X

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-ponytail

Ponytail for DSH — 把你的 AI 变成「懒而高效」的资深工程师。

一个 DeepSeek Harness(DSH)插件:在每次模型推理前注入「极简代码」规则,让模型倾向于复用原生能力、标准库、已有代码,而不是手写一大坨,从而降低写代码的 token 消耗。永不牺牲校验、错误处理、安全与可访问性。

灵感源自 DietrichGebert/ponytail,但定位做了调整:核心目标是省 token(少写代码),而不是反驳用户需求

---

功能

  • 设置页总开关:DSH 设置里新增「马尾辫」页面,可开关整个插件——关闭后输入框不再显示档位选择器、也不注入任何规则。
  • 输入框内档位切换:开启后,在 composer 工具行、模型选择器左侧出现一个 ponytail 下拉框,实时切换强度。
  • 四档强度
档位行为
------------
Off关闭,不注入任何规则
Lite倾向 stdlib/原生,输出精简
Full(默认)七级阶梯强制:原生 → stdlib → 已有 → 一行 → 最小
Ultra极简主义:最少 token、最少代码、零新依赖
  • 即时生效:切换后下一条消息即按新档位生成。
  • 持久化:开关与档位都记住上次选择,重启 DSH / 重开会话不丢失(存于 ~/.dsh/dsh-ponytail.json)。

---

环境要求

  • DSH:桌面版(Electron 打包版,配有一个 desktop profile)。
  • Node 运行时:由 DSH 自带(无需单独安装 node;安装步骤里用到的 pnpm 也由 DSH 提供)。
  • 平台:Windows(安装脚本按 Windows/PowerShell 书写;macOS/Linux 用户把路径和命令中的反斜杠换成对应的即可,核心步骤一致)。

---

目录结构

dsh-ponytail/
├── lib/
│   ├── index.js          # Host 半:规则注入 + /ponytail/state、/ponytail/enabled、/ponytail/mode API + 状态持久化
│   └── client.js         # Client 半:输入框内档位下拉框 + 设置页开关(手写 bundle)
├── cordis.patch.yml      # bundle patch:把插件 insert 进 DSH profile
├── package.json          # npm 包清单 + dsh 声明
├── README.md
└── LICENSE               # MIT

---

安装

本插件是 DSH 的仓库插件(repository plugin),用官方 dsh plugin 命令一条命令安装并挂载。

方式一:dsh plugin 命令(推荐)

# 从 GitHub 安装
dsh plugin --profile desktop add github:HB123X/dsh-ponytail

# 或本地源码安装(开发用)
dsh plugin --profile desktop add link:/path/to/dsh-ponytail

# 或从 npm 安装(发布到 npm 后)
dsh plugin --profile desktop add dsh-ponytail

这一条命令会完成三件事:安装依赖、把 dsh-ponytail 注册进 profile 的插件列表、把包挂载进 profile。装完重启 DSH 即可生效。

> dsh 命令要求:DSH Desktop 默认可能没有把 dsh 暴露到 PATH。若 dsh 命令不存在,先看下方「让 dsh 命令可用」。

dsh 命令可用

DSH Desktop 自带 dsh CLI,但通常未加入 PATH。在 Windows 上,把下面这个目录加入系统 PATH(或每次用全路径调用):

  • CLI 入口:D:\DSH Desktop\resources\app.asar.unpacked\node_modules\@deepseek-ai\dsh\lib\bin.js
  • 需要用 DSH 自带的 Node 运行它(ELECTRON_RUN_AS_NODE=1 方式)。

一个现成的 wrapper 脚本示例(放到 PATH 里的任意目录,命名为 dsh.cmd):

@echo off
"%APPDATA%\DSH Desktop\runtime-commands\private\node-bin\node.cmd" ^
  "D:\DSH Desktop\resources\app.asar.unpacked\node_modules\@deepseek-ai\dsh\lib\bin.js" %*

> 具体路径以你的实际安装位置为准。

方式二:手动安装(无 dsh 命令时)

1. 克隆仓库:git clone https://github.com/HB123X/dsh-ponytail.git 2. 拷贝进 profile 的 vendor/(目录不存在则先建): ```powershell $profile = "$HOME\.dsh\profiles\desktop"

New-Item -ItemType Directory -Force -Path "$profile\vendor" | Out-Null

Copy-Item -Recurse -Force "path\to\dsh-ponytail" "$profile\vendor\dsh-ponytail" `` 3. 编辑 $profile\package.json,加两处: - dependencies 加:"dsh-ponytail": "file:./vendor/dsh-ponytail" - dsh.profile.bundles 数组末尾加:"dsh-ponytail" 4. 在 profile 目录执行 pnpm install。 5. 立即校验未被回退pnpm install 有时会重写 package.json): `powershell Select-String -Path "$profile\package.json" -Pattern 'dsh-ponytail' Test-Path "$profile\node_modules\dsh-ponytail\package.json" # 应返回 True ` 若校验不到两处 dsh-ponytail`,重做步骤 3→4→5。 6. 重启 DSH。

验证是否装成功

重启后:

  • DSH 设置里出现「马尾辫」页面(含启用开关)。
  • 输入框内、模型选择器左侧出现 ponytail 档位下拉框。
  • 侧边栏设置 → 插件清单里出现 dsh-ponytail(状态 active)。

---

卸载

dsh plugin --profile desktop remove dsh-ponytail

(无 dsh 命令时:手动从 package.json 删掉 dependenciesdsh.profile.bundles 两处的 dsh-ponytail,删除 vendor/dsh-ponytail 目录,在 profile 目录执行 pnpm install,重启 DSH。)

(可选)删除状态文件 ~/.dsh/dsh-ponytail.json,清掉开关/档位记忆。

---

原理

核心是一条「七级阶梯」,在写任何代码前停在第一个成立的阶梯:

1. 平台原生能力覆盖? 用原生(<input type="date">、CSS、DB 约束),绝不手写组件/选择器/解析器。 2. 标准库覆盖? 用 stdlib(Intl.DateTimeFormatDateURL、数组方法)。 3. 代码库里已有? 复用,别重写。 4. 已装依赖能解? 用已有依赖,绝不为几行代码新增依赖。 5. 整件事能一行搞定? 写成一行。 6. 只有到这一步,才写「最少能跑」的代码。

关键:多个功能 ≠ 多个文件/大 class。用原生能力拼接——范围选择器就是两个 <input type="date">,本地化就是 Intl,绝不搭框架。

Bug 修复 = 治根因而非症状:grep 所有调用方,在共享函数里修一次。

永不删减:信任边界的校验、防数据丢失的错误处理、安全、可访问性,以及任何显式要求。

---

许可

[MIT](LICENSE)。灵感来源:DietrichGebert/ponytail(MIT)。