# Create and Edit DOCX Documents

Professional DOCX work often requires preserving comments, tracked changes, and formatting. This skill guides Claude, Codex, and Claude Code through structured OOXML workflows.

## Install

```bash
npx skillstore add zhanlincui/docx
```

## Metadata

- Status: approved
- Slug: zhanlincui-docx
- Skillstore revision: r1
- Version status: missing
- Tree hash: 4d34adecee2011d449c4365956e364dca5bd09a2bb64802bd022d0395a81a897
- Author: ZhanlinCui
- GitHub username: ZhanlinCui
- License: Proprietary. LICENSE.txt has complete terms
- Repository: https://github.com/ZhanlinCui/Ultimate-Agent-Skills-Collection/tree/main/docx
- Ref: 64ca8af0f54a325752f08bd54e52151061ea659a
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: network, filesystem, external\_commands
- Quality score: 75
- Public page: https://skillstore.pages.dev/skills/zhanlincui-docx
- Manifest: https://skillstore.pages.dev/api/skills/zhanlincui-docx/manifest

## Capabilities

- Extract text from DOCX files with tracked change visibility using Pandoc.
- Create new DOCX files with JavaScript document components and formatting guidance.
- Edit unpacked OOXML files with helper classes for comments and tracked changes.
- Pack unpacked Office document directories back into DOCX, PPTX, or XLSX files.
- Validate DOCX and PPTX structures against bundled OOXML schemas.
- Convert DOCX files to PDF and page images for visual review workflows.

## Use Cases

- Review Contract Revisions: Apply precise tracked changes and comments while preserving review history in Word documents.
- Generate Structured Reports: Create formatted DOCX reports with headings, tables, lists, images, headers, and footers.
- Inspect Document Internals: Unpack DOCX files, inspect OOXML parts, adjust relationships, and validate the rebuilt document.

## Prompt Templates

### Extract Document Text

```
Read this DOCX file and summarize its contents. Preserve visible tracked changes in the summary.
```

### Create a New DOCX

```
Create a professional DOCX report with a title, sections, bullet lists, a table, and consistent styling.
```

### Add Review Comments

```
Add Word comments to the attached document for unclear clauses, missing definitions, and inconsistent dates.
```

### Implement Tracked Changes

```
Apply these negotiated edits as tracked changes, validate the XML, and produce a final DOCX for review.
```

## Limitations

- Requires local tools such as Pandoc, LibreOffice, Poppler, Node.js packages, and Python dependencies.
- Complex formatting changes require careful XML inspection and validation before delivery.
- Untrusted Office files should be handled in a controlled workspace because archive extraction is used.
- The bundled validators may not cover every Microsoft Word compatibility edge case.

## Best Practices

- Work on copied documents and keep the original DOCX unchanged.
- Validate after each batch of tracked changes or XML edits.
- Use precise surrounding text when mapping requested edits to OOXML nodes.

## Anti Patterns

- Do not unpack untrusted Office files outside an isolated working directory.
- Do not mark entire paragraphs as changed when only a few words changed.
- Do not skip final validation after direct OOXML edits.

## Security Audit

- Audited at: 2026-07-21T08:38:47.647\+00:00
- Summary: Four archive-extraction calls accept Office ZIP archives without validating member paths, creating a high-confidence Zip Slip risk. The remaining 396 static matches are false positives from OOXML schemas, local document-processing code, or Markdown examples; no outbound network behavior or prompt injection was evidenced. Static review was capped at 400/450 representative findings; omitted static matches are unconfirmed, so automatic publishing stays disabled until manual review.

## Stats

- Views: 215
- Downloads: 653
- Favorites: 3
- Popularity score: 0
