[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73Y75C05MF2P9QSM0VRY2V3":3,"skill-same:01M73Y75C05MF2P9QSM0VRY2V3":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M73Y75C05MF2P9QSM0VRY2V3","minimax-docx",null,"Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: (A) create new documents from scratch, (B) fill\u002Fedit content in existing documents, (C) apply template formatting with XSD validation gate-check. MUST use this skill whenever the user wants to produce, modify, or format a Word document — including when they say \"write a report\", \"draft a proposal\", \"make a contract\", \"fill in this form\", \"reformat to match this template\", or any task whose final output is a .docx file. Even if the user doesn't mention \"docx\" explicitly, if the task implies a printable\u002Fformal document, use this skill.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fminimax-docx\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fminimax-docx\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: minimax-docx\nlicense: MIT\nmetadata:\n  version: \"1.0.0\"\n  category: document-processing\n  author: MiniMaxAI\n  sources:\n    - \"ECMA-376 Office Open XML File Formats\"\n    - \"GB\u002FT 9704-2012 Layout Standard for Official Documents\"\n    - \"IEEE \u002F ACM \u002F APA \u002F MLA \u002F Chicago \u002F Turabian Style Guides\"\n    - \"Springer LNCS \u002F Nature \u002F HBR Document Templates\"\ndescription: >\n  Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET).\n  Three pipelines: (A) create new documents from scratch, (B) fill\u002Fedit content in existing\n  documents, (C) apply template formatting with XSD validation gate-check.\n  MUST use this skill whenever the user wants to produce, modify, or format a Word document —\n  including when they say \"write a report\", \"draft a proposal\", \"make a contract\",\n  \"fill in this form\", \"reformat to match this template\", or any task whose final output\n  is a .docx file. Even if the user doesn't mention \"docx\" explicitly, if the task\n  implies a printable\u002Fformal document, use this skill.\ntriggers:\n  - Word\n  - docx\n  - document\n  - 文档\n  - Word文档\n  - 报告\n  - 合同\n  - 公文\n  - 排版\n  - 套模板\n---\n\n# minimax-docx\n\nCreate, edit, and format DOCX documents via CLI tools or direct C# scripts built on OpenXML SDK (.NET).\n\n## Setup\n\n**First time:** `bash scripts\u002Fsetup.sh` (or `powershell scripts\u002Fsetup.ps1` on Windows, `--minimal` to skip optional deps).\n\n**First operation in session:** `scripts\u002Fenv_check.sh` — do not proceed if `NOT READY`. (Skip on subsequent operations within the same session.)\n\n## Quick Start: Direct C# Path\n\nWhen the task requires structural document manipulation (custom styles, complex tables, multi-section layouts, headers\u002Ffooters, TOC, images), write C# directly instead of wrestling with CLI limitations. Use this scaffold:\n\n```csharp\n\u002F\u002F File: scripts\u002Fdotnet\u002Ftask.csx  (or a new .cs in a Console project)\n\u002F\u002F dotnet run --project scripts\u002Fdotnet\u002FMiniMaxAIDocx.Cli -- run-script task.csx\n#r \"nuget: DocumentFormat.OpenXml, 3.2.0\"\n\nusing DocumentFormat.OpenXml;\nusing DocumentFormat.OpenXml.Packaging;\nusing DocumentFormat.OpenXml.Wordprocessing;\n\nusing var doc = WordprocessingDocument.Create(\"output.docx\", WordprocessingDocumentType.Document);\nvar mainPart = doc.AddMainDocumentPart();\nmainPart.Document = new Document(new Body());\n\n\u002F\u002F --- Your logic here ---\n\u002F\u002F Read the relevant Samples\u002F*.cs file FIRST for tested patterns.\n\u002F\u002F See Samples\u002F table in References section below.\n```\n\n**Before writing any C#, read the relevant `Samples\u002F*.cs` file** — they contain compilable, SDK-version-verified patterns. The Samples table in the References section below maps topics to files.\n\n## CLI shorthand\n\nAll CLI commands below use `$CLI` as shorthand for:\n```bash\ndotnet run --project scripts\u002Fdotnet\u002FMiniMaxAIDocx.Cli --\n```\n\n## Pipeline routing\n\nRoute by checking: does the user have an input .docx file?\n\n```\nUser task\n├─ No input file → Pipeline A: CREATE\n│   signals: \"write\", \"create\", \"draft\", \"generate\", \"new\", \"make a report\u002Fproposal\u002Fmemo\"\n│   → Read references\u002Fscenario_a_create.md\n│\n└─ Has input .docx\n    ├─ Replace\u002Ffill\u002Fmodify content → Pipeline B: FILL-EDIT\n    │   signals: \"fill in\", \"replace\", \"update\", \"change text\", \"add section\", \"edit\"\n    │   → Read references\u002Fscenario_b_edit_content.md\n    │\n    └─ Reformat\u002Fapply style\u002Ftemplate → Pipeline C: FORMAT-APPLY\n        signals: \"reformat\", \"apply template\", \"restyle\", \"match this format\", \"套模板\", \"排版\"\n        ├─ Template is pure style (no content) → C-1: OVERLAY (apply styles to source)\n        └─ Template has structure (cover\u002FTOC\u002Fexample sections) → C-2: BASE-REPLACE\n            (use template as base, replace example content with user content)\n        → Read references\u002Fscenario_c_apply_template.md\n```\n\nIf the request spans multiple pipelines, run them sequentially (e.g., Create then Format-Apply).\n\n## Pre-processing\n\nConvert `.doc` → `.docx` if needed: `scripts\u002Fdoc_to_docx.sh input.doc output_dir\u002F`\n\nPreview before editing (avoids reading raw XML): `scripts\u002Fdocx_preview.sh document.docx`\n\nAnalyze structure for editing scenarios: `$CLI analyze --input document.docx`\n\n## Scenario A: Create\n\nRead `references\u002Fscenario_a_create.md`, `references\u002Ftypography_guide.md`, and `references\u002Fdesign_principles.md` first. Pick an aesthetic recipe from `Samples\u002FAestheticRecipeSamples.cs` that matches the document type — do not invent formatting values. For CJK, also read `references\u002Fcjk_typography.md`.\n\n**Choose your path:**\n- **Simple** (plain text, minimal formatting): use CLI — `$CLI create --type report --output out.docx --config content.json`\n- **Structural** (custom styles, multi-section, TOC, images, complex tables): write C# directly. Read the relevant `Samples\u002F*.cs` first.\n\nCLI options: `--type` (report|letter|memo|academic), `--title`, `--author`, `--page-size` (letter|a4|legal|a3), `--margins` (standard|narrow|wide), `--header`, `--footer`, `--page-numbers`, `--toc`, `--content-json`.\n\nThen run the **validation pipeline** (below).\n\n## Scenario B: Edit \u002F Fill\n\nRead `references\u002Fscenario_b_edit_content.md` first. Preview → analyze → edit → validate.\n\n**Choose your path:**\n- **Simple** (text replacement, placeholder fill): use CLI subcommands.\n- **Structural** (add\u002Freorganize sections, modify styles, manipulate tables, insert images): write C# directly. Read `references\u002Fopenxml_element_order.md` and the relevant `Samples\u002F*.cs`.\n\nAvailable CLI edit subcommands:\n- `replace-text --find \"X\" --replace \"Y\"`\n- `fill-placeholders --data '{\"key\":\"value\"}'`\n- `fill-table --data table.json`\n- `insert-section`, `remove-section`, `update-header-footer`\n\n```bash\n$CLI edit replace-text --input in.docx --output out.docx --find \"OLD\" --replace \"NEW\"\n$CLI edit fill-placeholders --input in.docx --output out.docx --data '{\"name\":\"John\"}'\n```\n\nThen run the **validation pipeline**. Also run diff to verify minimal changes:\n```bash\n$CLI diff --before in.docx --after out.docx\n```\n\n## Scenario C: Apply Template\n\nRead `references\u002Fscenario_c_apply_template.md` first. Preview and analyze both source and template.\n\n```bash\n$CLI apply-template --input source.docx --template template.docx --output out.docx\n```\n\nFor complex template operations (multi-template merge, per-section headers\u002Ffooters, style merging), write C# directly — see Critical Rules below for required patterns.\n\nRun the **validation pipeline**, then the **hard gate-check**:\n```bash\n$CLI validate --input out.docx --gate-check assets\u002Fxsd\u002Fbusiness-rules.xsd\n```\nGate-check is a **hard requirement**. Do NOT deliver until it passes. If it fails: diagnose, fix, re-run.\n\nAlso diff to verify content preservation: `$CLI diff --before source.docx --after out.docx`\n\n## Validation pipeline\n\nRun after every write operation. For Scenario C the full pipeline is **mandatory**; for A\u002FB it is **recommended** (skip only if the operation was trivially simple).\n\n```bash\n$CLI merge-runs --input doc.docx                                    # 1. consolidate runs\n$CLI validate --input doc.docx --xsd assets\u002Fxsd\u002Fwml-subset.xsd     # 2. XSD structure\n$CLI validate --input doc.docx --business                           # 3. business rules\n```\n\nIf XSD fails, auto-repair and retry:\n```bash\n$CLI fix-order --input doc.docx\n$CLI validate --input doc.docx --xsd assets\u002Fxsd\u002Fwml-subset.xsd\n```\n\nIf XSD still fails, fall back to business rules + preview:\n```bash\n$CLI validate --input doc.docx --business\nscripts\u002Fdocx_preview.sh doc.docx\n# Verify: font contamination=0, table count correct, drawing count correct, sectPr count correct\n```\n\nFinal preview: `scripts\u002Fdocx_preview.sh doc.docx`\n\n## Critical rules\n\nThese prevent file corruption — OpenXML is strict about element ordering.\n\n**Element order** (properties always first):\n\n| Parent | Order |\n|--------|-------|\n| `w:p`  | `pPr` → runs |\n| `w:r`  | `rPr` → `t`\u002F`br`\u002F`tab` |\n| `w:tbl`| `tblPr` → `tblGrid` → `tr` |\n| `w:tr` | `trPr` → `tc` |\n| `w:tc` | `tcPr` → `p` (min 1 `\u003Cw:p\u002F>`) |\n| `w:body` | block content → `sectPr` (LAST child) |\n\n**Direct format contamination:** When copying content from a source document, inline `rPr` (fonts, color) and `pPr` (borders, shading, spacing) override template styles. Always strip direct formatting — keep only `pStyle` reference and `t` text. Clean tables too (including `pPr\u002FrPr` inside cells).\n\n**Track changes:** `\u003Cw:del>` uses `\u003Cw:delText>`, never `\u003Cw:t>`. `\u003Cw:ins>` uses `\u003Cw:t>`, never `\u003Cw:delText>`.\n\n**Font size:** `w:sz` = points × 2 (12pt → `sz=\"24\"`). Margins\u002Fspacing in DXA (1 inch = 1440, 1cm ≈ 567).\n\n**Heading styles MUST have OutlineLevel:** When defining heading styles (Heading1, ThesisH1, etc.), always include `new OutlineLevel { Val = N }` in `StyleParagraphProperties` (H1→0, H2→1, H3→2). Without this, Word sees them as plain styled text — TOC and navigation pane won't work.\n\n**Multi-template merge:** When given multiple template files (font, heading, breaks), read `references\u002Fscenario_c_apply_template.md` section \"Multi-Template Merge\" FIRST. Key rules:\n- Merge styles from all templates into one styles.xml. Structure (sections\u002Fbreaks) comes from the breaks template.\n- Each content paragraph must appear exactly ONCE — never duplicate when inserting section breaks.\n- NEVER insert empty\u002Fblank paragraphs as padding or section separators. Output paragraph count must equal input. Use section break properties (`w:sectPr` inside `w:pPr`) and style spacing (`w:spacing` before\u002Fafter) for visual separation.\n- Insert oddPage section breaks before EVERY chapter heading, not just the first. Even if a chapter has dual-column content, it MUST start with oddPage; use a second continuous break after the heading for column switching.\n- Dual-column chapters need THREE section breaks: (1) oddPage in preceding para's pPr, (2) continuous+cols=2 in the chapter HEADING's pPr, (3) continuous+cols=1 in the last body para's pPr to revert.\n- Copy `titlePg` settings from the breaks template for EACH section. Abstract and TOC sections typically need `titlePg=true`.\n\n**Multi-section headers\u002Ffooters:** Templates with 10+ sections (e.g., Chinese thesis) have DIFFERENT headers\u002Ffooters per section (Roman vs Arabic page numbers, different header text per zone). Rules:\n- Use C-2 Base-Replace: copy the TEMPLATE as output base, then replace body content. This preserves all sections, headers, footers, and titlePg settings automatically.\n- NEVER recreate headers\u002Ffooters from scratch — copy template header\u002Ffooter XML byte-for-byte.\n- NEVER add formatting (borders, alignment, font size) not present in the template header XML.\n- Non-cover sections MUST have header\u002Ffooter XML files (at least empty header + page number footer).\n- See `references\u002Fscenario_c_apply_template.md` section \"Multi-Section Header\u002FFooter Transfer\".\n\n## References\n\nLoad as needed — don't load all at once. Pick the most relevant files for the task.\n\n**The C# samples and design references below are the project's knowledge base (\"encyclopedia\").** When writing OpenXML code, ALWAYS read the relevant sample file first — it contains compilable, SDK-version-verified patterns that prevent common errors. When making aesthetic decisions, read the design principles and recipe files — they encode tested, harmonious parameter sets from authoritative sources (IEEE, ACM, APA, Nature, etc.), not guesses.\n\n### Scenario guides (read first for each pipeline)\n\n| File | When |\n|------|------|\n| `references\u002Fscenario_a_create.md` | Pipeline A: creating from scratch |\n| `references\u002Fscenario_b_edit_content.md` | Pipeline B: editing existing content |\n| `references\u002Fscenario_c_apply_template.md` | Pipeline C: applying template formatting |\n\n### C# code samples (compilable, heavily commented — read when writing code)\n\n| File | Topic |\n|------|-------|\n| `Samples\u002FDocumentCreationSamples.cs` | Document lifecycle: create, open, save, streams, doc defaults, settings, properties, page setup, multi-section |\n| `Samples\u002FStyleSystemSamples.cs` | Styles: Normal\u002FHeading chain, character\u002Ftable\u002Flist styles, DocDefaults, latentStyles, CJK 公文, APA 7th, import, resolve inheritance |\n| `Samples\u002FCharacterFormattingSamples.cs` | RunProperties: fonts, size, bold\u002Fitalic, all underlines, color, highlight, strike, sub\u002Fsuper, caps, spacing, shading, border, emphasis marks |\n| `Samples\u002FParagraphFormattingSamples.cs` | ParagraphProperties: justification, indentation, line\u002Fparagraph spacing, keep\u002Fwidow, outline level, borders, tabs, numbering, bidi, frame |\n| `Samples\u002FTableSamples.cs` | Tables: borders, grid, cell props, margins, row height, header repeat, merge (H+V), nested, floating, three-line 三线表, zebra striping |\n| `Samples\u002FHeaderFooterSamples.cs` | Headers\u002Ffooters: page numbers, \"Page X of Y\", first\u002Feven\u002Fodd, logo image, table layout, 公文 \"-X-\", per-section |\n| `Samples\u002FImageSamples.cs` | Images: inline, floating, text wrapping, border, alt text, in header\u002Ftable, replace, SVG fallback, dimension calc |\n| `Samples\u002FListAndNumberingSamples.cs` | Numbering: bullets, multi-level decimal, custom symbols, outline→headings, legal, Chinese 一\u002F（一）\u002F1.\u002F(1), restart\u002Fcontinue |\n| `Samples\u002FFieldAndTocSamples.cs` | Fields: TOC, SimpleField vs complex field, DATE\u002FPAGE\u002FREF\u002FSEQ\u002FMERGEFIELD\u002FIF\u002FSTYLEREF, TOC styles |\n| `Samples\u002FFootnoteAndCommentSamples.cs` | Footnotes, endnotes, comments (4-file system), bookmarks, hyperlinks (internal + external) |\n| `Samples\u002FTrackChangesSamples.cs` | Revisions: insertions (w:t), deletions (w:delText!), formatting changes, accept\u002Freject all, move tracking |\n| `Samples\u002FAestheticRecipeSamples.cs` | 13 aesthetic recipes from authoritative sources: ModernCorporate, AcademicThesis, ExecutiveBrief, ChineseGovernment (GB\u002FT 9704), MinimalModern, IEEE Conference, ACM sigconf, APA 7th, MLA 9th, Chicago\u002FTurabian, Springer LNCS, Nature, HBR — each with exact values from official style guides |\n\nNote: `Samples\u002F` path is relative to `scripts\u002Fdotnet\u002FMiniMaxAIDocx.Core\u002F`.\n\n### Markdown references (read when you need specifications or design rules)\n\n| File | When |\n|------|------|\n| `references\u002Fopenxml_element_order.md` | XML element ordering rules (prevents corruption) |\n| `references\u002Fopenxml_units.md` | Unit conversion: DXA, EMU, half-points, eighth-points |\n| `references\u002Fopenxml_encyclopedia_part1.md` | Detailed C# encyclopedia: document creation, styles, character & paragraph formatting |\n| `references\u002Fopenxml_encyclopedia_part2.md` | Detailed C# encyclopedia: page setup, tables, headers\u002Ffooters, sections, doc properties |\n| `references\u002Fopenxml_encyclopedia_part3.md` | Detailed C# encyclopedia: TOC, footnotes, fields, track changes, comments, images, math, numbering, protection |\n| `references\u002Ftypography_guide.md` | Font pairing, sizes, spacing, page layout, table design, color schemes |\n| `references\u002Fcjk_typography.md` | CJK fonts, 字号 sizes, RunFonts mapping, GB\u002FT 9704 公文 standard |\n| `references\u002Fcjk_university_template_guide.md` | Chinese university thesis templates: numeric styleIds (1\u002F2\u002F3 vs Heading1), document zone structure (cover→abstract→TOC→body→references), font expectations, common mistakes |\n| `references\u002Fdesign_principles.md` | **Aesthetic foundations**: 6 design principles (white space, contrast\u002Fscale, proximity, alignment, repetition, hierarchy) — teaches WHY, not just WHAT |\n| `references\u002Fdesign_good_bad_examples.md` | **Good vs Bad comparisons**: 10 categories of typography mistakes with OpenXML values, ASCII mockups, and fixes |\n| `references\u002Ftrack_changes_guide.md` | Revision marks deep dive |\n| `references\u002Ftroubleshooting.md` | **Symptom-driven fixes**: 13 common problems indexed by what you SEE (headings wrong, images missing, TOC broken, etc.) — search by symptom, find the fix |\n","# minimax-docx\n\nCreate, edit, and format DOCX documents via CLI tools or direct C# scripts built on OpenXML SDK (.NET).\n\n## Setup\n\n**First time:** `bash scripts\u002Fsetup.sh` (or `powershell scripts\u002Fsetup.ps1` on Windows, `--minimal` to skip optional deps).\n\n**First operation in session:** `scripts\u002Fenv_check.sh` — do not proceed if `NOT READY`. (Skip on subsequent operations within the same session.)\n\n## Quick Start: Direct C# Path\n\nWhen the task requires structural document manipulation (custom styles, complex tables, multi-section layouts, headers\u002Ffooters, TOC, images), write C# directly instead of wrestling with CLI limitations. Use this scaffold:\n\n```csharp\n\u002F\u002F File: scripts\u002Fdotnet\u002Ftask.csx  (or a new .cs in a Console project)\n\u002F\u002F dotnet run --project scripts\u002Fdotnet\u002FMiniMaxAIDocx.Cli -- run-script task.csx\n#r \"nuget: DocumentFormat.OpenXml, 3.2.0\"\n\nusing DocumentFormat.OpenXml;\nusing DocumentFormat.OpenXml.Packaging;\nusing DocumentFormat.OpenXml.Wordprocessing;\n\nusing var doc = WordprocessingDocument.Create(\"output.docx\", WordprocessingDocumentType.Document);\nvar mainPart = doc.AddMainDocumentPart();\nmainPart.Document = new Document(new Body());\n\n\u002F\u002F --- Your logic here ---\n\u002F\u002F Read the relevant Samples\u002F*.cs file FIRST for tested patterns.\n\u002F\u002F See Samples\u002F table in References section below.\n```\n\n**Before writing any C#, read the relevant `Samples\u002F*.cs` file** — they contain compilable, SDK-version-verified patterns. The Samples table in the References section below maps topics to files.\n\n## CLI shorthand\n\nAll CLI commands below use `$CLI` as shorthand for:\n```bash\ndotnet run --project scripts\u002Fdotnet\u002FMiniMaxAIDocx.Cli --\n```\n\n## Pipeline routing\n\nRoute by checking: does the user have an input .docx file?\n\n```\nUser task\n├─ No input file → Pipeline A: CREATE\n│   signals: \"write\", \"create\", \"draft\", \"generate\", \"new\", \"make a report\u002Fproposal\u002Fmemo\"\n│   → Read references\u002Fscenario_a_create.md\n│\n└─ Has input .docx\n    ├─ Replace\u002Ffill\u002Fmodify content → Pipeline B: FILL-EDIT\n    │   signals: \"fill in\", \"replace\", \"update\", \"change text\", \"add section\", \"edit\"\n    │   → Read references\u002Fscenario_b_edit_content.md\n    │\n    └─ Reformat\u002Fapply style\u002Ftemplate → Pipeline C: FORMAT-APPLY\n        signals: \"reformat\", \"apply template\", \"restyle\", \"match this format\", \"套模板\", \"排版\"\n        ├─ Template is pure style (no content) → C-1: OVERLAY (apply styles to source)\n        └─ Template has structure (cover\u002FTOC\u002Fexample sections) → C-2: BASE-REPLACE\n            (use template as base, replace example content with user content)\n        → Read references\u002Fscenario_c_apply_template.md\n```\n\nIf the request spans multiple pipelines, run them sequentially (e.g., Create then Format-Apply).\n\n## Pre-processing\n\nConvert `.doc` → `.docx` if needed: `scripts\u002Fdoc_to_docx.sh input.doc output_dir\u002F`\n\nPreview before editing (avoids reading raw XML): `scripts\u002Fdocx_preview.sh document.docx`\n\nAnalyze structure for editing scenarios: `$CLI analyze --input document.docx`\n\n## Scenario A: Create\n\nRead `references\u002Fscenario_a_create.md`, `references\u002Ftypography_guide.md`, and `references\u002Fdesign_principles.md` first. Pick an aesthetic recipe from `Samples\u002FAestheticRecipeSamples.cs` that matches the document type — do not invent formatting values. For CJK, also read `references\u002Fcjk_typography.md`.\n\n**Choose your path:**\n- **Simple** (plain text, minimal formatting): use CLI — `$CLI create --type report --output out.docx --config content.json`\n- **Structural** (custom styles, multi-section, TOC, images, complex tables): write C# directly. Read the relevant `Samples\u002F*.cs` first.\n\nCLI options: `--type` (report|letter|memo|academic), `--title`, `--author`, `--page-size` (letter|a4|legal|a3), `--margins` (standard|narrow|wide), `--header`, `--footer`, `--page-numbers`, `--toc`, `--content-json`.\n\nThen run the **validation pipeline** (below).\n\n## Scenario B: Edit \u002F Fill\n\nRead `references\u002Fscenario_b_edit_content.md` first. Preview → analyze → edit → validate.\n\n**Choose your path:**\n- **Simple** (text replacement, placeholder fill): use CLI subcommands.\n- **Structural** (add\u002Freorganize sections, modify styles, manipulate tables, insert images): write C# directly. Read `references\u002Fopenxml_element_order.md` and the relevant `Samples\u002F*.cs`.\n\nAvailable CLI edit subcommands:\n- `replace-text --find \"X\" --replace \"Y\"`\n- `fill-placeholders --data '{\"key\":\"value\"}'`\n- `fill-table --data table.json`\n- `insert-section`, `remove-section`, `update-header-footer`\n\n```bash\n$CLI edit replace-text --input in.docx --output out.docx --find \"OLD\" --replace \"NEW\"\n$CLI edit fill-placeholders --input in.docx --output out.docx --data '{\"name\":\"John\"}'\n```\n\nThen run the **validation pipeline**. Also run diff to verify minimal changes:\n```bash\n$CLI diff --before in.docx --after out.docx\n```\n\n## Scenario C: Apply Template\n\nRead `references\u002Fscenario_c_apply_template.md` first. Preview and analyze both source and template.\n\n```bash\n$CLI apply-template --input source.docx --template template.docx --output out.docx\n```\n\nFor complex template operations (multi-template merge, per-section headers\u002Ffooters, style merging), write C# directly — see Critical Rules below for required patterns.\n\nRun the **validation pipeline**, then the **hard gate-check**:\n```bash\n$CLI validate --input out.docx --gate-check assets\u002Fxsd\u002Fbusiness-rules.xsd\n```\nGate-check is a **hard requirement**. Do NOT deliver until it passes. If it fails: diagnose, fix, re-run.\n\nAlso diff to verify content preservation: `$CLI diff --before source.docx --after out.docx`\n\n## Validation pipeline\n\nRun after every write operation. For Scenario C the full pipeline is **mandatory**; for A\u002FB it is **recommended** (skip only if the operation was trivially simple).\n\n```bash\n$CLI merge-runs --input doc.docx                                    # 1. consolidate runs\n$CLI validate --input doc.docx --xsd assets\u002Fxsd\u002Fwml-subset.xsd     # 2. XSD structure\n$CLI validate --input doc.docx --business                           # 3. business rules\n```\n\nIf XSD fails, auto-repair and retry:\n```bash\n$CLI fix-order --input doc.docx\n$CLI validate --input doc.docx --xsd assets\u002Fxsd\u002Fwml-subset.xsd\n```\n\nIf XSD still fails, fall back to business rules + preview:\n```bash\n$CLI validate --input doc.docx --business\nscripts\u002Fdocx_preview.sh doc.docx\n# Verify: font contamination=0, table count correct, drawing count correct, sectPr count correct\n```\n\nFinal preview: `scripts\u002Fdocx_preview.sh doc.docx`\n\n## Critical rules\n\nThese prevent file corruption — OpenXML is strict about element ordering.\n\n**Element order** (properties always first):\n\n| Parent | Order |\n|--------|-------|\n| `w:p`  | `pPr` → runs |\n| `w:r`  | `rPr` → `t`\u002F`br`\u002F`tab` |\n| `w:tbl`| `tblPr` → `tblGrid` → `tr` |\n| `w:tr` | `trPr` → `tc` |\n| `w:tc` | `tcPr` → `p` (min 1 `\u003Cw:p\u002F>`) |\n| `w:body` | block content → `sectPr` (LAST child) |\n\n**Direct format contamination:** When copying content from a source document, inline `rPr` (fonts, color) and `pPr` (borders, shading, spacing) override template styles. Always strip direct formatting — keep only `pStyle` reference and `t` text. Clean tables too (including `pPr\u002FrPr` inside cells).\n\n**Track changes:** `\u003Cw:del>` uses `\u003Cw:delText>`, never `\u003Cw:t>`. `\u003Cw:ins>` uses `\u003Cw:t>`, never `\u003Cw:delText>`.\n\n**Font size:** `w:sz` = points × 2 (12pt → `sz=\"24\"`). Margins\u002Fspacing in DXA (1 inch = 1440, 1cm ≈ 567).\n\n**Heading styles MUST have OutlineLevel:** When defining heading styles (Heading1, ThesisH1, etc.), always include `new OutlineLevel { Val = N }` in `StyleParagraphProperties` (H1→0, H2→1, H3→2). Without this, Word sees them as plain styled text — TOC and navigation pane won't work.\n\n**Multi-template merge:** When given multiple template files (font, heading, breaks), read `references\u002Fscenario_c_apply_template.md` section \"Multi-Template Merge\" FIRST. Key rules:\n- Merge styles from all templates into one styles.xml. Structure (sections\u002Fbreaks) comes from the breaks template.\n- Each content paragraph must appear exactly ONCE — never duplicate when inserting section breaks.\n- NEVER insert empty\u002Fblank paragraphs as padding or section separators. Output paragraph count must equal input. Use section break properties (`w:sectPr` inside `w:pPr`) and style spacing (`w:spacing` before\u002Fafter) for visual separation.\n- Insert oddPage section breaks before EVERY chapter heading, not just the first. Even if a chapter has dual-column content, it MUST start with oddPage; use a second continuous break after the heading for column switching.\n- Dual-column chapters need THREE section breaks: (1) oddPage in preceding para's pPr, (2) continuous+cols=2 in the chapter HEADING's pPr, (3) continuous+cols=1 in the last body para's pPr to revert.\n- Copy `titlePg` settings from the breaks template for EACH section. Abstract and TOC sections typically need `titlePg=true`.\n\n**Multi-section headers\u002Ffooters:** Templates with 10+ sections (e.g., Chinese thesis) have DIFFERENT headers\u002Ffooters per section (Roman vs Arabic page numbers, different header text per zone). Rules:\n- Use C-2 Base-Replace: copy the TEMPLATE as output base, then replace body content. This preserves all sections, headers, footers, and titlePg settings automatically.\n- NEVER recreate headers\u002Ffooters from scratch — copy template header\u002Ffooter XML byte-for-byte.\n- NEVER add formatting (borders, alignment, font size) not present in the template header XML.\n- Non-cover sections MUST have header\u002Ffooter XML files (at least empty header + page number footer).\n- See `references\u002Fscenario_c_apply_template.md` section \"Multi-Section Header\u002FFooter Transfer\".\n\n## References\n\nLoad as needed — don't load all at once. Pick the most relevant files for the task.\n\n**The C# samples and design references below are the project's knowledge base (\"encyclopedia\").** When writing OpenXML code, ALWAYS read the relevant sample file first — it contains compilable, SDK-version-verified patterns that prevent common errors. When making aesthetic decisions, read the design principles and recipe files — they encode tested, harmonious parameter sets from authoritative sources (IEEE, ACM, APA, Nature, etc.), not guesses.\n\n### Scenario guides (read first for each pipeline)\n\n| File | When |\n|------|------|\n| `references\u002Fscenario_a_create.md` | Pipeline A: creating from scratch |\n| `references\u002Fscenario_b_edit_content.md` | Pipeline B: editing existing content |\n| `references\u002Fscenario_c_apply_template.md` | Pipeline C: applying template formatting |\n\n### C# code samples (compilable, heavily commented — read when writing code)\n\n| File | Topic |\n|------|-------|\n| `Samples\u002FDocumentCreationSamples.cs` | Document lifecycle: create, open, save, streams, doc defaults, settings, properties, page setup, multi-section |\n| `Samples\u002FStyleSystemSamples.cs` | Styles: Normal\u002FHeading chain, character\u002Ftable\u002Flist styles, DocDefaults, latentStyles, CJK 公文, APA 7th, import, resolve inheritance |\n| `Samples\u002FCharacterFormattingSamples.cs` | RunProperties: fonts, size, bold\u002Fitalic, all underlines, color, highlight, strike, sub\u002Fsuper, caps, spacing, shading, border, emphasis marks |\n| `Samples\u002FParagraphFormattingSamples.cs` | ParagraphProperties: justification, indentation, line\u002Fparagraph spacing, keep\u002Fwidow, outline level, borders, tabs, numbering, bidi, frame |\n| `Samples\u002FTableSamples.cs` | Tables: borders, grid, cell props, margins, row height, header repeat, merge (H+V), nested, floating, three-line 三线表, zebra striping |\n| `Samples\u002FHeaderFooterSamples.cs` | Headers\u002Ffooters: page numbers, \"Page X of Y\", first\u002Feven\u002Fodd, logo image, table layout, 公文 \"-X-\", per-section |\n| `Samples\u002FImageSamples.cs` | Images: inline, floating, text wrapping, border, alt text, in header\u002Ftable, replace, SVG fallback, dimension calc |\n| `Samples\u002FListAndNumberingSamples.cs` | Numbering: bullets, multi-level decimal, custom symbols, outline→headings, legal, Chinese 一\u002F（一）\u002F1.\u002F(1), restart\u002Fcontinue |\n| `Samples\u002FFieldAndTocSamples.cs` | Fields: TOC, SimpleField vs complex field, DATE\u002FPAGE\u002FREF\u002FSEQ\u002FMERGEFIELD\u002FIF\u002FSTYLEREF, TOC styles |\n| `Samples\u002FFootnoteAndCommentSamples.cs` | Footnotes, endnotes, comments (4-file system), bookmarks, hyperlinks (internal + external) |\n| `Samples\u002FTrackChangesSamples.cs` | Revisions: insertions (w:t), deletions (w:delText!), formatting changes, accept\u002Freject all, move tracking |\n| `Samples\u002FAestheticRecipeSamples.cs` | 13 aesthetic recipes from authoritative sources: ModernCorporate, AcademicThesis, ExecutiveBrief, ChineseGovernment (GB\u002FT 9704), MinimalModern, IEEE Conference, ACM sigconf, APA 7th, MLA 9th, Chicago\u002FTurabian, Springer LNCS, Nature, HBR — each with exact values from official style guides |\n\nNote: `Samples\u002F` path is relative to `scripts\u002Fdotnet\u002FMiniMaxAIDocx.Core\u002F`.\n\n### Markdown references (read when you need specifications or design rules)\n\n| File | When |\n|------|------|\n| `references\u002Fopenxml_element_order.md` | XML element ordering rules (prevents corruption) |\n| `references\u002Fopenxml_units.md` | Unit conversion: DXA, EMU, half-points, eighth-points |\n| `references\u002Fopenxml_encyclopedia_part1.md` | Detailed C# encyclopedia: document creation, styles, character & paragraph formatting |\n| `references\u002Fopenxml_encyclopedia_part2.md` | Detailed C# encyclopedia: page setup, tables, headers\u002Ffooters, sections, doc properties |\n| `references\u002Fopenxml_encyclopedia_part3.md` | Detailed C# encyclopedia: TOC, footnotes, fields, track changes, comments, images, math, numbering, protection |\n| `references\u002Ftypography_guide.md` | Font pairing, sizes, spacing, page layout, table design, color schemes |\n| `references\u002Fcjk_typography.md` | CJK fonts, 字号 sizes, RunFonts mapping, GB\u002FT 9704 公文 standard |\n| `references\u002Fcjk_university_template_guide.md` | Chinese university thesis templates: numeric styleIds (1\u002F2\u002F3 vs Heading1), document zone structure (cover→abstract→TOC→body→references), font expectations, common mistakes |\n| `references\u002Fdesign_principles.md` | **Aesthetic foundations**: 6 design principles (white space, contrast\u002Fscale, proximity, alignment, repetition, hierarchy) — teaches WHY, not just WHAT |\n| `references\u002Fdesign_good_bad_examples.md` | **Good vs Bad comparisons**: 10 categories of typography mistakes with OpenXML values, ASCII mockups, and fixes |\n| `references\u002Ftrack_changes_guide.md` | Revision marks deep dive |\n| `references\u002Ftroubleshooting.md` | **Symptom-driven fixes**: 13 common problems indexed by what you SEE (headings wrong, images missing, TOC broken, etc.) — search by symptom, find the fix |\n",{"name":5,"license":15,"metadata":25,"triggers":34,"description":45},{"author":26,"sources":27,"version":32,"category":33},"MiniMaxAI",[28,29,30,31],"ECMA-376 Office Open XML File Formats","GB\u002FT 9704-2012 Layout Standard for Official Documents","IEEE \u002F ACM \u002F APA \u002F MLA \u002F Chicago \u002F Turabian Style Guides","Springer LNCS \u002F Nature \u002F HBR Document Templates","1.0.0","document-processing",[35,36,37,38,39,40,41,42,43,44],"Word","docx","document","文档","Word文档","报告","合同","公文","排版","套模板","Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: (A) create new documents from scratch, (B) fill\u002Fedit content in existing documents, (C) apply template formatting with XSD validation gate-check. MUST use this skill whenever the user wants to produce, modify, or format a Word document — including when they say \"write a report\", \"draft a proposal\", \"make a contract\", \"fill in this form\", \"reformat to match this template\", or any task whose final output is a .docx file. Even if the user doesn't mention \"docx\" explicitly, if the task implies a printable\u002Fformal document, use this skill.\n","master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fmarketplace\u002Fminimax-docx",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill minimax-docx",{"tool":62,"command":63},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill minimax-docx",{"tool":65,"command":66},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill minimax-docx","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fminimax-docx\u002FSKILL.md",true,[70,74],{"path":71,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":16},"LICENSE","许可证",1066,{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"skill-report.json","REFERENCE","参考文档",365051,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fminimax-docx\u002Fskill-report.json",[81,89,96,103,110,117],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":88},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":88},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":88},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":88},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":88},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]