dsh-plugin-code-quality

DSH PLUGIN会话与消息

仓库 hope-phenom/dsh-plugin-code-quality · npm @hope_phenom/dsh-plugin-code-quality

会话与消息 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件
安装这个插件

为 DeepSeek Harness 的 `/` 菜单加入 /simplify 与 /code-review(别名 /review)两个代码质量命令,前者做不改行为的清理,后者多角度找 bug 并独立验证后按严重度排序。

一句话选型结论

按资料字段整理

dsh-plugin-code-quality 是会话与消息类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类会话与消息 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-10-09 创建于 2026-10-09
README 10.4 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add @hope_phenom/dsh-plugin-code-quality
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名@hope_phenom/dsh-plugin-code-quality可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-plugin-code-quality:给 DeepSeek Harness 加上代码清理与审查命令

  • /simplify 做不改行为的清理
  • /code-review 多角度找 bug
  • 每条发现先独立验证
  • 结果按严重度排序
  • /review 为命令别名

上游标签

deepseekdeepseek-apideepseek-harnessdeepseek-harness-pluginsdshdsh-desktopdsh-plugindsh-plugin-desktopdsh-pluginsdsh-skill

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在会话与消息场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-plugin-code-quality当前 未做沙盒验证 未标注 0 未标注 有
dsh-desktop L3 · 安装规范通过 低风险 3.0 万 未标注 无
openpets L4 · 沙盒安装通过 低风险 1,274 未标注 有
deeptide L4 · 沙盒安装通过 低风险 1,104 0.1.1-rc.2 有
jingyun-dsh L3 · 安装规范通过 低风险 1,004 未标注 有
study-mate 未做沙盒验证 未标注 856 未标注 无

仓库档案

会话与消息
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方hope-phenom仓库 dsh-plugin-code-quality · 默认分支 master
分类会话与消息client
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-09 · 2026-10-09最后推送 2026-10-09
本站收录2026-10-09首次进入本站目录的时间

README 全文

10.4 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-plugin-code-quality

A DeepSeek Harness plugin that adds two code-quality commands to the / menu:

Command What it does Who can invoke it
/simplify [target] Applies behavior-preserving cleanups to the code you changed — reuses helpers that already exist, removes needless complexity, cuts wasted work, and re-seats changes made at the wrong layer. Not a bug hunt. you and the model
/code-review [level] [--fix] [target] Hunts for real correctness defects in the current diff with several independent review angles, verifies every candidate before reporting it, and ranks what survives most-severe first. you only
/review … Alias of /code-review. Same behavior, same instructions. you only

Both commands follow the design that mainstream code review tooling has converged on, adapted to DeepSeek Harness's tools, instruction-file layout and subagent model.


Install

dsh plugin --profile  add @hope_phenom/dsh-plugin-code-quality

Then restart the profile (or let HMR pick it up) and type / in the composer — simplify, code-review and review appear under the skills group.

For local development against a checkout:

dsh plugin --profile  add F:\path\to\dsh-plugin-code-quality

Upgrading

add records a caret range, and pnpm keeps whatever exact version is already in pnpm-lock.yaml, so
running the install command again with the bare package name will not move you to a newer release. Name
the version explicitly, or remove the plugin and add it again:

dsh plugin --profile  add @hope_phenom/dsh-plugin-code-quality@0.1.1

Then fully restart the profile. Replacing a package that is already loaded needs a new module generation —
HMR only covers bundles that were not loaded before.

Behind a registry mirror the mirror itself can lag a release by minutes to hours, and pnpm's local metadata
cache outlives that lag. When the version you asked for cannot be found, pass the upstream registry:

dsh plugin --profile  add @hope_phenom/dsh-plugin-code-quality@0.1.1 --registry=https://registry.npmjs.org

Requirements

  • DSH with @deepseek-ai/dsh-skill and @deepseek-ai/dsh-client-ui-skill composed. Both are part of the shipped standard preset, so a stock install already has them.
  • Node.js ≥ 20.
  • The plugin has no dependencies and no peer dependencies — it imports nothing from DSH and talks to the host only through the ctx object it is handed.

Usage

/simplify

/simplify                       # clean up everything changed since the upstream branch
/simplify src/parser.ts         # restrict the review to one path
/simplify 421                   # review a pull request instead of the local diff

Scope resolution, in order: a target you named, then git diff '@{upstream}...HEAD', then main...HEAD (falling back to origin/main, master), then HEAD~1. Working-tree edits and untracked files are folded in, because the command is most useful before you commit. If nothing changed, it says so and stops.

Four independent reviewers look at the diff — Reuse, Simplification, Efficiency and Altitude. A finding only counts if it names the concrete replacement: the existing helper to call, the simpler form, the cheaper alternative, or the general mechanism the special case should fold into. Findings that cannot fill that slot are dropped before they reach you.

Surviving findings are deduplicated and applied directly. Anything whose fix would change intended behavior, or that needs work outside the diff, is skipped and reported as skipped rather than argued about.

/code-review

/code-review                    # balanced review at the default level
/code-review high               # more angles, higher findings cap, recall-biased verification
/code-review max --fix          # widest sweep, then apply the findings
/code-review high src/parser.ts # level plus a target

The level word is read out of your own message — there is no argument parser, because the command is delivered as instructions.

Level Correctness angles Cleanup angles Candidates per finder Report cap Verification bias
low 3 0 4 5 drop anything not CONFIRMED
medium (default) 5 2 6 8 balanced
high 6 4 8 12 keep PLAUSIBLE
max 6 4 + sweep 8 20 keep PLAUSIBLE

Six correctness angles are defined, and the level decides how many run — three at low, five at medium, all six at high and max:

