From gjb438c-doc-filler
Generates GJB 438C software design documents from a .docx template. Fills cover, chapters, architecture blocks, and traceability tables to produce compliant Word documents.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gjb438c-doc-filler:word-fillter-438c-10The summary Claude sees in its skill listing — used to decide when to auto-load this skill
当用户需要基于 `[10]软件概要设计说明-438C.docx` 模板生成或修改 GJB 438C 软件概要设计说明时使用本 Skill。
documents/[10]软件概要设计说明-438C.docxscripts/main.pyscripts/output/[10]软件概要设计说明-438C-filled.docxscripts/process.pyscripts/requirements.txtscripts/strict_word_filler/__init__.pyscripts/strict_word_filler/docx_ops.pyscripts/strict_word_filler/errors.pyscripts/strict_word_filler/loader.pyscripts/strict_word_filler/models.pyscripts/strict_word_filler/pipeline.pyscripts/strict_word_filler/template_rules.pytemplates/config.jsontemplates/project.json当用户需要基于 [10]软件概要设计说明-438C.docx 模板生成或修改 GJB 438C 软件概要设计说明时使用本 Skill。
.docx 模板,不处理 .doccontent 字段和 rows 数组,不得修改模板结构documents/[10]软件概要设计说明-438C.docx:模板文档templates/config.json:封面与标识配置templates/project.json:章节内容、CSCI 结构和表格数据scripts/main.py:命令行入口(推荐)scripts/process.py:免参数入口templates/config.json 中各字段的 content,填写项目名称、版本、单位、日期等封面信息。templates/project.json 中各章节内容:
placeholders 数组tablescscis 数组定义 CSCI 块tables.docx 文件,首次在 Word 中打开时刷新目录。所有字段只修改 content 值,结构与 [08] Skill 完全一致,包含 project、document、content 三部分。
contentrowslocator_rows、columns、章节编号和模板锚点不得改动第 4 章使用 cscis 数组,每个 CSCI 项必须提供以下 9 个字段:
| 字段 | 说明 |
|---|---|
title | CSCI 名称 |
overview | CSCI 概述 |
component_title | 部件标题 |
component_design | 部件设计描述 |
execution_plan | 执行计划 |
interface_overview | 接口概述 |
interface_identification | 接口标识规则 |
interface_detail_title | 接口详细标题 |
interface_details | 接口详细描述 |
locator_rows严禁修改!locator_rows用于在模板 docx 中定位表格,脚本通过逐行比较单元格文本查找目标表格。 其中的文本必须与模板 docx 中的实际表头文本完全一致,包括标点符号、空格和特殊字符。修改后会导致报错
期望命中 1 张表,实际 0 张。若不确定实际表头文本,用以下脚本提取:
from docx import Document doc = Document("模板文件.docx") for i, table in enumerate(doc.tables): for j, row in enumerate(table.rows[:3]): print(f"Table {i} Row {j}: {[c.text.strip() for c in row.cells]}")
安装依赖(首次):
pip install -r scripts/requirements.txt
生成文档(推荐,使用命令行入口):
python scripts/main.py \
--template "documents/[10]软件概要设计说明-438C.docx" \
--config "templates/config.json" \
--project "templates/project.json" \
--output "output/[10]软件概要设计说明-438C-filled.docx"
或使用免参数入口:
cd scripts
python process.py
输出文档路径会打印在控制台。首次在 Word 中打开时,按提示刷新目录。
npx claudepluginhub cmoments/gjb438c-docskill --plugin gjb438c-doc-fillerCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.