Skip to content
Agentmart
Submit a tool

docx

Create, read, edit, or manipulate Word documents (.docx files).

Skill by openxjarvis

IndexedMIT★ 67
Write a review

Chalk Labs

Need help deploying docx?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/openxjarvis-docx

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Create, read, edit, or manipulate Word documents (.docx files). Use when user mentions 'Word doc', '.docx', or requests reports, memos, letters, templates with headings/tables/page numbers. Covers: create with python-docx, read via pandoc, edit existing via XML unpack/pack. Do NOT use for PDFs, spreadsheets, or Google Docs.

Use cases: documents, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/docx

What's inside

Skill name
docx
Description
Create, read, edit, or manipulate Word documents (.docx files). Use when user mentions 'Word doc', '.docx', or requests reports, memos, letters, templates with headings/tables/page numbers. Covers: create with python-docx, read via pandoc, edit existing via XML unpack/pack. Do NOT use for PDFs, spreadsheets, or Google Docs.
License
MIT
Instructions
458 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (61)

  • LICENSE.txt
  • SKILL.md
  • __init__.py · scripts/
  • accept_changes.py · scripts/
  • comment.py · scripts/
  • __init__.py · scripts/office/helpers/
  • merge_runs.py · scripts/office/helpers/
  • simplify_redlines.py · scripts/office/helpers/
  • pack.py · scripts/office/
  • dml-chart.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-chartDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-diagram.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-lockedCanvas.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-main.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-picture.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-spreadsheetDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • dml-wordprocessingDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • pml.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-additionalCharacteristics.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-bibliography.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-commonSimpleTypes.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-customXmlDataProperties.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-customXmlSchemaProperties.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-documentPropertiesCustom.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-documentPropertiesExtended.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-documentPropertiesVariantTypes.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-math.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • shared-relationshipReference.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • sml.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • vml-main.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • vml-officeDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • vml-presentationDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • vml-spreadsheetDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • vml-wordprocessingDrawing.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • wml.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • xml.xsd · scripts/office/schemas/ISO-IEC29500-4_2016/
  • opc-contentTypes.xsd · scripts/office/schemas/ecma/fouth-edition/
  • opc-coreProperties.xsd · scripts/office/schemas/ecma/fouth-edition/
  • opc-digSig.xsd · scripts/office/schemas/ecma/fouth-edition/
  • opc-relationships.xsd · scripts/office/schemas/ecma/fouth-edition/
  • mc.xsd · scripts/office/schemas/mce/
  • wml-2010.xsd · scripts/office/schemas/microsoft/
  • wml-2012.xsd · scripts/office/schemas/microsoft/
  • wml-2018.xsd · scripts/office/schemas/microsoft/
  • wml-cex-2018.xsd · scripts/office/schemas/microsoft/
  • wml-cid-2016.xsd · scripts/office/schemas/microsoft/
  • wml-sdtdatahash-2020.xsd · scripts/office/schemas/microsoft/
  • wml-symex-2015.xsd · scripts/office/schemas/microsoft/
  • soffice.py · scripts/office/
  • unpack.py · scripts/office/
  • validate.py · scripts/office/
  • __init__.py · scripts/office/validators/
  • base.py · scripts/office/validators/
  • docx.py · scripts/office/validators/
  • pptx.py · scripts/office/validators/
  • redlining.py · scripts/office/validators/
  • comments.xml · scripts/templates/
  • commentsExtended.xml · scripts/templates/
  • commentsExtensible.xml · scripts/templates/
  • commentsIds.xml · scripts/templates/
  • …and 1 more

SKILL.md (first lines)

# DOCX creation, editing, and analysis

## Overview

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

## Quick Reference

| Task | Approach |
|------|----------|
| Read/analyze content | `pandoc` or unpack for raw XML |
| Create new document | Use `python-docx` — see Creating New Documents below |
| Edit existing document | Unpack → edit XML → repack — see Editing Existing Documents below |

### Converting .doc to .docx

Legacy `.doc` files must be converted before editing:

```bash
python scripts/office/soffice.py --headless --convert-to docx document.doc
```

### Reading Content

```bash
# Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md

# Raw XML access
python scripts/office/unpack.py document.docx unpacked/
```

### Converting to Images

```bash
python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page
```

### Accepting Tracked Changes

To produce a clean document with all tracked changes accepted (requires LibreOffice):

```bash
python scripts/accept_changes.py input.docx output.docx
```

---

## Creating New Documents

Use `python-docx` to generate .docx files programmatically. Install: `uv pip install python-docx`

### Setup

```python
from docx import Document
from docx.shared import Inches, Pt, RGBColor, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT
from docx.oxml.ns import qn

doc = Document()
doc.save("output.docx")
```

### Validation

After creating, validate with:

```bash
python scripts/office/validate.py output.docx
```

If validation fails, unpack, fix the XML, and repack.

### Page Size

```python
from docx.shared import Inches
from docx.oxml import OxmlElement

section = doc.sections[0]
section.page_width  = Inches(8.5)   # US Letter
section.page_height = Inches(11)
section.left_margin = section.right_margin = Inches(1)
section.top_margin  = section.bottom_margin = Inches(1)
```

**Common page sizes:**

| Paper | Width | Height |
|-------|-------|--------|
| US Letter | 8.5" | 11" |
| A4 | 8.27" | 11.69" |

**Landscape:**

```python
from docx.enum.section import WD_ORIENT
section.orientation = WD_ORIENT.LANDSCAPE
section.page_width, section.page_height = section.page_height, section.page_width
```

### Headings & Paragraphs

```python
doc.add_heading("Document Title", level=0)   # Title style
doc.add_heading("Chapter 1", level=1)        # Heading 1
doc.add_heading("Section 1.1", level=2)      # Heading 2

p = doc.add_paragraph("Body text here.")
p.alignment = WD_ALIGN_PARAGRAPH.LEFT

# Page break
doc.add_page_break()
```

### Text Formatting (Runs)

From openxjarvis/openclaw-python, MIT.

Signals

Stars
67
Forks
23
Open issues
2
Last commit (this folder)
Mar 6, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from openxjarvis

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get docx running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying docx?

CallGet help
Cite this page

docx skill. Agent Mart. https://agentmart.dev/skills/openxjarvis-docx (last updated 2026-10-24)