docx-format

Analyze and standardize DOCX paragraph and table formatting with python-docx.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document formatting is tedious and error-prone when preparing official or academic documents. This Skill automates analysis and standardization of docx files to meet GB/T 9704-2012 public document formatting and academic styles.

Core Features & Use Cases

  • Format analysis: analyze fonts, font sizes, indentation, and line spacing in DOCX documents, including content inside tables.
  • Format standardization: automatically apply official and academic formatting rules to paragraphs, tables, and lists.
  • Markdown to DOCX: convert Markdown files to well-formatted DOCX.
  • Typography handling: ensure correct Chinese/English font pairing using appropriate fonts.
  • Use Case: prepare corporate reports or academic papers to comply with standard templates.

Quick Start

Run uv run --with python-docx python3 .claude/skills/docx-format/scripts/md_to_docx.py input.md output.docx

Frequently Asked Questions about docx-format

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

FAQPage Schema
How do I automate Word document formatting to meet GB/T 9704-2012 standards?

Word document formatting is automated by running a Python script with python-docx that applies official GB/T 9704-2012 formatting rules to paragraphs, tables, and lists. This ensures consistent styles across corporate reports and academic papers.

How do I enforce Chinese and English font separation in a docx file using python-docx?

Chinese and English font separation in a docx file is enforced by processing doc.paragraphs and doc.tables using python-docx and applying qn('w:eastAsia'). This ensures correct typography and font pairing for mixed Chinese and English text.

Can I convert Markdown to a well-formatted DOCX file?

Yes, you can convert Markdown to a well-formatted DOCX file. You run the provided conversion script via uv with the appropriate script path, inputting your Markdown file and outputting a standardized DOCX document.

Does python-docx support analyzing fonts and line spacing inside Word tables?

python-docx supports analyzing fonts, font sizes, indentation, and line spacing inside Word tables. The format analysis feature handles content within tables to ensure standardization across the entire document structure.

What is the best way to standardize academic paper formatting in Word?

The best way to standardize academic paper formatting in Word is to use an automated Python script with python-docx. It applies academic formatting rules directly to paragraphs, tables, and lists, eliminating tedious and error-prone manual adjustments.

Do I need uv to run scripts for Word document automation?

You need uv to run the scripts for Word document automation. The quick start requires running uv with python-docx, executing the script path like uv run --with python-docx python3 script.py to process your documents.