dsh-skill-docx

by casperkwok

技能包github收录于 08-23

Word/.docx 写作技能:在 docx npm 包之上构建样式系统,产出专业配色、表格与标题层级的结构化文档——PRD 等

A Word/ .docx authoring skill: a styling system over the docx npm package that produces structured documents with a professional palette, tables and heading hierarchy — PRDs,…

安装

dsh plugin --profile web add github:casperkwok/dsh-skill-docx

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

English | 中文

一套 Word/.docx 文档生成 skill:建在 docx npm 库之上的排版样式系统,产出带专业配色、表格、 标题层级的结构化文档——PRD、技术方案、项目汇报、会议纪要。

一份 SKILL.md,两个 harness 通用。 同一个文件在 Claude Code 和 DeepSeek Harness 里都能直接跑, 不需要任何修改——因为两者读的是同一种 skill 格式。

安装

DeepSeek Harness (dsh)

git clone https://github.com/casperkwok/dsh-skill-docx ~/.agents/skills/docx-builder

装完了,就这一步。~/.agents/skills 是 dsh 扫描的五个根之一($DSH_AGENTS_HOME/skills), 而且发现过程不做记忆化,所以下一次 skill.list 就能看到——不用重启。

验证是否加载:

curl -s -X POST http://127.0.0.1:3080/api/skill.list \
  -H 'content-type: application/json' \
  -d '{"type":"client-request","rpcId":"'"$(uuidgen)"'","method":"skill.list",
       "payload":{"sessionId":"<会话 id>"}}'

被发现的 skill 会带着 modelInvocable: true 返回。

Claude Code

git clone https://github.com/casperkwok/dsh-skill-docx ~/.claude/skills/docx-builder

依赖

Node.js,以及在生成脚本所在目录里装上 docx:

npm i docx

试跑

npm i docx
node examples/example-prd.js   # 产出 example-prd.docx

目录说明

路径 作用
SKILL.md skill 本体——样式系统、组件契约、使用规则
references/docx-template.js 生成脚本要引入的组件实现
examples/example-prd.js 可直接跑的完整示例

为什么 frontmatter 里有 dsh 用不到的字段

version 和 metadata.openclaw 那一棵是 ClawHub 的约定。dsh 把 frontmatter 当作开放的 YAML 对象解析,只解释 name、description、whenToUse、metadata、disable-model-invocation、 user-invocable,其余一律忽略而非报错。

正是这一点让一份文件能跨两个工具通用。

那两个调用控制键要小心。 必须是 kebab-case。写成驼峰(disableModelInvocation)或者给了 非布尔值,会让整个 skill 从 dsh 的发现中掉队,且只留一条警告——这个策略是 fail closed 的, 不会退回宽松默认值。

格式细节、五个发现根、以及 skill 无故消失时怎么排查: 把 Claude Code 的 skill 移植到 DeepSeek Harness

许可

MIT

原始 README: https://github.com/casperkwok/dsh-skill-docx/blob/main/README.zh.md ↗