Skip to content
Agentmart
Submit a tool

docx

使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。 三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容, (C) 应用模板格式化并通过 XSD 验证门控检查。 当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill——…

Skill by Minimax

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/clark970417-eng-docx

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。 三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容, (C) 应用模板格式化并通过 XSD 验证门控检查。 当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill—— 包括他们说"写一份报告"、"起草建议书"、"制作合同"、 "填写此表单"、"按此模板重新排版",或任何最终输出为 .docx 文件的任务。 即使用户未明确提及 "docx",如果任务暗示生成可打印/正式文档,也应使用此 skill。

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/docx

What's inside

Skill name
docx
Description
使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。 三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容, (C) 应用模板格式化并通过 XSD 验证门控检查。 当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill—— 包括他们说"写一份报告"、"起草建议书"、"制作合同"、 "填写此表单"、"按此模板重新排版",或任何最终输出为 .docx 文件的任务。 即使用户未明确提及 "docx",如果任务暗示生成可打印/正式文档,也应使用此 skill。
License
MIT
Metadata
author: Minimax · version: 1.0.0 · category: document-processing
Instructions
265 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (81)

  • .gitignore
  • LICENSE
  • SKILL.md
  • academic_styles.xml · assets/styles/
  • corporate_styles.xml · assets/styles/
  • default_styles.xml · assets/styles/
  • aesthetic-rules.xsd · assets/xsd/
  • business-rules.xsd · assets/xsd/
  • common-types.xsd · assets/xsd/
  • wml-subset.xsd · assets/xsd/
  • cjk_typography.md · references/
  • cjk_university_template_guide.md · references/
  • comments_guide.md · references/
  • design_good_bad_examples.md · references/
  • design_principles.md · references/
  • openxml_element_order.md · references/
  • openxml_encyclopedia_part1.md · references/
  • openxml_encyclopedia_part2.md · references/
  • openxml_encyclopedia_part3.md · references/
  • openxml_namespaces.md · references/
  • openxml_units.md · references/
  • scenario_a_create.md · references/
  • scenario_b_edit_content.md · references/
  • scenario_c_apply_template.md · references/
  • track_changes_guide.md · references/
  • troubleshooting.md · references/
  • typography_guide.md · references/
  • xsd_validation_guide.md · references/
  • doc_to_docx.sh · scripts/
  • docx_preview.sh · scripts/
  • MiniMaxAIDocx.Cli.csproj · scripts/dotnet/MiniMaxAIDocx.Cli/
  • Program.cs · scripts/dotnet/MiniMaxAIDocx.Cli/
  • AnalyzeCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • ApplyTemplateCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • CreateCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • DiffCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • EditContentCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • FixOrderCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • MergeRunsCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • ValidateCommand.cs · scripts/dotnet/MiniMaxAIDocx.Core/Commands/
  • MiniMaxAIDocx.Core.csproj · scripts/dotnet/MiniMaxAIDocx.Core/
  • CommentSynchronizer.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • ElementOrder.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • NamespaceConstants.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • RunMerger.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • StyleAnalyzer.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • TrackChangesHelper.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • UnitConverter.cs · scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/
  • AestheticRecipeSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • AestheticRecipeSamples_Batch1.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • AestheticRecipeSamples_Batch2.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • AestheticRecipeSamples_Batch3.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • AestheticRecipeSamples_Batch4.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • CharacterFormattingSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • DocumentCreationSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • FieldAndTocSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • FootnoteAndCommentSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • HeaderFooterSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • ImageSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • ListAndNumberingSamples.cs · scripts/dotnet/MiniMaxAIDocx.Core/Samples/
  • …and 21 more

SKILL.md (first lines)

---
name: docx
license: MIT
metadata:
  version: "1.0.0"
  category: document-processing
  author: Minimax
  sources:
    - "ECMA-376 Office Open XML File Formats"
    - "GB/T 9704-2012 公文版面布局标准"
    - "IEEE / ACM / APA / MLA / Chicago / Turabian 风格指南"
    - "Springer LNCS / Nature / HBR 文档模板"
description: >
  使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。
  三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容,
  (C) 应用模板格式化并通过 XSD 验证门控检查。
  当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill——
  包括他们说"写一份报告"、"起草建议书"、"制作合同"、
  "填写此表单"、"按此模板重新排版",或任何最终输出为 .docx 文件的任务。
  即使用户未明确提及 "docx",如果任务暗示生成可打印/正式文档,也应使用此 skill。
triggers:
  - Word
  - docx
  - document
  - 文档
  - Word文档
  - 报告
  - 合同
  - 公文
  - 排版
  - 套模板
---

# minimax-docx