id angle the question it asks
C1 line-by-line hunk scan What input, state, timing or platform makes each changed line produce the wrong result — including unchanged lines of a touched function.
C2 removed-behavior audit What invariant did each deleted or replaced line enforce, and where does the new code re-establish it?
C3 cross-file contract tracing Does the change break a caller through a new precondition, return shape, throwing path or ordering requirement?
C4 language and framework pitfalls Which classic trap of the languages actually present in this diff is being stepped in?
C5 async, concurrency and resource lifetime Races, missing await, abandoned work, error paths that skip cleanup, listeners that outlive their owner.
C6 error paths and boundaries Empty collections, zero and negative values, null, multi-byte text, overflow, timeouts, partial writes, oversized payloads.

Every candidate then goes to a separate verifier that is told to try to refute it and must answer CONFIRMED, PLAUSIBLE or REFUTED. At high and max, a final sweep reviewer sees the verified list and looks only for gaps. When the report cap forces a cut, correctness findings outrank cleanup, altitude and conventions findings.

Output is one line per finding:

src/parser.ts:118 — the retry loop resets `attempts` inside the loop; a persistent 503 retries forever

If nothing survives verification it says so in one line instead of padding the report. --fix applies the surviving findings after reporting them; without it the command never edits a file.


How it works

The plugin has no client half, no tools, no services and no HTTP routes. lib/index.js does exactly one thing:

export const name = 'dsh-plugin-code-quality'
export const inject = ['skills']

export function apply(ctx) {
for (const skill of SKILLS) ctx.skills.register(skill)
}

Why skills instead of ctx.commands

DSH gives a plugin two ways to add a / command, and they are not equivalent:

  • ctx.commands.register() publishes a host command. Its handler runs against the agent directly and, by default, produces no model message — a command that wants to make the model work has to submit a synthetic user message itself.
  • ctx.skills.register() with userInvocable: true publishes a skill. The composer sends your message verbatim, /simplify token included, and the host appends the skill body as a `` instruction block at the pre-step boundary.

The second is exactly the substrate these two commands need: their entire content is an instruction document, your typed target text arrives intact, and there is no synthetic message pretending to be you.

Invocation policy

simplify is registered with { modelInvocable: true, userInvocable: true }, so the model also sees it in its skill catalog and can reach for it on its own — a behavior-preserving cleanup pass is a reasonable thing for an agent to decide it needs.

code-review and review are registered with { modelInvocable: false, userInvocable: true }. They never enter the model's catalog and cannot be self-invoked; the / menu is their only entry point, where DSH marks them as user-only.

/review is a second registration, not a pointer

@deepseek-ai/dsh-skill keys a runtime registration by name alone — there is no alias field (DSH's localized command aliases exist only for host commands, selected by first-party definitionId). /review is therefore registered as its own skill that shares the code-review body by reference, so the two cannot drift. The cost is a second row in the / menu.


Design notes

The two commands follow a pattern that code review tooling has broadly converged on: split the review into several independent angles so no single pass has to be good at everything, send every candidate past a separate verifier before it is reported, and cap the report so a flood of marginal findings cannot bury the real ones.

A few choices here go beyond that pattern:

  • Angles. Alongside the usual line-by-line, removed-behavior and cross-file angles, C5 (async, concurrency and resource lifetime) and C6 (error paths and boundaries) are included because they carry a lot of real defect mass that a general scan tends to skim past.
  • Fan-out tool. Reviewers run as subagent children with run_in_background: false pinned. DSH's standard preset configures that tool as continuable, so without the flag it returns an id and forces the parent to poll instead of handing back a whole round of findings in one step. All finder calls go out in a single message so they run concurrently.
  • Effort levels. A DSH skill body is static and there is no host API to select a level, so the level is parsed by the agent out of your own message, against the table above.
  • Instruction files. DSH loads $DSH_HOME/AGENTS.md plus a per-directory project chain of AGENTS.md and its AGENTS.local.md overlay. That chain is normally injected automatically, so the conventions angle reads a file directly only when it was not.
  • Scope. The review runs against your local diff and reports in the conversation. Nothing is posted to a pull request and nothing is published elsewhere.

Unofficial community project, MIT licensed, no commercial intent.


Development

npm test          # node --test: skill contract, plugin wiring, prompt conformance
npm run verify    # the same checks as a human-readable PASS/FAIL report

test/prompts.test.js is the enforcement point for docs/PORT-SPEC.md §7: it fails the build if a body loses the subagent fan-out contract, drops a verdict label, starts emitting prompt framing, slips in a vendor name, or grows past its word budget.

License

MIT

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-plugin-code-quality 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add @hope_phenom/dsh-plugin-code-quality` 即可。对应的 npm 包名是 `@hope_phenom/dsh-plugin-code-quality`。

dsh-plugin-code-quality 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-plugin-code-quality 安全吗?

未标注。

dsh-plugin-code-quality 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-plugin-code-quality 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-plugin-code-quality 有哪些功能?

/simplify 做不改行为的清理、/code-review 多角度找 bug、每条发现先独立验证、结果按严重度排序、/review 为命令别名。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

会话与消息
按星标排序,可作替代方案

dsh-desktop

dsh-desktop

为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。

L3 · 安装规范通过 3.0 万 星

openpets

openpets

L4 · 沙盒安装通过 1,274 星

deeptide

deeptide

L4 · 沙盒安装通过 1,104 星

jingyun-dsh

jingyun-dsh

井云 DSH 客户端插件,为 DeepSeek Harness 注入会员登录、订阅支付、算力管控与应用市场,让智能体和技能快速变成可交易商品

L3 · 安装规范通过 1,004 星

study-mate

study-mate

StudyMate 是 DSH 的「学习模式」预设与技能包,为数学、计算机科目定制学习路线、讲解课件与练习评估,跨科目共享记忆。

未标注验证等级 856 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。