본문으로 건너뛰기
cccskills
무료GitHub에 공개

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).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Word
설치 방법 보기

포함된 파일(9)

  • SKILL.md11.6 KB
  • references/known_issues.md26.6 KB
  • references/verification_protocol.md12.5 KB
  • references/word-to-pdf.md10.7 KB
  • scripts/.gitignore10 B
  • scripts/mmdocx-gen.csproj452 B
  • scripts/Program.cs15.1 KB
  • scripts/README.md5.2 KB
  • scripts/word_export_pdf.applescript12.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

LayerOwnerWhat lives there
OpenXML SDK (DocumentFormat.OpenXml), WordprocessingDocument API, XSD validator, style templates, OpenXML encyclopediaminimax-skills:minimax-docxEngine + reference docs. Never duplicated here.
Where the CLI's expressiveness ceiling is, and when to abandon it for C#this skillISSUE-001, ISSUE-002
A verified markdown-to-docx generator for Chinese formal documentsthis skillscripts/Program.cs
Chinese formal-document typography rules that OpenXML lets you get wrongthis skillHard rules below + ISSUE-004…007
Real end-to-end visual verification chainthis skillreferences/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?

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

Rule of thumb: the CLI's --content-json understands exactly three 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 DocumentFormat.OpenXml + Markdig, ~20s)
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. MANDATORY if Microsoft Word.app is installed — LibreOffice cannot see ISSUE-012
open -a "Microsoft Word" your-doc.docx   # check the title bar for "兼容性模式", check every page

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. Three layers, three alignments:

ContentAlignmentWhy
Document title (H1)CenterConvention
Clause headings (H2+)LeftConvention
Info blocks and signature blocks — 甲方/乙方/统一社会信用代码/法定代表人/日期, i.e. any paragraph whose lines are joined by markdown soft or hard line breaksLeftJustification 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 proseJustified (Both)Clean right edge

