# doc

A skill for reading, creating and editing .docx files when layout matters — tables, page breaks, fonts. Useful when the document goes to a client.

- skill · `type=skill` · Claude Code · 99 installs
- Author: openai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/document-processing/doc
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/doc

## What it does

The skill handles `.docx` work through `python-docx`: headings, styles, tables, lists. Edits stay structured instead of hand-patching XML.

Visual review is the point. With `soffice` and `pdftoppm` available, the document goes DOCX to PDF to PNG. The other route is the bundled `scripts/render_docx.py`, which needs `pdf2image` and Poppler. Every meaningful change gets re-rendered and the pages inspected. If neither tool is there, the skill extracts text with `python-docx` and flags the layout risk instead of pretending it checked.

Intermediate files live in `tmp/docs/`, final artifacts in `output/doc/`. No environment variables are required. Python packages install with `uv pip install python-docx pdf2image`; system tools with `brew install libreoffice poppler` on macOS or `sudo apt-get install -y libreoffice poppler-utils` on Ubuntu/Debian. When installation is not possible in the current environment, the skill names the missing dependency and how to get it locally.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill document-processing/doc
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill doc -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/doc/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/doc/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/doc/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/doc/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates doc
```

2. **Manually: put the files in place**
- File: `.github/skills/doc/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/document-processing/doc
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/doc/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/document-processing/doc

## When to use it
- read a `.docx` with tables and see how it is laid out
- build a document with headings and styles via `python-docx`
- render pages and catch overlapping text
- check pagination before sending a file to a client
- extract text when rendering is unavailable

## Example prompts
- read `report.docx` and tell me if the table breaks on page two
- add a second-level heading section to `contract.docx` and re-render the pages
- render `output/doc/final.docx` to PNG and check the margins

## Similar
- [doc-to-markdown](https://affpapa.org/en/nevibecode/skills/doc-to-markdown.md) — skill · 872 installs
- [docx-manipulation](https://affpapa.org/en/nevibecode/skills/docx-manipulation.md) — skill · 6100 installs
- [docx](https://affpapa.org/en/nevibecode/skills/nous-research-docx.md) — skill · 306 installs
- [minimax-docx](https://affpapa.org/en/nevibecode/skills/nexu-io-minimax-docx.md) — skill · 2700 installs
- [pdf](https://affpapa.org/en/nevibecode/skills/shareai-lab-pdf.md) — skill · ★ 79238
- [nutrient-document-processing](https://affpapa.org/en/nevibecode/skills/nutrient-document-processing.md) — skill · 4500 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 224 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
