SkillAgentSearch skills...

dsh-hoi4-modding

HOI4 模组制作全能工具包,可以制作、检查、修改自己的模组。

Install / Use

claude mcp add Kiant98 -- npx -y github:Kiant98/dsh-hoi4-modding

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

76/100

Category

Other

Supported Platforms

Claude Code
Claude Desktop

Our assessment of dsh-hoi4-modding

dsh-hoi4-modding scores 76/100 on our quality scale, 323rd of 354 Other skills we index.

Its MCP Server is 20 KB long, well organised into 44 sections with 29 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
8/15
Adoption
3/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 9 days ago, so dsh-hoi4-modding is actively maintained.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 75/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.

Automated pattern scan on 2026-11-22. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

dsh-hoi4-modding compared with similar skills

All 4 of these similar skills score higher than dsh-hoi4-modding; compare them before choosing.

SkillScoreStarsUpdatedFormat
dsh-hoi4-modding (this skill)by Kiant987639d agoMCP Server
Agent-Reachby Panniantong100114.0ktodayCLAUDE.md
hyperframesby heygen-com10088.2ktodayCLAUDE.md
rufloby ruvnet10082.3ktodayCLAUDE.md
headroomby headroomlabs-ai10080.5ktodayCLAUDE.md

Frequently asked questions

How do I install dsh-hoi4-modding?
Run claude mcp add Kiant98 -- npx -y github:Kiant98/dsh-hoi4-modding. The install tabs above show the steps for each supported agent.
Which AI agents does dsh-hoi4-modding work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is dsh-hoi4-modding safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 75/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is dsh-hoi4-modding still maintained?
The repository was last updated 9 days ago, so dsh-hoi4-modding is actively maintained.

dsh-hoi4-modding

<p align="center"><b>中文</b> | <a href="README.en.md">English</a></p> <p align="center"><img src="assets/icon-180.png" alt="dsh-hoi4-modding" width="96" height="96"></p> <p align="center"> <img src="assets/screenshot-focus-tree.png" alt="离线预览:6 个国策按真实 x/y 坐标渲染、画出前置连线,图标取自本机游戏原版贴图" width="620"> </p> <p align="center"><i><code>kiant_hoi4_preview</code> 用 <code>examples/sample_mod</code> 生成的自包含 HTML:不开游戏,国策树的真实形状、坐标重叠、接错的图标和缺失文本都在这里。</i></p>

钢铁雄心4 的模组开发工具包。一个模组工程师 agent、15 个技能、20 个 MCP 工具,外加一套拿原版游戏当参照物的知识库。

面向 HOI4 1.19.x(Operation Postern)。纯 Python 标准库,零依赖。

当前版本 3.4.0(2026-11-13)。GitHub:Kiant98/dsh-hoi4-modding | npm:dsh-hoi4-modding

能做什么:三段真实输出

下面三段的命令和输出都来自仓库自带的 examples/,可直接复制运行(本机 Python 3.9+,零第三方依赖)。

1. 抓出会静默失效的缺陷

examples/broken_mod 是故意写坏的模组。跑一遍校验:

python mcp-server/server.py --call kiant_hoi4_validate_mod '{"mod_path":"examples/broken_mod"}'
"summary": { "errors": 6, "warnings": 5, "infos": 6, "total_issues": 17,
             "verdict": "还有硬错误,进游戏会静默失效" }

其中几条带文件、行号和改法:

error  descriptor.mod                              supported_version="1.19.x" 格式不合法
                                                    → 正确写法形如 "1.19.*" 或 "1.19.4"
error  localisation/english/broken_l_english.yml    缺少 UTF-8 BOM
                                                    → 整个文件会被引擎忽略
error  common/ideologies/broken_ideologies.txt:2    unclosed block: reached end of file
error  common/national_focus/broken_focus_dup.txt:7 focus id 'BAD_focus_a' 重复定义
                                                    → 首次定义在 broken_focus.txt:11
error  events/broken_events.txt:4                   事件命名空间 'BAD' 未在本文件声明

这些正是游戏不崩、也不一定进 error.log,只是静默丢掉的那类问题。

2. 生成骨架

python mcp-server/server.py --call kiant_hoi4_scaffold \
  '{"mod_path":"./demo","kind":"focus","name":"GER_demo_autobahn","tag":"GER","x":2,"y":2}'
