Extracts chapters, numbered clauses, keyword tables and numeric values from a docx, txt or md rulebook into JSON, and flags duplicate clauses and missing values.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/474885697-alt/dsh-kit/releases/download/v0.1.0/dsh-rulebook-0.1.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:474885697-alt/dsh-kit#path:/plugins/dsh-rulebook
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
把 docx/txt/md 规则书抽成结构化数据:章节、条目编号、数值、表格。
版本 0.1.0 | 包名 dsh-rulebook | 仅宿主侧(无客户端代码)| MIT
它解决什么问题
规则书动辄几十页,手抄数值又慢又错。这里直接读 .docx(自己解 zip + word/document.xml,不依赖 Word)或纯文本。
输出 { title, chapters, clauses, numbers, tables },numbers 会把「先攻:+2」这类键值对单独拎出来,方便直接进游戏数值表。
rulebook_check 顺手查三类常见问题:重复条目、属性取值过多、缺章节或缺数值。
安装
plugin_manager install_bundle target="C:/Users/03/Documents/deepseek-harness/default-workspace/plugins/dsh-rulebook"
装完即可用,工具会出现在工具列表里;用 plugin_health 可以体检清单。要卸载就用插件页的开关。
工具
| 工具 | 用途 | 参数(* 表示必填,? 表示可选) |
|---|---|---|
rulebook_extract |
从 docx / txt / md 规则书抽取章节、条目、数值、表格 | path string |
rulebook_check |
检查规则书:重复条目、属性取值过多、缺章节或缺数值 | path string |
用法示例
示例:抽取
rulebook_extract(path="D:/docs/规则书.docx")
# → { ok: true, rules: { title, chapters: [{ title, index }], clauses: [...], numbers: [...], tables: [...] } }
示例:体检
rulebook_check(path="D:/docs/规则书.docx")
# → { ok: true, issues: [], stats: { chapters: 6, clauses: 42, numbers: 88, tables: 3 } }
HTTP 路由(仅本机 loopback)
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/dsh-rulebook/extract |
?path=<docx|txt|md>,抽取章节/条目/数值/表格 |
配置
- 无需配置;支持
.docx、.txt、.md。
数据存在哪
- 只读文档,不落盘。
安全边界
- 解 zip 时只读
word/document.xml,限制条目数量,避免超大文档卡死。
已知行为
- 文件不存在时直接抛
ENOENT(结构化错误待后续版本补);中文数字标题(「一、」)按章节识别,阿拉伯数字标题不算章节。
验收
- 对实机测试文档抽取 1 章 1 条数值;
node --check与假 ctx 单测通过。
宿主兼容性
- Web / 桌面宿主:HTTP 路由与工具都可用。
- headless / CLI(没有 webServer 服务):路由自动跳过,工具照常注册。
Links
More in this category
DayuanJiang/next-ai-draw-io#dsh-plugin★ 36802
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
Tencent/WeKnora#dsh-weknora★ 36302
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 7042
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 5074
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
sixtysevenlf/dsh-blender-plugin★ 1575
Lets a DSH agent drive a local Blender over a direct TCP channel with 15 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 228 ops across 34 families.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1155
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.