agentleFS
shalombshalomb/agent-skills/skills/docx-word-processor/SKILL.md

docx-word-processor

Skill3 starsChanged 3 months agoMITView on GitHub

Use this skill whenever you need to create, read, edit, or manipulate Word documents (.docx files). Trigger this on any mention of 'Word doc', 'word document', '.docx', or requests to produce formatted deliverables like reports, memos, or letters. Use this for extracting text, inserting images, tracking changes, or converting content to Word format. Do NOT use for PDFs or spreadsheets.

  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never use \n or unicode bullets: - Use separate Paragraphs and LevelFormat.BULLET.

    line 37
  2. Distinctive:

    Author Identity: Use "Claude" for tracked changes and comments.

    line 40
  3. Distinctive:

    Minimal edits: - Only mark what actually changes in the XML.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DOCX creation, editing, and analysis

Overview

A .docx file is a ZIP archive containing XML files.

Task Quick Start

TaskApproach
Analyze contentpandoc document.docx -o output.md
Convert .docpython scripts/office/soffice.py --convert-to docx document.doc
Create new docUse docx-js. See references/creating.md
Edit existing docUnpack → edit XML → repack. See references/editing.md
Clean changespython scripts/accept_changes.py input.docx output.docx
Convert to PDFpython scripts/office/soffice.py --convert-to pdf document.docx

Reference Materials

To ensure high-quality document manipulation, refer to these detailed guides:

  • Creating Documents: references/creating.md - Full guide for docx-js (JavaScript).
  • Editing Documents: references/editing.md - Detailed workflow for unpacking and editing XML directly.
  • XML Reference: references/editing.md#xml-reference - Patterns for tracked changes, comments, and images.

Critical Rules

For docx-js (Creating)

  • Set page size explicitly - Defaults to A4; use US Letter (12240 x 15840 DXA) for US documents.
  • Tables need dual widths - columnWidths array AND cell width, both must match in DXA.
  • Never use \n or unicode bullets - Use separate Paragraphs and LevelFormat.BULLET.

For XML Editing (Modifying)

  • Author Identity: Use "Claude" for tracked changes and comments.
  • Minimal edits - Only mark what actually changes in the XML.
  • Comment Markers: Siblings of <w:r>, never inside.

Dependencies

  • pandoc: Text extraction
  • docx: npm install -g docx (new documents)
  • LibreOffice: PDF conversion (scripts/office/soffice.py)
  • Poppler: pdftoppm for images

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.