"created": ["scaffold_demo/common/national_focus/ger_GER_demo_autobahn.txt",
            "scaffold_demo/localisation/english/ger_GER_demo_autobahn_l_english.yml"],
"next": "跑一遍 kiant_hoi4_validate_mod 确认没有缺本地化或语法错误。"

本地化自动带 BOM;国策的坐标、前置、完成奖励按 1.19 语法写全,不是空壳。

3. 不开游戏看结构

python mcp-server/server.py --call kiant_hoi4_preview '{"mod_path":"examples/sample_mod"}'
{ "ok": true, "bytes": 9653,
  "sections": { "focus": true, "events": true, "decisions": true, "ideas": true,
                "coverage": true, "issues": true },
  "summary": { "verdict": "可以进游戏了" } }

产物 .modkit/preview.html 就是上面那张截图:坐标重叠、图标缺失、文本没写,在这个阶段就能看出来。

为什么做这个

Paradox 引擎的失败方式很讨厌:它不崩溃。

本地化文件少了 BOM,整个文件被忽略,界面显示 GER_autobahn 而不是文本。事件忘写 add_namespace,事件根本不注册。国策 id 撞了,其中一个被悄悄丢掉。effect 拼错,那一行被跳过,其余照常执行。这些都不报错,甚至不一定进 error.log。

另一半问题出在模型身上。scripted_gui 的字段、archetype 怎么挂模型、某个 effect 在 1.19 有没有改名,这些答案不在参数里,在原版文件里。让模型凭记忆直接写,拿到的文件语法挑不出毛病,字段名却根本不存在。

这个工具包的应对办法很朴素:把真实实现索引起来,写之前先查;写完用机器校验,而不是靠眼睛看。

闭环

索引原版  →  查真实实现  →  生成骨架  →  机器校验  →  离线预览  →  进游戏验证
    ↑                                                                  │
    └────────────────────  把结论记回知识库  ←────────────────────────────┘

三条规矩

知识只从正规渠道来

原版游戏自带的 documentation/*.md(8600 行 effects、7700 行 triggers)和 31 处域级 _documentation.md 是字段级的权威,全部进索引。没有官方文档的域(国策、理念、科技、装备、地图)以原版实例文件为准。第三方经验只当线索用,并且标明可信度分级,详见 references/AUTHORITY.md。

每条结论都能查到出处

说「这个 effect 存在」,给的是 documentation/effects_documentation.md:2343 和它支持的作用域;说「这个字段拼错了」,给的是文件和行号。不给「一般情况下」「社区常用」这种查不到的说法。

零经验也能上手

不用先学 Clausewitz 语法。工具生成的是能进游戏跑起来的骨架,校验器说的是人话(「第 42 行少一个右花括号,从这往后整个文件都会被忽略」,而不是 unclosed block@42)。第一次做 mod 的人按 GETTING-STARTED.md 走一遍,能拿到一个自己写的国策。

里面有什么

1. 参考库:163 篇(146 正文 + 17 索引)

references/ 下 163 篇文档,146 篇是正文,17 篇是各域索引。按来源分六块:

| 来源 | 篇数 | 构成 | |---|---|---| | 上游知识域 | 63 | 00_start 到 06_workflow,56 正文 + 7 域索引,一字未改 | | 后加的知识域 | 39 | 07_tools / 08 / 09 / 10 / 93_ecosystem,34 正文 + 5 索引 | | 案例区 | 6 | 90_case-studies,5 正文 + 1 索引 | | 错题本 | 25 | 24 条正文 + 1 索引 | | 方案库 | 11 | 10 条正文 + 1 索引 | | 根文件 | 5 | _index、cheatsheet、README、ATTRIBUTION、AUTHORITY |

上面六块加起来是 149 篇(16 篇索引 + 133 篇正文)。另有 99_plugin-devlog/ 14 篇,记的是开发这个插件本身踩的坑, 不属于给 modder 用的参考库。它用 DEVB- / DEVN- 前缀,和 EB- / SOL- 不共用序列, 检索时不会混进 mod 相关的条目里。

覆盖脚本语言、内容系统、军事、世界地图、表现层、工程流程六个主题域(07_tools 是工具类,不算主题域)。

references/_index.md          「我要做 X → 读哪一篇」,50+ 条路由
references/01_script/         scope / effect / trigger / 变量 / 集合 / on_actions
references/03_military/       陆海空、装备、编制、学说(本插件的校验器不覆盖这些域)
references/04_world/          州、战略区、建筑、资源、补给、地形、地图
references/90_case-studies/   真实项目实战记录(不是默认做法)
references/91_error-book/     错题本:24 条实证踩坑 → 标准化方案
references/92_solutions/      方案库:10 条未验证思路,按状态标记

这套文档不全是我写的。正文来自 MIT 许可的开源项目 dsh-hoi4-modding,一字未改;出处、许可、以及我核对过哪几条,见 references/ATTRIBUTION.md。

搬进来之前,我挑了几条会推翻本插件现有写法的结论,在真实文件上验了一遍:

| 上游结论 | 验证结果 | |---|---| | .mod 用 picture= 不是 thumbnail= | 本机 29 个真实 .mod:14 个用 picture,1 个用 thumbnail ✅ | | common/units/equipment/ 存在、common/equipment/ 不存在 | 游戏目录实测 ✅ | | 地形在 common/terrain/00_terrain.txt,不在 map/terrain.txt | 实测 ✅ | | 启动参数是 -debug_mode 不是 -debug | 启动器 launcher-settings.json 的「以调试模式打开游戏」用的就是 -debug_mode ✅ |

2. 知识库:能学习,不只是能生成

把原版、已装模组、你的笔记索引成一个 SQLite 库。之后:

kiant_hoi4_kb_lookup kind=tech          → 取 3 个真实科技定义,带行号与代码
kiant_hoi4_kb_search "scripted_gui"     → 在 5000 个文件里定位
kiant_hoi4_kb_symbol name=GER_pz1_a     → 这个 id 在哪些文件里定义过
kiant_hoi4_kb_search "add_to_variable" kind=md   → 查游戏自带的字段级文档

游戏自带的 documentation/*.md(effects_documentation.md 8600 行、triggers_documentation.md 7700 行)和 common/**/_documentation.md(实测 31 处,参考库写的 39 是把 documentation.md 也混算了)同样进索引,检索结果带 authority 标注:game-doc > domain-doc > vanilla-instance,冲突时按这个顺序取信。

