Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docx-creator

БесплатноЗапускает вложенные скриптыНе проверен

Produces Word (.docx) and exports existing Word/WPS manuscripts to PDF, preserving revisions, tables and images, especially Chinese formal documents via a…

daymadeот daymade★ 1 556 звёзд на GitHub

Об этом скилле

DOCX Creator

Thin incremental layer over minimax-skills:minimax-docx. Not a document engine.

Read this first. The OpenXML SDK capability lives in minimax-docx. This skill contains zero engine code. What it contains is the part that took a full debugging session to learn: where that engine's CLI stops being usable, how to drive its SDK correctly for Chinese formal documents, and how to verify the output so you don't ship a file that looks fine to you and broken in Word.

Division of labor

Layer Owner What lives there
OpenXML SDK (DocumentFormat.OpenXml), WordprocessingDocument API, XSD validator, style templates, OpenXML encyclopedia minimax-skills:minimax-docx Engine + reference docs. Never duplicated here.
Where the CLI's expressiveness ceiling is, and when to abandon it for C# this skill ISSUE-001, ISSUE-002
A verified markdown-to-docx generator for Chinese formal documents this skill scripts/Program.cs
Chinese formal-document typography rules that OpenXML lets you get wrong this skill Hard rules below + ISSUE-004…007
Real end-to-end visual verification chain this skill references/verification_protocol.md

Locate the engine at the marketplace install path, typically ~/.claude/plugins/marketplaces/minimax-skills/skills/minimax-docx/.

Go read minimax-docx directly for anything structural this skill does not cover — images, track changes, comments, TOC, multi-section layouts, template application. Its minimax-docx/references/ folder (cjk_typography.md, openxml_element_order.md, openxml_units.md, troubleshooting.md) and its Samples/*.cs are the authority for SDK patterns. Do not reinvent them here.

Routing: which path for this document?

Situation Path
Chinese contract / agreement / 公文 / any doc with 甲乙方 info blocks, numbered clauses, signature block, tables C# OpenXML via scripts/Program.cs (this skill)
Plain prose, headings and paragraphs only, no bold / lists / tables minimax-docx CLI create --content-json is enough
Fill or edit an existing .docx minimax-docx pipeline B (edit-content), plus this skill's layout and verification guidance
Match an existing .docx's formatting minimax-docx pipeline C (apply-template)
Existing Word/WPS → repaired layout / selected excerpt → PDF Keep the Word source; follow references/word-to-pdf.md and references/verification_protocol.md
Markdown → PDF daymade-docs:pdf-creator

Rule of thumb: the CLI's --content-json understands these block types: (heading, paragraph, pagebreak). Bold, lists, tables, borders, footers, fonts, alignment — none of it is expressible. A Chinese contract needs all of them. See ISSUE-001.

Quick start

The generator reads markdown and writes a formatted .docx. Copy it next to your document so build artifacts stay out of the skill directory:

# 1. Stage the generator beside your markdown
mkdir -p _docxgen && cp <skill-dir>/scripts/Program.cs <skill-dir>/scripts/mmdocx-gen.csproj \
   <skill-dir>/scripts/.gitignore _docxgen/

# 2. Generate (first run restores the project dependencies)
dotnet run --project _docxgen -- your-doc.md your-doc.docx

# 3. Structural validation via the engine's XSD validator (note the roll-forward env — ISSUE-003)
DOTNET_ROLL_FORWARD=Major dotnet run \
  --project ~/.claude/plugins/marketplaces/minimax-skills/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli \
  -- validate --input your-doc.docx

# 4. MANDATORY visual verification — never skip, never substitute qlmanage
soffice --headless --convert-to pdf --outdir /tmp/docxcheck your-doc.docx
pdftoppm -png -r 100 /tmp/docxcheck/your-doc.pdf /tmp/docxcheck/page
# then Read every /tmp/docxcheck/page-NN.png

# 5. Follow verification_protocol.md Step 3a before invoking the native Word route.
# Perform its native checks when usable; otherwise retain the named acceptance gap.

Full command details and troubleshooting: scripts/README.md. Full verification steps and pass/fail criteria: references/verification_protocol.md.

Hard rules (violating these means rework)

1. Alignment is layered — this is the expensive one

Never justify the whole document. Apply alignment by content role:

Content Alignment Why
Document title (H1) Center Convention
Clause headings (H2+) Left Convention
Info blocks and signature blocks — 甲方/乙方/统一社会信用代码/法定代表人/日期, i.e. any paragraph whose lines are joined by markdown soft or hard line breaks Left Justification stretches every line except the paragraph's last. A multi-line info block is one paragraph, so all but its final line get blown out into huge inter-character gaps.
Ordinary body prose Justified (Both) Clean right edge

The rule is machine-checkable, so do not eyeball it: if the markdown paragraph's inline tree contains a `LineBreakInlin

Полный SKILL.md на GitHub

Установить docx-creator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/known_issues.mdreferences/verification_protocol.mdreferences/word-to-pdf.mdscripts/.gitignorescripts/Program.csscripts/README.mdscripts/mmdocx-gen.csprojscripts/word_export_pdf.applescript

FAQ

Что делает скилл docx-creator?

Produces Word (.docx) and exports existing Word/WPS manuscripts to PDF, preserving revisions, tables and images, especially Chinese formal documents via a verified OpenXML generator with mandatory visual verification. Use for 生成 Word 文档 / 写合同 docx / 把 markdown 转成 Word / 中文排版. Not for Markdown → PDF (use daymade-docs:pdf-creator).

Как установить скилл docx-creator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docx-creator запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить docx-creator с