The rule is machine-checkable, so do not eyeball it: if the markdown paragraph's inline tree contains a LineBreakInline, left-align that paragraph; otherwise justify it. Implemented in the case ParagraphBlock p: arm of Main's block-dispatch switch, with the break detection in InlineRuns. (Line numbers are deliberately not given here — they drift every time the file grows; see scripts/README.md's function-name lookup table instead.) Full write-up: ISSUE-004.

2. Independent lists restart; continuations retain numbering

Each independent markdown list must get its own NumId plus a LevelOverride carrying StartOverrideNumberingValue = 1. Reuse one NumId across clauses and clause 3's list silently continues from 4. Implemented across the case ListBlock lb: arm and the NumberingDefinitionsPart setup — see scripts/README.md's lookup table for both. Two SDK traps come with it (wrong class name, wrong element order) — ISSUE-005, ISSUE-006. For existing Word lists, preserve intentional continuations. Resolve numId and its level before changing geometry; numId=0 disables numbering. Typed ordinals are text, not an automatic list. See ISSUE-016.

3. CJK fonts need both slots

A run must set RunFonts { Ascii, HighAnsi, EastAsia }. Setting only the Latin slots leaves Chinese characters to Word's fallback, and the document renders in whatever the reader's machine picks. Shipped defaults: Latin Times New Roman; East Asian 宋体 for body, 黑体 for headings. Chinese bold runs switch family to 黑体 — 宋体 has no true bold weight and renderer-synthesized bold smears multi-stroke characters (ISSUE-014). Sizes are OpenXML half-points — body 21 (10.5pt, the common Chinese manuscript size), H1 36 (18pt), clause heading 28 (14pt). Body paragraphs also get a 2-character first-line indent (420 twips at 10.5pt — change it in lockstep with the body size). ISSUE-007.

4. Page and table basics

A4 is 11906 × 16838 twips with 1440 twip margins; page number goes in a centered footer PAGE field. Tables need all six borders (top/bottom/left/right/insideH/insideV, in that ECMA-376 order — ISSUE-013) and a tblGrid (ISSUE-012) — set fewer borders and cells look unruled in print; omit tblGrid and the file fails strict validation even though LibreOffice hides it. Implemented in BuildTable and the SectionProperties/FooterPart setup in Main — see scripts/README.md's lookup table.

Verification is not optional

Banned: qlmanage thumbnails as visual proof. macOS Quick Look renders with a different engine than Word and will happily show a clean-looking page for a document whose info blocks are stretched apart. A document was declared "verified perfect" on qlmanage evidence and opened broken in Word — that is the origin of this rule. ISSUE-008.

Required chain: generate → XSD validate → soffice --headless --convert-to pdf → pdftoppm -png → Read every page image → check the five failure modes (info blocks not stretched / each list restarting at 1 / table borders present / signature block intact / no orphaned pagination) → if Microsoft Word.app is installed, open the actual file in it and check the title bar for "兼容性模式" plus every page. Details, prerequisites and the "what counts as failure" list: references/verification_protocol.md.

LibreOffice rendering clean is not the same claim as "Word renders this correctly." ISSUE-012 is a real, reproduced case where a file passed every LibreOffice-based check in this chain — clean info blocks, correct numbering, intact tables — and still opened in real Word with "兼容性模式" in the title bar and phantom bullet markers on paragraphs that were never given any numbering. LibreOffice has no equivalent fallback path and is structurally unable to surface that class of defect. This is ISSUE-008's own lesson (a lenient renderer hides what Word does) recurring one layer up; treat LibreOffice-only verification as incomplete whenever Word is available to check against directly.

Before overwriting a delivered .docx, check for a sibling ~$<name>.docx — that is Word's owner lock, meaning the recipient has the old version open. Overwriting works, but they will keep seeing the stale document until they close and reopen it. Tell them. ISSUE-011.

Customizing

scripts/Program.cs is ~260 lines of straightforward OpenXML. Edit it directly for fonts, sizes, spacing, borders, or new block types — that is the intended workflow. Before adding a structural feature (images, TOC, headers, track changes), read the corresponding Samples/*.cs in minimax-docx first; those patterns are SDK-version-verified and will save you a compile-error loop.

If you append a new property to RunProperties, ParagraphProperties, TableProperties, TableCellProperties, or TableBorders: it must go in ECMA-376's child-element order for that parent, not wherever .Append() reads naturally in the C#. This is not a style preference — get it wrong and you reproduce ISSUE-012/ISSUE-013: minimax-docx validate still reports PASSED, LibreOffice still renders the file cleanly, and real Word still opens it in Compatibility Mode with unrequested formatting scattered across the document. The current code already carries a schema-order comment at each construction site (RunProps, Para, BuildTable) — extend the existing property list in place rather than appending after it, and if you add a genuinely new element, look up its position in openxml_element_order.md (minimax-docx) before deciding where the .Append() call goes. Re-run Step 3a of the verification protocol (real Word, not just LibreOffice) after any such change — that is the only check in the whole chain that would have caught this class of bug.

References

  • references/word-to-pdf.md — existing Word source, excerpt selection, accepted revisions, layout repair and PDF delivery; no Markdown round-trip.
  • references/known_issues.md — symptom / root cause / fix / verification for every trap hit while building this pipeline. Read before debugging anything.
  • references/verification_protocol.md — the full end-to-end verification chain, its prerequisites, its pass criteria, and the substitutions that are forbidden.
  • scripts/README.md — how to run the generator, what markdown it supports, environment requirements.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Fixes web search on an agent whose model backend can't run it: a relay/reseller proxying Claude or Codex returns empty instead of failing. Use when web search returns nothing, a model insists a shipped product doesn't exist, someone wants to give an agent internet access, or the user is on a third-party base URL, relay, or 中转站. Diagnoses which built-in tools are dead, removes them, and installs a working replacement.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daymade/claude-code-skills1.5천2026년 10월 19일 업데이트

Improves an existing application using its code, product contract, authorized work history and competitor evidence. Use for 取长补短、取其精华去其糟粕、参考竞品优化应用 or evolving an app from successful and failed work. Carries authorized changes through implementation and user-result verification, including REA and reverse Skill composition; use skill-evolver for Skills.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daymade/claude-code-skills1.5천2026년 10월 19일 업데이트

抓取 A 股消息面情报:从财联社、华尔街见闻、金十、新浪 7x24、东财快讯、 证监会/央行/上交所/财政部政策公告、东方财富股吧等公开来源抓取与股票相关的 新闻、政策、情绪,输出结构化 JSON 或 Markdown。 当用户提到“A 股消息面”、“抓新闻”、“个股消息”、“政策监管”、“股吧情绪”、 “财联社”、“东财快讯”、“市场情绪”或需要把某只股票相关的公开情报聚合出来时 触发。也适用于“帮我看看 000001 最近有什么消息”这类口语化请求。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daymade/claude-code-skills1.5천2026년 10월 19일 업데이트

Transcribes audio or video to speaker-labeled, timestamped text, locally with MLX on Apple Silicon or remotely. Use for 转录 / 录音转文字 / 说话人分离 / 字幕, and also for preparing audio for ASR without transcribing: 转格式, 降采样到 16kHz, merging recorder segments, or compressing and speeding up audio before 飞书妙记 — even when it looks like a one-line ffmpeg job.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daymade/claude-code-skills1.5천2026년 10월 19일 업데이트

Routes audio: StepFun ASR/语音识别, StepFun TTS/配音, transcript/妙记→会议纪要, merge/review minutes. Reads one bundled specialist; generic ASR and correction stay direct.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daymade/claude-code-skills1.5천2026년 10월 19일 업데이트

Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff. Use when a repo won't run, a teammate onboards, hook output duplicates, or commit/push/conflict needs guarding. Not for lost-commit recovery (use git-safety-net), GitHub ops (use github-ops), or history scrubbing (use github-sensitive-data-cleanup).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daymade/claude-code-skills1.5천2026년 10월 19일 업데이트

daymade의 스킬 모두 보기

이 스킬의 문제 신고