Productivity
doc avatar

doc

A professional tool for reading, creating, and editing .docx documents with precise layout control, using python-docx and automated visual rendering checks.

Introduction

The doc skill is designed for high-fidelity document management, specifically targeting .docx files where visual integrity, pagination, and structural layout are critical. It acts as an expert assistant for professional documentation, providing a robust workflow to bridge the gap between structured programmatic editing and visual quality assurance. By integrating python-docx for robust file manipulation with automated rendering pipelines using libreoffice and poppler-utils, it ensures that your document remains consistent across edits, avoiding common pitfalls like table breakage or margin misalignment.

  • Perform granular editing on existing Word documents, including headers, styles, tables, and lists while maintaining document integrity.

  • Create professional-grade reports or documents from scratch using programmatic styling and structured formatting.

  • Automate visual verification through PDF conversion and PNG generation, enabling precise layout validation before final delivery.

  • Support complex document workflows such as pagination checks, font consistency, and graphic alignment through iterative re-rendering cycles.

  • Manage complex document structures without sacrificing readability or professional appearance.

  • The skill requires system dependencies like libreoffice and poppler to function; if unavailable, it will guide the user to install them or suggest local review.

  • Standard workflows assume a temporary directory (tmp/docs/) for processing and output directories (output/doc/) for finalized artifacts to keep the workspace clean.

  • Designed for power users, developers, and writers who need to automate document creation or updates while adhering to strict visual requirements.

  • Best practices include avoiding non-standard Unicode characters like U+2011 to maintain compatibility across platforms.

  • Ensure all charts, tables, and images are verified via the bundled render_docx.py script to catch layout defects like clipped text or overlapping elements before finalizing the output.

Repository Stats

Stars
4,439
Forks
1,203
Open Issues
7
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 02:08 PM
View on GitHub