cnkids/dsh-office-toolkit
DSH 宿主插件:给 AI 智能体增加读写 Word/Excel 的工具(docx/xlsx/xls/doc/rtf/odt,纯 JS 跨平台)| DSH host plugin: Word/Excel read & write tools for AI agents
Project Overview项目介绍
dsh-office-toolkit is a native plugin built exclusively for DeepSeek Harness (DSH) that enables DSH agents to read and write a dozen of common Office file formats natively. It is written purely in JavaScript, so users do not need to have Microsoft Office or LibreOffice already installed on their system to use core features. To install the plugin, users can run the simple command dsh plugin --profile web add dsh-office-toolkit in their terminal, and alternative installation methods like GitHub direct link, offline install, and local source install are also available for different use cases. After installation completes, eight dedicated office processing tools are automatically registered for DSH agents to call, each tailored for a specific office task.
This plugin is designed for DSH users who need agents to automate repetitive common office tasks, including generating formal reports, organizing financial ledgers, filling batch contract templates, and analyzing large tabular data. Instead of requiring users to manually move files or convert formats between different tools, the agent can handle the entire process end-to-end directly within DSH. It eliminates common errors that happen when generic file reading commands try to process binary Office files, which often causes agents to get stuck mid-task. It also supports in-file querying for large tables, so agents only return concise calculation results instead of dumping entire large datasets.
The plugin requires Node.js version 20 or newer, and works across all major desktop platforms including macOS, Windows, and Linux. It is released under the permissive open source MIT license, so it is free to use, modify, and distribute for both personal and commercial purposes. After installing the plugin, users must restart their DSH web instance or reload the desktop client and start a new session for the tools to load correctly. PDF output and high-fidelity conversion of older legacy formats require a local installation of LibreOffice or Microsoft Word, as pure JavaScript cannot handle these conversions natively.
dsh-office-toolkit 是专为 DeepSeek Harness(DSH)开发的原生插件,核心能力是让 DSH 智能体直接读写多种常用 Office 文件格式,包括 docx、xlsx、xls、csv 等,无需用户手动安装 Office 或 LibreOffice 就能运行。它通过 DSH 插件管理器直接安装,安装完成后会自动注册 8 个办公处理工具供智能体调用。
该插件适合需要让智能体批量处理办公文档的 DSH 用户,可满足报告生成、台账整理、合同模板套打、表格数据统计分析等常见办公需求。智能体可以直接读取文档内容、在表格内完成筛选分组、多表连接和透视计算,不用手动搬运文件,也不会因通用读命令无法处理二进制文件而卡住。
该插件要求 Node.js 版本不低于 20,支持 macOS、Windows、Linux 全平台,采用 MIT 许可开源免费使用。PDF 输出和旧格式高保真转换依赖本机已安装的 LibreOffice 或 Microsoft Word,安装后需要重启 DSH 或新建会话才能正常加载工具。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-office-toolkit(cnkids/dsh-office-toolkit)
仓库:https://github.com/cnkids/dsh-office-toolkit
本站详情页:https://www.yhbd.top/plugins/cnkids-dsh-office-toolkit/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-23 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-office-toolkit
把 cnkids/dsh-office-toolkit 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-office-toolkit
让 DSH 智能体自己读写 Word / Excel
纯 JavaScript,不装 Office 也能跑。
安装 · 快速上手 · 工具 · 文档 · 常见问题 · 贡献 · Releases
装上这个宿主插件,智能体就能直接读报告、写台账、改表格、套合同模板、转换旧格式 —— 不用再手动搬文件,也不会因为通用
read读不了二进制而卡住。
特性
- 纯 JS,开箱可用 —— 不装 Office / LibreOffice 就能读写
.docx.xlsx.xls.csv,也能读.pdf文本(本机有pdftotext/ macOS PDFKit 就用它,否则用随包携带的 pdfjs),Windows 上同样零依赖。 - 读写改一条龙 —— 新建文档、新建工作簿、编辑已有工作簿(样式 / 合并 / 冻结 / 筛选 / 图片 / 图表)、
{{变量}}模板套打、跨格式转换。 - 8 个工具自动注册 —— 见工具;描述里前置了文件类型关键字,智能体一次就能选对。
- 大表直接算,不用先搬数据 ——
office_query在文件内做筛选 / 分组 / 求和 / 计数 / 去重 / 排序,几万行也只返回结论;不给条件时返回表结构画像。跨文件的多表连接(join:inner/left/right/full,列名相同或左右对应)与透视表(pivot:行 × 列 × 指标,可带合计)也在这里做,不用写脚本。 - 排版可指定 ——
style参数设整篇字体 / 字号 / 行距 / 首行缩进 / 对齐(公文体例:仿宋_GB2312 三号、行距固定值 28.8 磅、首行缩进 2 字符),标题用style.headings,表格用style.table(三线表 / 表头底纹 / 按内容自动分配列宽);html 内联样式也认font-family(含中文eastAsia)/line-height/text-indent/margin,<body>、<div>上的样式会被继承。 - 改之前能先看、改之后能留底 ——
office_edit_docx传dryRun: true只报改动不写盘,传outputPath另存为新文件而原文件不变。 - 改已有文档能分段、分角色 ——
set_style的scope支持body(正文,不含标题)/headings/table/all,可叠加段落区间;例如「只把正文改成单倍行距」一句就够。表格另有set_table(框线 / 底纹 / 列宽 / 单元格内边距 / 垂直对齐 / 行高 / 表头跨页重复 / 禁止断行)、增删行列、合并与取消合并,以及delete_table整表删除(含删空后的 0 行残留)。 - 多级自动编号 ——
set_numbering把标题按样式挂上 Word 多级编号(1./1.1/1.1.1),正文列表挂到当前标题层级之下;支持exclude(某些标题不参与)与startFrom(从哪级起算、起始数字);幂等,重复调用原地替换不堆积定义。编号由 Word 维护,改标题会自动重排,不用手写「一、」「1.1」。 - 页眉页脚、页码、目录 ——
header/footer(页码是 Word 域,如「第 X 页 共 Y 页」或公文式「— 1 —」)、toc插入目录域;插件已设updateFields,Word 打开即按当前排版刷新。 - 图片与编号都落到实处 ——
<img>指向本地文件或data:URL 就嵌成真图片(PNG / JPEG / GIF / BMP,按魔数读尺寸、按正文宽等比缩放;不联网,远程地址与超 8 MB 直接报错);读 Word 时把自动编号展开成文字(一、/(一)/1.1),行文规则比对看得到层级。 - 公式与日期是真的 ——
=开头写公式,date:2026-09-09写日期,日期回读不受时区影响。 - 排版格式可读 ——
.docx传withFormatting: true即返回每段的字体 / 字号 / 行距 / 首行缩进 / 对齐与页面页边距(含basedOn继承链、隐式默认样式与主题字体),并给出格式分布和偏离主流的段落,用于比对行文规则。见用法与参数。 - 默认安全 —— 写入经 DSH 沙箱围栏(含 realpath 校验),文本来源中和公式注入,解析全走线性扫描(无 ReDoS),不联网、不常驻后台、依赖树无安装脚本。见安全说明。
npm audit0 条 —— 依赖取舍见设计说明。- 可选的更高保真 —— 装了 LibreOffice / Word / macOS
textutil时,旧格式转换自动升级。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
LiPu-jpg/Openwrite
dream-num/dsh-univer-office
kanghelyu/dsh-deepseek-flow
taxueseek/dsh-files
sailoumili/novel-writer
x2802490130-prog/dsh-tool-writing