Agent skill

DOCX工具

创建、编辑、校验和转换 Word DOCX,支持把完整 LaTeX 论文转换为 DOCX,以及数学建模论文模板、原生公式、三线表、修订和批注。

XiaoMaColtAIgithub.com/XiaoMaColtAIGitHub ↗
claude-codecodexships scripts
Install
npx skills add XiaoMaColtAI/math-modeling-skill --skill docx --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 66
SKILL.md size: 4 KB
Bundled scripts: yes
Path: tools/docx/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 590
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# DOCX 工具 ## 路径与写入 - 当前目录为本工具根目录,只读。 - 模板和脚本从本目录读取。 - 生成或修改后的 DOCX 必须写入用户 `PROJECT_ROOT`。 - 默认不覆盖输入文件或 Skill 文件。 ## 数学建模论文推荐流程 采用“当届官方参考模板 + `python-docx` 构建 + OMML 公式 + OOXML 校验 + 渲染抽检”。官方模板控制页面、样式、分节、页眉页脚和编号;代码负责稳定写入内容。 ```python from pathlib import Path import sys scripts = Path("<SKILL_ROOT>") / "tools" / "docx" / "scripts" sys.path.insert(0, str(scripts)) import paper_format as pf doc = pf.new_document( contest="cumcm", template_path=Path("<PROJECT_ROOT>") / "当届官方模板.docx", preserve_template_content=False, ) # 此示例只借用模板样式后追加正文。 # 若官方模板包含固定摘要页或编号页,应改为 True 并在原位置填充。 pf.title(doc, "论文题目") pf.abstract_title(doc) pf.body(doc, "摘要正文。") pf.keywords(doc, "优化;预测") pf.equation(doc, r"\min f(x)=\sum_{i=1}^{n}x_i^2") pf.three_line_table(doc, [["符号", "说明"], ["x", "决策变量"]]) pf.save_document(doc, Path("<PROJECT_ROOT>"), contest="cumcm") ``` ## 公式 ### 直接写入 `scripts/equations.py` 把常用 LaTeX 子集转成 Word 原生 OMML。未知命令、未闭合分组和不支持环境会报错,不会静默生成错误文本。 ```powershell python scripts/equations.py replace "输入.docx" ` --replace "EQ_OBJECTIVE" "\min f(x)=\sum_{i=1}^{n}x_i^2" ` --output "<PROJECT_ROOT>/输出.docx" ``` 同一占位符出现多次时会全部替换。支持分式、上下标、根式、n 次根、常用希腊字母与关系符号、反三角函数和常见矩阵,包括 `\nu`、`\mu`、`\approx`、`\arcsin`、`\arccos`、`

What's inside
Steps it walks through
  1. 路径与写入
  2. 数学建模论文推荐流程
  3. 公式
  4. 直接写入
  5. 复杂公式
  6. 完整 LaTeX 论文转 DOCX
  7. 解包、校验与重打包
  8. 修订
  9. 批注
  10. 必做验证
Ships with 24 files
  • LICENSE.txt
  • scripts/__init__.py
  • scripts/accept_changes.py
  • scripts/check_env.py
  • scripts/comment.py
  • scripts/equations.py
  • scripts/inspect_template_format.py
  • scripts/office/helpers/__init__.py
  • scripts/office/helpers/merge_runs.py
  • scripts/office/helpers/simplify_redlines.py
  • scripts/office/pack.py
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd
  • scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd
first 24 of 66
More from math-modeling-skill
All skills →
About this skill
What does the DOCX工具 skill do?

创建、编辑、校验和转换 Word DOCX,支持把完整 LaTeX 论文转换为 DOCX,以及数学建模论文模板、原生公式、三线表、修订和批注。

How do I install it?

Run `npx skills add XiaoMaColtAI/math-modeling-skill --skill docx --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From XiaoMaColtAI/math-modeling-skill, a repository with 590 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going