还有一层。documentation/ 里每个 ## name 会被抽成符号,于是「这个 effect 到底存不存在」可以一条命令回答:

kiant_hoi4_kb_symbol name=add_to_variable
→ effect, documentation/effects_documentation.md:2343, Supported Scopes: any
kiant_hoi4_kb_symbol name=add_stabiltiy
→ found: false        ← 拼错了

实测抽出 553 个 effect、596 个 trigger,544/553 带作用域。

本地化默认只索引 english + simp_chinese。原版带 10 种语言、每种约 13 万条,全存是 130 万行 / 350 MB / 9 分钟,而其中九成永远不会被查。收窄到两种之后是 26 万条 / 108 MB / 73 秒。要全量传 loc_langs: []。

实测索引原版 1.19.4.2:6167 个脚本文件、6.2 万符号、26 万词条、16 秒。

3. 校验:十二类检查,可插拔

kiant_hoi4_validate_mod deep=true

| 检查 | 内容 | |---|---| | 描述文件 | 两个 descriptor、path 解析与 ASCII 检查、picture/thumbnail、BOM、replace_path 双写、版本格式 | | 本地化 | BOM、编码、语言头、重复键、缺键(精确到引用位置) | | 语法 | 括号配平、token 错误、未闭合块 | | 重复 id | 国策/精神/决议/事件/科技/角色,跨文件 | | 科技 | 前置与依赖目标是否存在、本地化齐不齐 | | 资产 | 贴图与 .mesh 文件是否真的存在 | | 图标 | 国策/精神/决议/事件引用的 sprite 能否解析 | | 界面 | .gui 语法、窗口重名、sprite 引用 | | 框架 | on_actions 引用的事件、oob 文件、add_ideas、defines 前缀 | | 音乐 | play_song/电台选曲引用的歌曲是否已进 .asset 定义层、音频文件是否存在、非 ogg 混入(EB-022) | | 国策树语义 | 前置断链/成环、互斥缺失或自引、同树坐标重叠、relative_position_id 断链(吸收 hoi4modutils fork + MD 工具规则码) | | 本地化命令 | [Root.GetXxx] 命令存在性三级分诊:精确命中静默、疑似拼错 warn 给最近建议、未知名 info(CWTools curated 表 + scripted_localisation 豁免) |

