DeepSeek Harness plugin

dsh-simplify

Reviews recently changed code for clarity, consistency, and maintainability in DeepSeek Harness.

Jump to install

Source facts

Repository
GongYuanCaiJi/dsh-simplify
Latest update
Aug 15, 2026
Category
Development & Runtime
GitHub stars
3
Format
bundle
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/GongYuanCaiJi/dsh-simplify
Plugin: dsh-simplify
Author: GongYuanCaiJi

Check the source files

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

File explorer3 files
README.mdSource · read only

dsh-simplify

简体中文 | [English](#english)

![License](./LICENSE) ![DSH](https://github.com/deepseek-ai/deepseek-harness) ![上游](https://www.npmjs.com/package/pi-simplify)

> 一句话:改完代码打一句 /simplify,让 agent 只审查你刚改动的那几行,不碰其他地方。

移植自 pi-simplify(MIT), 上游的提示词与 git diff 解析逻辑逐字保留,只适配 DeepSeek Harness 的 API 差异。

✨ 功能

  • 🎯 只审查改动行 —— 通过 git diff 定位改动的文件与行号范围,agent 可以读周围代码当背景,但编辑严格限制在改动行内
  • 🔍 四种范围 —— 未提交改动 / 已 staged / 与任意 ref 比较 / 指定文件
  • 🧪 改完自己跑测试 —— 审查结束前会运行既有测试,确认没有改坏
  • 📐 遵守项目规范 —— 自动遵循项目里的 CLAUDE.md / AGENTS.md 约定
  • 🈶 空白与引号文件名安全 —— 参数逐个 POSIX 单引号转义

📸 效果

在一个有未提交改动的仓库里:

> /simplify

  read  src/alpha.ts          ← 只读被改过的文件
  read  src/beta.ts
  edit  src/alpha.ts          ← 只改 4-5 行(本次改动范围内)
  edit  src/beta.ts           ← 只改 3-4 行
  bash  npm test              → 1 pass, 0 fail

agent 的总结会明确说明范围外的行为什么不动(示意):

Removed the intermediate variable `d`… Both edits stayed strictly within the
listed changed line ranges… the test suite passes (1 pass, 0 fail).

没有任何改动时:

> /simplify
No changed files found. Specify file paths or make some changes first.

📦 安装

dsh plugin --profile <你的 profile> add github:GongYuanCaiJi/dsh-simplify

安装时会通过 prepare 脚本自动构建 dist/。若 pnpm 拦下构建步骤,在 profile 的 pnpm-workspace.yaml 里把本包加进 allowBuilds

从本地目录安装(需要先自行构建):

git clone https://github.com/GongYuanCaiJi/dsh-simplify.git
cd dsh-simplify && npm install        # 触发 prepare,产出 dist/
dsh plugin --profile <你的 profile> add ../dsh-simplify

🚀 用法

/simplify                      # 审查所有未提交的改动
/simplify --staged             # 只审查已 staged 的改动
/simplify --ref=<ref>          # 与指定 ref 比较,例如 --ref=main、--ref=HEAD~3
/simplify <file...>            # 只审查指定文件

<details> <summary>移植说明(对上游 <code>pi-simplify@0.2.3</code>)</summary>

逐字保留,cmp 验证一致:src/types.tssrc/prompt-builder.ts(含提示词全文)、 以及 src/git-diff.tsSTATUS_MAP / parseDiffOutput / parseChangedLines / diffArgs

这一点你可以自己验,不必信我们 —— [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) 钉住了上游 tarball 的 integrity / shasum / gitHead 与逐字文件的 SHA-256,附可直接复制的比对命令。

六处适配(dsh 与 Pi 的 API 不同):入口改为 Cordis namespace 形状;命令改注册到 commands 服务; 工作目录取自 agent.session.header.cwd;「无改动」提示改为命令回传值; pi.exec 改走 ctx.shell(薄转接层,调用端零改动);提示词改用 agent.followup 送出。

已知限制: agent 收到的提示词是英文的 —— 那是上游原文,逐字保留未做翻译。

</details>

🛠 开发

npm install      # 触发 prepare,产出 dist/
npm test         # 构建后跑单元测试

tools/verify-driver/ 是仓库内的验收工具(不随包发布):它把一条 slash 命令通过真正的 commands.execute 接缝跑完一整轮,用来做端到端验证。

它需要先装进目标 profile 才能用 --patch 挂载:

cd tools/verify-driver && npm install && cd ../..
dsh plugin --profile <你的 profile> add ./tools/verify-driver
dsh --profile <你的 profile> --patch tools/verify-driver/patch.yml "/simplify"

📄 License

MIT。上游 pi-simplify Copyright (c) 2026 Matt Devy,本移植 Copyright (c) 2026 GongYuanCaiJi。见 [LICENSE](./LICENSE)。

感谢 MattDevy/pi-extensions 的原作者 —— 如果这个插件对你有用,也请去给上游仓库点个 star

---

English

![License](./LICENSE) ![DSH](https://github.com/deepseek-ai/deepseek-harness)

> One line: after editing, type /simplify and the agent reviews only the lines you just changed — nothing else.

A port of pi-simplify (MIT) to DeepSeek Harness. The upstream prompt and git-diff parsing are kept byte-identical; only the dsh API seams are adapted.

✨ Features

  • 🎯 Changed lines only — locates changed files and line ranges via git diff; the agent may read surrounding code for context but edits stay inside the changed ranges
  • 🔍 Four scopes — uncommitted / staged / against any ref / specific files
  • 🧪 Runs your tests — verifies nothing broke before finishing
  • 📐 Follows project standards — honours CLAUDE.md / AGENTS.md
  • 🈶 Safe with spaces and quotes in paths — every argument is POSIX single-quote escaped

📦 Install

dsh plugin --profile <your-profile> add github:GongYuanCaiJi/dsh-simplify

The prepare script builds dist/ during installation. If pnpm blocks the build step, add this package to allowBuilds in the profile's pnpm-workspace.yaml.

From a local checkout (build it first):

git clone https://github.com/GongYuanCaiJi/dsh-simplify.git
cd dsh-simplify && npm install        # runs prepare, produces dist/
dsh plugin --profile <your-profile> add ../dsh-simplify

🚀 Usage

/simplify                      # review all uncommitted changes
/simplify --staged             # review only staged changes
/simplify --ref=<ref>          # diff against a ref, e.g. --ref=main, --ref=HEAD~3
/simplify <file...>            # review only the given files

📄 License

MIT. Upstream pi-simplify Copyright (c) 2026 Matt Devy; this port Copyright (c) 2026 GongYuanCaiJi. See [LICENSE](./LICENSE).

Thanks to the authors of MattDevy/pi-extensions — if this plugin is useful to you, please also star the upstream repository.