doc

Edit and format DOCX documents while preserving layout fidelity.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Read, create, and edit DOCX documents while preserving layout fidelity across sections, styles, and formatting.

Core Features & Use Cases

  • Read and review DOCX content with accurate layout preservation.
  • Create and edit documents using structured styles, headings, and lists.
  • Render previews to PDF/PNG using the bundled rendering helper and external tools.

Quick Start

Run the bundled helper with a DOCX file, for example python3 scripts/render_docx.py your-file.docx --output_dir /tmp/doc_pages, and review the generated images.

Frequently Asked Questions about doc

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

FAQPage Schema
How do I edit and format DOCX documents while preserving layout fidelity?

You can edit and format DOCX documents with layout fidelity by using python-docx for structured styling and a bundled rendering helper to verify typography and consistent section formatting.

How do I render a DOCX file to PDF or PNG for preview?

To render a DOCX file to PDF or PNG, run the bundled render_docx.py helper script, which uses LibreOffice's soffice for PDF conversion and pdf2image to generate preview images for verification.

Can I use python-docx to create documents with structured headings and lists?

Yes, python-docx supports creating and editing documents with structured styles, headings, and lists to maintain consistent styling and precise typography across professional workflows.

What dependencies do I need to render DOCX previews to images?

Rendering DOCX previews to images requires the pdf2image dependency for image conversion, LibreOffice's soffice for PDF generation, and python-docx for the initial document edits.

Why does my DOCX formatting break when rendering to PDF?

DOCX formatting may break during PDF rendering if styles are not applied consistently; using structured styles with python-docx and verifying output with the bundled render_docx.py helper ensures layout preservation.

Is there a way to review DOCX content with accurate layout preservation?

You can review DOCX content with accurate layout preservation by reading the file with python-docx and rendering previews to PDF or PNG using the bundled helper to visually verify formatting.