the-qian/dsh-commit-review ↗★ 0
dsh-commit-review
DSH plugin: /commit and /review slash commands mirroring Claude Code's built-in git workflow commands.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:the-qian/dsh-commit-review说明文档
阅读完整 README ↗dsh-commit-review
一个 DSH(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 安装(推荐)
dsh plugin --profile web add https://github.com/the-qian/dsh-commit-review.git
本包没有
prepare构建脚本,pnpm 不会要求allowBuilds,安装即可用。
方式二:本地路径安装
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 时装配):
dsh web
重启后在输入框输入 /,即可在命令面板看到 commit 和 review。包名与仓库名均为 dsh-commit-review(与 cordis.patch.yml 中的行引用保持一致)。
命令
/commit [message guidance]
分析当前 git 变更并真正创建提交(不只是给出建议)。可选参数会成为提交消息的引导,例如:
/commit
/commit fix the login bug
处理流程:
- 预检:
git status --porcelain=v1 --branch+ 暂存/未暂存 diff 统计(经subprocess直接调用 git,无 bash 依赖,20s 超时保护) - 预检通过后,将完整工作流注入模型:
- 检查真实 diff 与最近提交风格(
git log) - 选定 Conventional Commits 类型/范围(
feat/fix/docs/style/refactor/perf/test////,破坏性变更用 或 footer)
- 检查真实 diff 与最近提交风格(