docx

skillcreatorai/ai-agent-skills · updated Apr 8, 2026

$npx skills add https://github.com/skillcreatorai/ai-agent-skills --skill docx
0 commentsdiscussion
summary

For professional documents, use tracked changes:

skill.md

DOCX Processing

Workflow Decision Tree

  • Reading/Analyzing: Use text extraction or raw XML access
  • Creating New Document: Use docx-js (JavaScript)
  • Editing Existing: Use OOXML editing or redlining workflow

Reading Content

Text Extraction with Pandoc

# Convert to markdown with tracked changes
pandoc --track-changes=all file.docx -o output.md

Raw XML Access

# Unpack document
unzip document.docx -d unpacked/
# Key files:
# word/document.xml - Main content
# word/comments.xml - Comments
# word/media/ - Images

Creating New Documents (docx-js)

import { Document, Paragraph, TextRun, Packer } from 'docx';
import fs from 'fs';

const doc = new Document({
  sections: [{
    children: [
      new Paragraph({
        children: [
          new TextRun({ text: "Hello ", bold: true }),
          new TextRun({ text: "World", italics: true })
        ]
      })
    ]
  }]
});

const buffer = await Packer.toBuffer(doc);
fs.writeFileSync('document.docx', buffer);

Editing Existing Documents

Simple Edits

  1. Unpack: unzip doc.docx -d unpacked/
  2. Edit word/document.xml
  3. Repack: cd unpacked && zip -r ../edited.docx .

Tracked Changes (Redlining)

For professional documents, use tracked changes:

<!-- Deletion -->
<w:del w:author="Author" w:date="2025-01-01T00:00:00Z">
  <w:r><w:delText>old text</w:delText></w:r>
</w:del>

<!-- Insertion -->
<w:ins w:author="Author" w:date="2025-01-01T00:00:00Z">
  <w:r><w:t>new text</w:t></w:r>
</w:ins>

Converting to Images

# DOCX to PDF
soffice --headless --convert-to pdf document.docx

# PDF to images
pdftoppm -jpeg -r 150 document.pdf page

Best Practices

  • Use Pandoc for text extraction
  • Use docx-js for creating new documents
  • For legal/business docs, always use tracked changes
  • Preserve original RSIDs when editing

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.727 reviews
  • Soo Thompson· Dec 24, 2024

    docx fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Jin Chawla· Dec 12, 2024

    docx is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Shikha Mishra· Dec 4, 2024

    Useful defaults in docx — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ava White· Nov 3, 2024

    Solid pick for teams standardizing on skills: docx is focused, and the summary matches what you get after install.

  • Ava Robinson· Oct 22, 2024

    docx has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Omar Jackson· Oct 6, 2024

    docx reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Jin Abebe· Sep 13, 2024

    docx fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Sep 1, 2024

    docx is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Pratham Ware· Aug 20, 2024

    Keeps context tight: docx is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Ava Iyer· Aug 4, 2024

    We added docx from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 27

1 / 3