通过 CLI 工具或基于 OpenXML SDK (.NET) 的直接 C# 脚本创建、编辑和格式化 DOCX 文档。

## ⚠️ 先判断:是否需要本 Skill

在开始任何操作前,先判断任务复杂度:

- **简单文档生成**(报告、总结、方案、请假条等纯文本段落)→ **直接用 `write_word` 工具**,不要继续读本 Skill。
  `write_word` 已内置美观样式(标题颜色/字号、正文行距/字体/颜色)和支持多种预设风格。
  用户说"美观""好看"时,读 `styles/catalog.md` 选 2-4 个风格,用 `ask_user_choice` 弹卡片让用户选。
  **第一个选项固定是 `default`(默认商务)**。用户选完传 `style` 参数给 `write_word` 即可。

- **需要以下任一才继续本 Skill**:
  - 页眉/页脚、目录、图片插入
  - 复杂表格、多节布局
  - 编辑已有 docx 文件(保留格式/批注/修订)
  - 应用模板格式化 + XSD 验证门控

### 执行纪律(必须遵守)

1. **只读完成任务所需的最少 reference**——读完能执行就立即开始。
2. **同一 reference 文件不要重复读取**(系统会拦截重复读取)。
3. **不要花多轮搜索脚本路径**——`scripts/` 路径在 `SKILL_DIR` 下,用一行命令定位。
4. **信息足够后立即执行**——不要继续研究文档。
5. **若预计轮数紧张,优先输出可交付版本**而非继续优化排版。

## 环境准备

**首次使用:** `bash scripts/setup.sh`(Windows 上使用 `powershell scripts/setup.ps1`,`--minimal` 跳过可选依赖)。

**会话中首次操作:** `scripts/env_check.sh` — 如果返回 `NOT READY` 则不得继续。(同一会话内的后续操作可跳过此步骤。)

## 快速入门:直接 C# 路径

当任务需要结构化文档操作(自定义样式、复杂表格、多节布局、页眉/页脚、目录、图片)时,直接编写 C# 而不是纠结于 CLI 限制。使用此脚手架:

```csharp
// 文件:scripts/dotnet/task.csx(或 Console 项目中的新 .cs 文件)
// dotnet run --project scripts/dotnet/MiniMaxAIDocx.Cli -- run-script task.csx
#r "nuget: DocumentFormat.OpenXml, 3.2.0"

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;

using var doc = WordprocessingDocument.Create("output.docx", WordprocessingDocumentType.Document);
var mainPart = doc.AddMainDocumentPart();
mainPart.Document = new Document(new Body());

// --- 在此处编写你的逻辑 ---
// 首先阅读相关的 Samples/*.cs 文件以获取已验证的模式。
// 参见下方参考部分中的 Samples/ 表格。
```

**在编写任何 C# 之前,必须先阅读相关的 `Samples/*.cs` 文件**——它们包含可编译、经 SDK 版本验证的模式。下方参考部分的 Samples 表格将主题映射到文件。

## CLI 简写

所有以下 CLI 命令使用 `$CLI` 作为以下命令的简写:
```bash
dotnet run --project scripts/dotnet/MiniMaxAIDocx.Cli --
```

## 管道路由

通过检查用户是否有输入 .docx 文件来路由:

```
用户任务
├─ 无输入文件 → 管道 A:CREATE
│   信号词:"写"、"创建"、"起草"、"生成"、"新建"、"制作一份报告/建议书/备忘录"
│   → 阅读 references/scenario_a_create.md
│
└─ 有输入 .docx
    ├─ 替换/填充/修改内容 → 管道 B:FILL-EDIT
    │   信号词:"填写"、"替换"、"更新"、"更改文本"、"添加章节"、"编辑"
    │   → 阅读 references/scenario_b_edit_content.md
    │
    └─ 重新格式化/应用样式/模板 → 管道 C:FORMAT-APPLY
        信号词:"重新格式化"、"应用模板"、"重新设计样式"、"匹配此格式"、"套模板"、"排版"
        ├─ 模板为纯样式(无内容)→ C-1:OVERLAY(将样式应用于源文档)
        └─ 模板有结构(封面/目录/示例章节)→ C-2:BASE-REPLACE
            (使用模板作为基础,将示例内容替换为用户内容)
        → 阅读 references/scenario_c_apply_template.md
```

From clark970417-eng/Cyrene-Agent, MIT.

More from clark970417-eng/Cyrene-Agent

Signals

Stars
0
Forks
1
Open issues
0
Last commit (this folder)
Aug 4, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026
Cite this page

docx skill. Agent Mart. https://agentmart.dev/skills/clark970417-eng-docx (last updated 2026-10-24)