Skip to main content
skill

doc — Claude Code skill: edit .docx and check the layout

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

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill document-processing/doc
Open on GitHub

What doc 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.

What it helps with

  • 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 for the agent

  • 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

How to install doc

1claude-code-templates

npx claude-code-templates@latest --skill document-processing/doc

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill doc -a claude-code

3Manually: put the files in place

~/.claude/skills/doc/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/doc/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about doc

How do I install doc in Claude?

Through the templates: npx claude-code-templates@latest --skill document-processing/doc. Or with the skills manager: npx skills add davila7/claude-code-templates --skill doc -a claude-code.

What does the doc skill do?

It reads and edits .docx files with python-docx, then renders the pages after changes to check the layout. When rendering is not possible, it extracts the text and warns about layout risk.

What is needed to render pages?

Either soffice and pdftoppm, or scripts/render_docx.py with pdf2image and Poppler. Without them the visual check does not happen.

Similar skills

Everything for Office documents →

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor