docx

GitHub

处理Word文档(.docx)的创建、编辑、审阅、格式校验及OOXML级操作,支持追踪更改、注释、模板生成与渲染验证。

App/memmy-agent/src/skills/docx/SKILL.md MemTensor/memmy-agent

Trigger Scenarios

需要创建或编辑Word文档 检查文档格式或布局是否正确 处理文档中的修订和注释

Install

npx skills add MemTensor/memmy-agent --skill docx -g -y
More Options

Non-standard path

npx skills add https://github.com/MemTensor/memmy-agent/tree/main/App/memmy-agent/src/skills/docx -g -y

Use without installing

npx skills use MemTensor/memmy-agent@docx

指定 Agent (Claude Code)

npx skills add MemTensor/memmy-agent --skill docx -a claude-code -g -y

安装 repo 全部 skill

npx skills add MemTensor/memmy-agent --all -g -y

预览 repo 内 skill

npx skills add MemTensor/memmy-agent --list

SKILL.md

Frontmatter
{
    "name": "docx",
    "description": "Create, read, edit, review, redline, comment on, merge, audit, render, and verify .docx Word documents, including layout-sensitive and OOXML-level work."
}

DOCX Skill

Use this skill when a task involves a Word .docx document and correctness depends on document structure, formatting, tracked changes, comments, fields, tables, forms, or rendered layout.

Core workflow

  1. Identify the operation: read/review, create/edit, template following, redlining/comments, conversion, or final verification.
  2. Keep the source document unchanged for review and template-distillation work. Write outputs and intermediate files to a task-specific writable directory.
  3. Use Node OOXML for ordinary paragraphs, runs, styles, tables, headers/footers, and page setup. Use the bundled helpers under scripts/ for deterministic audits and OOXML operations.
  4. After every meaningful create or edit batch, render the document with render_docx.mjs, inspect every generated page image, and iterate until the layout is clean.
  5. Deliver only the requested final document. Keep rendered PNGs, temporary PDFs, audit JSON, and diff images as internal QA artifacts unless requested.

Route to the relevant guide

Read only the supporting guide needed for the current operation:

Rendering and visual QA

The canonical renderer converts DOCX to PDF internally and rasterizes each page to page-<N>.png:

node scripts/render_docx.mjs input.docx --output_dir /path/to/qa

Use --emit_pdf only when an intermediate PDF is useful for diagnosis. Use --verbose when LibreOffice conversion needs debugging. Inspect every page at full resolution for clipped or overlapping text, missing glyphs, broken tables, unexpected page breaks, and header/footer drift. Text extraction or XML checks alone cannot prove visual correctness.

If LibreOffice is unavailable, complete structural checks with the relevant audits and state that visual QA could not be performed. If conversion fails for another reason, diagnose the renderer/profile problem before judging the DOCX.

For repeated comparisons, use scripts/render_and_diff.mjs. For a quick structural pass, use the audits for sections, headings, images, fields, footnotes, comments, tables, styles, watermarks, accessibility, or content controls as applicable.

New documents and major rewrites

When no supplied template controls the design, choose exactly one preset from references/design_presets.md:

  • standard_business_brief for formal memos and executive briefs
  • compact_reference_guide for checklists, launch guides, and dense references
  • narrative_proposal for proposals and longer persuasive documents
  • an archetype alias defined by the reference when it is a closer fit

Resolve the preset into explicit page, margin, typography, spacing, list, table, color, header, and footer tokens before drafting. Use real Word styles, numbering definitions, and fixed DXA table geometry; do not depend on inherited defaults or visual approximations. Read references/header_templates.md when a new first-page header, cover, or title block is needed.

Use the lightest form factor that matches the content: prose for explanation, bullets for unordered considerations, numbered steps for procedures, checklists for acceptance criteria, callouts for warnings, and tables only for genuinely tabular data. Avoid using tables as layout containers or turning cells into long prose blocks.

Editing, redlining, and OOXML

For an existing document, preserve the original structure and make the smallest local change that satisfies the request. Do not rewrite unrelated paragraphs or styles. Real tracked changes and Word comments require OOXML patching; use the corresponding helpers and perform another render plus structural check after any package-level change.

Use scripts/privacy_scrub.mjs before publication when personal metadata or rsid values should be removed. Use scripts/redact_docx.mjs for explicit redaction/anonymization requests and verify the result structurally and visually. Use scripts/set_protection.mjs only when the requested output needs editing restrictions.

File and command conventions

  • Refer to inputs and outputs by absolute paths when reporting results.
  • Keep temporary work in a unique writable directory; never modify a retained reference document during inspection.
  • Prefer the bundled Node/MJS helpers and the renderer bundled with the application. Check the renderer bundle before relying on an optional operation.
  • Do not claim a render or audit passed unless its output was actually checked.
  • Keep citation text human-readable; do not place internal tool tokens in the document.

Bundled resources

The package includes the canonical renderer, OOXML notes, task playbooks, design references, examples, and reusable scripts. references/manifest.txt lists the bundled paths. Scripts are intended to be run from a writable working directory, while this skill directory remains the source of reusable helpers.

Version History

  • 0074fc0 Current 2026-09-22 01:41

Same Skill Collection

App/memmy-agent/src/skills/agent-memory-onboarding/SKILL.md
App/memmy-agent/src/skills/computer-history/SKILL.md
App/memmy-agent/src/skills/github/SKILL.md
App/memmy-agent/src/skills/goal/SKILL.md
App/memmy-agent/src/skills/image-generation/SKILL.md
App/memmy-agent/src/skills/pdf/SKILL.md
App/memmy-agent/src/skills/pptx/SKILL.md
App/memmy-agent/src/skills/skill-creator/SKILL.md
App/memmy-agent/src/skills/summarize/SKILL.md
App/memmy-agent/src/skills/tmux/SKILL.md
App/memmy-agent/src/skills/ui-craft/SKILL.md
App/memmy-agent/src/skills/weather/SKILL.md
App/memmy-agent/src/skills/xlsx/SKILL.md
Memory/src/cli/skills/memmy-memory/SKILL.md
App/memmy-agent/src/skills/cron/SKILL.md

Metadata

Files
0
Version
0074fc0
Hash
f9085e4f
Indexed
2026-09-22 01:41

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-22 11:15
浙ICP备14020137号-1