docx
/docx
Create and edit Word documents (.docx): headings, styled paragraphs, tables, images, headers/footers, and page formatting. Use whenever the user asks to write, format, or modify a Word/.docx document.
- Author
- phuetz ↗
- Repository
- code-buddy ↗
- Licence
- Apache-2.0
- Last repository change
- 12.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Create and edit Word documents (.docx): headings, styled paragraphs, tables, images, headers/footers, and page formatting. Use whenever the user asks to write, format, or modify a Word/.docx document.
Original author description
Create and edit Word documents (.docx): headings, styled paragraphs, tables, images, headers/footers, and page formatting. Use whenever the user asks to write, format, or modify a Word/.docx document.
How it works
- Workflow
- Quality conventions
- Example
- Reading / editing existing files
SKILL.md preview
---
name: docx
description: "Create and edit Word documents (.docx): headings, styled paragraphs, tables, images, headers/footers, and page formatting. Use whenever the user asks to write, format, or modify a Word/.docx document."
license: MIT (Code Buddy original skill)
nativeEngine:
triggers:
- word document
- docx
- word doc
- .docx
- write a document
- report document
---
# Create & edit Word documents with python-docx
Build real `.docx` files with the open-source **python-docx** library
(`python3 -c "import docx"`). Work in visible steps; verify before reporting done.
## Workflow
1. **Outline** the document: title, sections (headings), body, tables, images.
2. **Write a Python script** (heredoc via the `bash` tool) that assembles the
document with python-docx and saves it.
3. **Verify**: reopen with `Document(path)` and assert key paragraphs/headings
exist; `print(path)`.
4. **Report** the saved path + a one-line summary.
## Quality conventions
- Use real heading styles (`doc.add_heading('Title', level=0)`, `level=1/2`) so the
document has a proper outline — not just bold text.
- Tables: `doc.add_table(rows, cols, style='Light Grid Accent 1')`; bold the header row.
- Embed images with `doc.add_picture(path, width=Inches(5))`; add a caption paragraph.
- Set page size/margins via `doc.sections[0]` when the user specifies them.
- Keep styling consistent; when editing an existing file, match its conventions.
## Example
```bash
python3 - <<'PY'
from docx import Document
from docx.shared import Pt, Inches
doc = Document()
doc.add_heading('Q2 Robotics Budget', level=0)
doc.add_heading('Overview', level=1)
doc.add_paragraph('Funding target: 120k EUR — status: on track.')
doc.add_heading('Line items', level=1)
t = doc.add_table(rows=1, cols=3); t.style = 'Light Grid Accent 1'
hdr = t.rows[0].cells
for i, h in enumerate(['Item', 'Cost', 'Status']):
hdr[i].text = h; hdr[i].paragraphs[0].runs[0].font.bold = True
for item, cost, status in [('Actuators', '8000', 'ordered'), ('Compute', '3500', 'done')]:
c = t.add_row().cells; c[0].text = item; c[1].text = cost; c[2].text = status
doc.save('report.docx')
assert Document('report.docx').paragraphs[0].text == 'Q2 Robotics Budget'
print('report.docx')
PY
```
## Reading / editing existing files
- Read text: iterate `Document(path).paragraphs` / `.tables`, or `python3 -m markitdown file.docx` if available.
- Edit in place: load, modify runs/paragraphs/tables, `save()` back; preserve tracked
changes and comments where present.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · phuetz/code-buddy | 100 | Apache-2.0 |
| rongxinzy/rongxinai | 100 | AGPL-3.0 |
| mateaix/mateclaw | 100 | Apache-2.0 |
| neromtoobad/creator-skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| okou-ai/okou-skills | 100 | MIT |
| openbmb/pilotdeck | 100 | AGPL-3.0 |
| wrongstack/wrongstack | 100 | MIT |
| asgeirtj/system_prompts_leaks | 100 | CC0-1.0 |
Database snapshot: 13.11.2026 · package version 7f2f732e4711 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100doc-skill-docx
Creates and edits Word documents with python-docx: styles, tables, headers, footers, track-changes-safe edits. Use when the user asks for docx document skill work, or mentions doc, skill, docx. - 100docx-generator
Create, read, and edit Word (.docx) files - styles, tables, images, headers, and templates - using python-docx. Use whenever a deliverable must be a Word document. - 100zepi-docx
Read and edit Word documents with python-docx on the bundled runtime — styles, numbering, tables, headers and footers, page breaks, images, find-and-replace across runs, and merging documents. Use for any task whose input or output is a .docx file, including extracting text or… - 100word-document
Word (.docx) manipulation via MCP server. Use for reading, creating, editing, formatting Word documents including tables, footnotes, comments, images, headers, styles, and PDF conversion. - 100documents
Create, read, edit, review, comment on, sanitize, render, and validate Microsoft Word DOCX documents. Use whenever a DOCX or Word document is a primary input or deliverable, including reports, proposals, forms, templates, tracked revisions, comments, tables, images, headers,… - 100docx-pro
Professional Word (.docx) document generation, faithful text replacement, Markdown round-trip conversion, document inspection, TOC insertion and watermarking. Use when the user asks to create rich-formatted Word documents (cover page, TOC, multi-level headings, styled tables…