dsh-tool-git
Git first-class tools (status/diff/log/add/commit) for DeepSeek Harness agents
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Huasfan/dsh-tool-git说明文档
阅读完整 README ↗dsh-tool-git
Git 工具 —— 为 DeepSeek Harness 的 agent 提供 9 个结构化的模型可见工具,替代"用 bash 裸敲 git 命令再解析文本":
| 工具 | 作用 | 关键参数 | 规范值(canonical value)要点 |
|---|---|---|---|
git_status | 工作区状态 | workdir? | branch/head/clean/staged/unstaged/untracked/conflicts 结构化列表 |
git_diff | 差异(默认未暂存) | staged? stat? paths? | diff 文本 或 stat 数字摘要;UI diff 卡片 |
git_log | 提交历史 | count? paths? | commits[](hash/shortHash/author/date/subject) |
git_add | 暂存文件 | paths? 或 all? | 暂存后回读的 stagedFiles[] |
git_commit | 创建提交 | message(必填)body? amend? stageAll? | 新提交的 hash/shortHash/branch;空索引返回 reason: 'nothing-to-commit' |
git_branch | 分支 列表/创建/切换/删除 | action? name? startPoint? force? | branches[](name/current/upstream)或操作结果 |
git_show | 查看提交或某 rev 下的文件 | rev path? stat? | commit 元数据 + patch(UI diff 卡片)或文件 content(UI read 卡片) |
git_restore | 丢弃工作区改动 / 取消暂存 | paths staged? source? | restored[] —— 实际被恢复的文件 |
git_merge | 合并分支/提交 | rev |