结果带 file、line、hint。hint 说的是「为什么会这样」和「怎么改」,不是「请检查语法」。

分级不是拍脑袋定的,每条结论都要区分「我确认了」和「我猜不了」:

| 等级 | 含义 | |---|---| | error | 已确认的硬错误,进游戏一定静默失效 | | warn | 可疑,但存在合法写法 | | info | 无法确认,通常是没有索引原版/父模组 |

举个具体的。模组引用 gfx/leaders/leader_unknown.dds 但自己没带这个文件。索引了原版,能查证,报 error;没索引,那文件很可能就在原版里,硬报 error 等于冤枉每个复用原版素材的模组,所以降为 info 并说明原因。同理,一个只翻了 40% 的汉化子模组缺五万个键是事实,但缺的键由父模组提供,于是键数够多且覆盖率低于七成时自动按「翻译子模组」处理,只给一条覆盖率摘要。

这套降级规则是被真实大模组压出来的。最初一跑 7 万条 error,其中 99% 是假阳性。一路收敛下来,同一批文件只剩两位数,而且每条都能点开核实。

加一类新检查是三步:写个函数、加个装饰器、完事。见 ARCHITECTURE.md。

4. 预览:不开游戏看结构

kiant_hoi4_preview

生成一个自包含 HTML:国策树按真实 x/y 坐标渲染并画出前置连线;事件不是简化卡片,而是按 interface/eventwindow.gui 的真实几何拼出来的——纸纹窗框、夹纸板、标题字体、左下图位、右列选项按钮的位置与尺寸都和游戏里一致(读不到 .gui 时退回内置的原版数值)。决议/精神卡片带已解析文本,本地化覆盖率与问题清单一并呈现。

本机装了游戏的话再往前一步:按 sprite 名去原版的 .gfx 里查真实贴图,解码 DDS 后直接内联进 HTML。国策图标接错、事件图没挂上、精神用错系列,不用进游戏就能看见。图标读的是你自己的游戏目录,不随插件分发;传 icons=false 可关。

零外部依赖,纯 HTML,双击就开。不带图标约 14 KB,带图标与事件窗约 570 KB(窗框按原尺寸内联,图片占大头)。坐标重叠、图标挂错、文本没写,在这个阶段就能看出来。

想改一存盘就看到结果,用 watch 脚本:

python tools/kiant-hoi4-watch.py path/to/your_mod --game --open

它起一个只监听 127.0.0.1 的小服务并打开浏览器:页面里的 /state 只比对文件签名(快),/render 才算真渲染,所以存盘后 1 秒内自动刷新,没改动时几乎不耗 CPU。--once 是不起服务的单次输出(写到 <mod>/.modkit/preview.html),--no-icons 关贴图,--interval 调轮询间隔,--port 换端口。

5. 规划:不让长任务跑偏

kiant_hoi4_plan action=init     → 八个阶段,各带验收标准
kiant_hoi4_plan action=status   → 进度、下一步、依赖是否满足

同步写 ROADMAP.md,纯 Markdown 复选框,能进 git,也能给协作者看。

快速开始

安装

四种方式,拿到的是同一份内容。3.2.0 起 npm 包同时是 DeepSeek Harness 组合包(dsh.bundle.patch + cordis.patch.yml + lib/index.js),所以可以直接在 DSH 插件页安装:

方式一:在 DeepSeek Harness 里装(推荐;3.2.0 起)

设置 → 插件 → 搜索 dsh-hoi4-modding → 安装(已装过就点更新到最新版),然后重开会话。装好后:

  • 15 个技能自动出现在技能列表,按需触发,不用手动拷贝 SKILL.md;
  • 20 个工具自动挂载为 mcp__kiant_hoi4_modkit__kiant_hoi4_*,由包内 lib/index.js 用本机 python 起 mcp-server/server.py(stdio);
  • 首次加载会探测 python/python3(需要 3.9+,零第三方依赖)。要指定解释器,把插件配置设成 {"python": "C:/path/to/python.exe"};不想挂工具就设 {"mcp": false}。
# 方式二:git clone
git clone https://github.com/Kiant98/dsh-hoi4-modding.git dsh-hoi4-modding
cd dsh-hoi4-modding

# 方式三:下载 Release 附件 dsh-hoi4-modding-3.4.0.zip
unzip dsh-hoi4-modding-3.4.0.zip -d dsh-hoi4-modding
cd dsh-hoi4-modding

