doc

Read, create, and edit DOCX documents while preserving formatting with python-docx.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/devkeni/Skills --skill doc-devkeni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc
Source: https://github.com/devkeni/Skills/tree/main/data-documents/doc
Command: npx skills add https://github.com/devkeni/Skills --skill doc-devkeni

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you read, create, and edit DOCX documents without losing layout fidelity, making it ideal for professional reports and templates.

Core Features & Use Cases

  • Read DOCX files to extract content and structure for review.
  • Edit and re-format documents using python-docx while preserving headings, tables, and styles.
  • Render previews of changes using the bundled scripts/render_docx.py to verify layout before delivery.

Quick Start

Provide a DOCX file to the skill and request a layout-preserving render.

Frequently Asked Questions about doc

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

FAQPage Schema
How do I edit a DOCX file while preserving headings and tables?

To edit a DOCX file while preserving formatting, use python-docx to read and modify document structure. This approach ensures headings, tables, and styles remain consistent by manipulating document elements directly without stripping layout.

Can I render a preview of a DOCX document to verify layout before delivery?

Yes, you can render a DOCX preview to verify layout. The Skill uses a bundled script, scripts/render_docx.py, which requires no external prompts and outputs a visual preview to check that formatting remains intact.

Does this DOCX editing approach work for drafting contracts and reports?

Yes, this DOCX editing approach works for drafting contracts, reports, and templates. It preserves formatting fidelity across headings, tables, and styles, making it suitable for professional documents where layout consistency is critical.

Do I need pdf2image installed to render DOCX previews?

Yes, pdf2image is required as a dependency to render DOCX previews. The rendering process relies on this library to generate visual output, so ensure it is installed in your environment before executing the preview script.

What is the best way to extract content and structure from a DOCX file for review?

The best way to extract content and structure from a DOCX file is using python-docx to read document elements. This approach captures headings, paragraphs, and tables programmatically, allowing you to review the document's layout and content without losing formatting.

Can I use python-docx to re-format Word documents without losing styles?

Yes, you can use python-docx to re-format Word documents without losing styles. This Skill applies edits through python-docx while preserving existing headings, tables, and style definitions, ensuring the document maintains its original layout fidelity.