
the-qian/dsh-commit-review
40最近提交 2026年8月14日
dsh-commit-review DSH 插件
该插件将 Claude Code 的 commit 和 review 工作流引入 DSH。它会在调用模型前预检 git 状态,减少不必要的 token 浪费。插件完全运行在宿主侧,使用 DSH 的 subprocess 和 commands 服务。
如何安装 dsh-commit-review DSH 插件
dsh plugin --profile web add https://github.com/the-qian/dsh-commit-review.git复制不会执行命令。安装 dsh-commit-review DSH 插件前请核对仓库和版本。
dsh-commit-review DSH 插件数据来源
dsh-commit-review DSH 插件快照日期:2026年8月16日
discovered
dsh-commit-review DSH 插件能做什么
- 生成 Conventional Commits 消息并通过模型执行 git commit
- 执行代码审查,按严重程度(critical/major/minor/nit)输出报告
- 预检 git 状态(非 git 目录、工作区干净、git 未安装)直接返回卡片,不调用模型
- 支持审查焦点修饰词:security、performance、simplicity、style、i18n、with-context
- 内置 git 安全协议:不修改配置、不强制推送、不跳过 hooks,hooks 失败时重新提交
- 永不提交敏感文件(.env、凭据、私钥等)
dsh-commit-review DSH 插件适合哪些场景
- 快速提交暂存更改,自动生成符合 Conventional Commits 格式的消息
- 在合并前审查未提交的变更,发现安全漏洞
- 团队内统一代码审查标准,使用一致的严重度分级
- 对待定更改进行性能导向的审查
- 为大型工作区自动生成提交消息,支持可选引导文字
dsh-commit-review DSH 插件适合谁
- 使用 DSH 并希望简化 git 提交流程的开发者
- 采用 Conventional Commits 和自动化代码审查实践的团队
dsh-commit-review DSH 插件的限制
- 仅在 DSH 宿主侧工作(需要 git 命令和 subprocess 访问)
- 需要 DSH 的 web profile(命令注册在 Web GUI 中)
- 审查修饰词使用空格语法(/review security),而非冒号(Claude Code 使用 /review:security)
- 插件处于早期版本(v0.1.0-rc.6),错误处理可能有限
dsh-commit-review DSH 插件的仓库 README 摘录
以下文字摘自 dsh-commit-review DSH 插件的上游仓库 the-qian/dsh-commit-review 的 README,版权归原作者,仅作引用。
一个 [DSH(DeepSeek Harness)](https://github.com/deepseek-ai/deepseek-harness) 插件:为 Web GUI 增加 `/commit` 与 `/review` 两个斜杠命令,**对标 Claude Code 内置的同名命令**,把「分析变更 → 生成 Conventional Commits 提交」和「代码审查」变成一条命令即可触发的标准工作流。 - ✅ 官方 dsh 插件形态(`dsh.bundle.patch`),通过 `dsh plugin add` 一键安装 - ✅ 纯 Host 侧、零依赖、无构建步骤(`lib/index.js` 即最终产物) - ✅ 预检失败(非 git 仓库 / 工作区干净 / git 未安装)直接返回卡片提示,不浪费一轮模型 - ✅ 提交与审查由模型用自身工具执行,天然走 DSH 的沙箱与审批策略 - ✅ 注册随插件行生命周期自动装卸(`ctx.effect` 包裹) ## 安装 ### 方式一:从 GitHub 安装(推荐) ```powershell dsh plugin --profile web add https://github.com/the-qian/dsh-commit-review.git ``` > 本包没有 `prepare` 构建脚本,pnpm 不会要求 `allowBuilds`,安装即可用。 ### 方式二:本地路径安装 ```powershell git clone https://github.com/the-qian/dsh-commit-review.git dsh plugin --profile web add D:\path\to\dsh-commit-review ``` 安装完成后**重启 profile**(bundle 层在 boot 时装配): ```powershell dsh web ``` 重启后在输入框输入 `/`,即可在命令面板看到 `commit` 和 `review`。包名与仓库名均为 `dsh-commit-review`(与 `cordis.patch.yml` 中的行引用保持一致)。 ## 命令 ### `/commit [message guidance]` 分析当前 git 变更并**真正创建提交**(不只是给出建议)。可选参数会成为提交消息的引导,例如: ``` /commit /commit fix the login bug ``` 处理流程: 1. 预检:`git status --porcelain=v1 --branch` + 暂存/未暂存 diff 统计(经 `subprocess` 直接调用 git,无 bash 依赖,20s 超时保
阅读完整 README仓库许可: MIT
dsh-commit-review DSH 插件常见问题
如何安装 dsh-commit-review?
在终端中执行 'dsh plugin --profile web add https://github.com/the-qian/dsh-commit-review.git'。安装完成后,用 'dsh web' 重启 DSH profile 以加载插件。之后在命令面板中即可看到 /commit 和 /review 命令。
安装后插件不工作怎么办?
请确保已重启 DSH profile。另外,检查当前工作目录是否是 git 仓库,并且 git 已正确安装。插件的预检功能会在环境不满足时直接显示卡片提示,不会调用模型。
可以自定义提交消息吗?
可以。在 /commit 后添加可选的引导文字,例如 '/commit fix the login bug',模型会将其作为上下文生成提交消息。模型仍会遵循 Conventional Commits 格式。
代码审查报告的结构是怎样的?
报告以总结开头,然后按严重程度排序列出发现:critical、major、minor、nit。每条发现包含文件及行号、原因说明和具体修复建议。最后还会包含正面观察。
这个插件与 Claude Code 内置命令有何区别?
主要区别在于本插件运行在 DSH 中,git 命令通过 DSH 的沙箱和审批策略执行,更加安全。另外,审查修饰词使用空格分隔(如 /review security),而 Claude Code 使用冒号(/review:security)。