# 方式四:从 npm 安装(3.1.0 起)
npm install dsh-hoi4-modding        # 装进当前目录的 node_modules
npm pack dsh-hoi4-modding           # 或者只取 tarball 自己解压

npm 全局安装(npm i -g dsh-hoi4-modding)后,工具包在 npm 全局 node_modules/dsh-hoi4-modding/(Windows 通常是 %APPDATA%\npm\node_modules),下文出现的 mcp-server/server.py 都指这个目录下的路径。不走 DSH 的用法(手动跑 MCP、接别的客户端)完全不受影响。

装好后先确认能跑:

python mcp-server/server.py --list                      # 看 20 个工具
python mcp-server/server.py --call kiant_hoi4_kb_stats '{}'   # 看知识库状态

建索引(首次约 30 秒,之后走增量):

python mcp-server/server.py --call kiant_hoi4_kb_build '{"action":"discover"}'   # 看能索引什么
python mcp-server/server.py --call kiant_hoi4_kb_build '{"action":"build"}'      # 建库

接入各客户端见 platform/README.md。

资料库:平台优先,本地兜底

知识分成两级,检索默认先查平台库。

| 层级 | 内容 | 谁维护 | 什么时候建 | |---|---|---|---| | 平台资料库 | 作者发布的知识(字段说明、坑、版本差异) | 作者,不定期更新到开源平台 | kiant_hoi4_kb_sync action=pull | | 本地资料库 | 原版游戏索引、随包参考库、你的笔记、点名的本地目录 | 你自己 | kiant_hoi4_kb_build(默认只建原版 + 参考库) |

# 拉平台库
kiant_hoi4_kb_sync action=pull

# 建本地库(原版 + 参考库,20 秒)
kiant_hoi4_kb_build action=build

# 想让它读你某个文件夹时,点名给路径。工具不自己扫目录
kiant_hoi4_kb_build action=build local_dirs=["D:/我的笔记","D:/旧mod文档"]

检索层级

kiant_hoi4_kb_search 的 scope 参数控制查哪一级:

| scope | 行为 | |---|---| | auto(默认) | 先查平台库;命中就返回并提示「本地库未检索」;没命中才退到本地库并说明「以下来自本地」 | | platform | 只查平台库。想知道「作者到底怎么说」时用 | | local | 只查本地库。查你自己的笔记、原版实例时用 | | all | 两级都查,平台库的结果排在前面 |

返回里带 answered_from、tiers(各级命中数)、message(这次为什么给了这个层级的结果),不用你猜数据从哪来。

平台库怎么同步

knowledge/remote.json 填一次仓库名:

{ "repo": "用户名/仓库名", "branch": "main", "paths": ["knowledge/notes", "references"] }

之后三条命令:

kiant_hoi4_kb_sync action=status   → 本地 2026.11.06 / 远端 2026.11.06-2 / 过期 true
kiant_hoi4_kb_sync action=pull     → 下载约 1 MB,缓存到 ~/.kiant-hoi4-modkit/remote/
kiant_hoi4_kb_build action=build   → 多出一个 remote 源,检索即可命中

pull 是幂等的,版本一致直接返回 skipped: true。断网时不动缓存,检索继续用旧数据,并在返回里写明是哪一版。

作者侧

仓库布局、manifest.json 格式、发布流程、自查清单见 PUBLISHING-KB.md。

流程本身很轻:改完知识,把 manifest.json 的 version 改掉,push。插件不需要你构建任何产物。

本地与 WorkBuddy 资料库怎么保持一致(本地优先、格式一致、旧版归档、双向核对)见 PUBLISHING-LIBRARY.md。

为什么 SQLite 不随包走

| 原因 | 具体 | |---|---| | 体积 | 131 MB,比插件本体大一两个数量级 | | 绑机器 | 里面是作者那台机器的游戏文件路径、行号、mod 列表 | | 是派生物 | 从游戏安装目录索引出来的,换台机器重跑一遍就有 |

远端仓库里只放知识(markdown,约 1 MB),不放游戏索引。

没建索引也能用,但会告诉你缺了什么

校验结果里有一块 summary.index:

{
  "vanilla_indexed": false,
  "kb_loaded": fal

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3
CategoryOther
Updated9d ago
Forks0

Languages

Python

Trust signals

75/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium2 low