doc

Create, edit, and visually validate DOCX documents using python-docx and LibreOffice rendering.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill doc-jamsdoescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc
Source: https://github.com/jamsdoescode/Erik-s-Portfolio/tree/main/openclicky/AppResources/OpenClicky/OpenClickyBundledSkills/doc
Command: npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill doc-jamsdoescode

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, pdf2image, and includes scripts (resource) components.

What problem does it solve? Editing DOCX files blindly often produces broken tables, clipped text, and inconsistent formatting that only appears after delivery. This Skill adds a render-and-inspect loop so every document change is visually verified before it reaches the user. ## Core Features & Use Cases - Structured DOCX Editing: Create and modify headings, styles, tables, and lists programmatically with python-docx. - Visual Layout Validation: Convert DOCX to PDF and PNG pages via LibreOffice and Poppler, or the bundled render_docx.py script, to inspect layout at full fidelity. - Quality Enforcement: Catch formatting defects like overlapping text, broken tables, and Unicode dash issues before final delivery. - Use Case: When asked to produce a client-ready report in Word format, draft it with python-docx, render every page to images, fix spacing or pagination issues, and deliver a polished document. ## Quick Start Use the doc skill to create a formatted DOCX report and render each page to images so you can verify the layout before delivery.

Frequently Asked Questions about doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render a DOCX file to images in Python?

Convert the DOCX to PDF with LibreOffice headless mode, then rasterize the PDF to PNGs with pdftoppm or pdf2image. The bundled render_docx.py script automates both steps and computes DPI from the document page size.

How to create and edit Word documents with python-docx?

Use python-docx to build headings, apply styles, insert tables, and manage lists programmatically. After each meaningful change, re-render the document and inspect the pages to confirm the layout remains intact.

What tools are needed to convert DOCX to PDF?

LibreOffice provides the soffice command for headless DOCX-to-PDF conversion, and Poppler supplies pdftoppm for PDF-to-PNG rasterization. Install them via Homebrew on macOS or apt on Ubuntu, plus the pdf2image Python package.

Why does DOCX rendering fail with LibreOffice?

Rendering fails when soffice or pdftoppm are missing from the system PATH, or when the LibreOffice profile is locked by concurrent runs. The script uses unique temporary profiles and falls back to an ODT intermediate conversion if direct PDF export fails.

Can I edit DOCX files without visual rendering tools?

Yes, python-docx can extract and edit text without LibreOffice or Poppler installed. However, layout risks like broken tables or pagination issues cannot be detected, so the user should review rendered pages locally.