documents

Convert DOCX files to PNG images via LibreOffice headless for visual inspection.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/yige666s/claude-codex --skill documents-yige666s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: documents
Source: https://github.com/yige666s/claude-codex/tree/main/.claude/skills/documents
Command: npx skills add https://github.com/yige666s/claude-codex --skill documents-yige666s

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Creating professional Word documents programmatically often results in layout defects, broken styling, or rendering inconsistencies that only become visible after delivery. This Skill enforces a strict render-and-verify workflow so documents are visually flawless before reaching the user.

Core Features & Use Cases

  • Document Creation and Editing: Build new documents or modify existing ones using deterministic helpers and OOXML patching for tracked changes, comments, tables, and content controls.
  • Visual QA Pipeline: Render every DOCX to PNG page images using LibreOffice headless, inspect layout at full zoom, and iterate until spacing, typography, tables, and headers are perfect.
  • Google Docs Integration: Sanitize and import documents to native Google Docs format with title-border cleanup and style matching.
  • Use Case: A product manager needs a formatted decision memo with tracked changes reviewed, comments stripped, and a table of contents. This Skill handles the full lifecycle from creation through accessibility audit to final clean deliverable.

Quick Start

Use the documents skill to create a formatted decision memo from the provided outline, render it to PNGs for visual QA, and deliver the final polished document file.

Frequently Asked Questions about documents

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

FAQPage Schema
How do I automate DOCX creation and verify the visual layout before delivery?

A render-and-verify pipeline for DOCX creation converts Word documents to PNG page images via LibreOffice headless. It enforces iterative layout correction until visual quality gates pass, ensuring documents are flawless before delivery.

What is deterministic OOXML patching for Word documents?

Deterministic OOXML patching modifies Word documents programmatically at the XML level. It applies precise changes for tracked changes, comments, tables, and content controls without relying on unpredictable rendering engines, ensuring exact document modifications.

How do I programmatically accept tracked changes and strip comments in a docx file?

To accept tracked changes and strip comments in a docx file, apply deterministic OOXML patching to the document structure. This process handles tracked-change acceptance and comment removal directly within the document XML for a clean final deliverable.

Do I need LibreOffice to run visual QA on Word documents in a containerized environment?

Yes, you need LibreOffice headless to run visual QA on Word documents in a containerized agent runtime. It renders DOCX files to PNG page images, which are required for full-zoom visual inspection to validate spacing, typography, and table geometry.

What is the best way to import Google Docs to native format with style matching?

The best way to import Google Docs to native format with style matching is to sanitize the document first. This workflow cleans up title borders and matches styles to ensure the imported native Google Docs format maintains consistent formatting.

Why does my programmatically generated Word document have broken styling and table geometry issues?

Programmatically generated Word documents often have broken styling and table geometry issues due to rendering inconsistencies. A visual QA pipeline that renders DOCX to PNG images and iteratively corrects layout prevents these defects from becoming visible after delivery.