AI Agent Hub
Back to skills
One-Click Word Document Formatting icon

One-Click Word Document Formatting

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Follow https://skillhub.cn/install/skillhub.md to install @user_aa5417ee/word-wdpb into your AI assistant.

About this skill

The Problem

Writing official Word documents often means rechecking A4 margins, heading fonts, fixed line spacing, signature placement, and page-number format by hand. Automatic numbering, orphan-control, hidden paragraph marks, and stray blanks can also reduce delivery quality. This skill turns manual formatting into a repeatable document-rebuild workflow.

How It Works

  • Reads the source document: parses word/document.xml inside a .docx file to extract all paragraph text, without depending on the Word app.
  • Detects structure: classifies main title, 一、, (一), 1., (1), , and A. headings, and identifies right-aligned company names and dates.
  • Rebuilds OOXML: uses Python with lxml to generate a new .docx with A4 settings, a size-2 main title, Fangsong size-3 body text, 27-pt fixed line spacing, indentation, and —1— footer page numbers.
  • Cleans formatting: disables automatic numbering and orphan-control, and removes extra, blank, or hidden paragraph marks to reduce template residue.
  • Validates output: reopens the generated package to check fonts, sizes, spacing, indentation, signature-date left indent, and page-number format.

Boundaries

This skill is aimed at Chinese official-document formatting and writes the result to C:\Users\Administrator\Desktop\ by default. If the source is not an official document, or if you need to preserve company templates, complex tables, image captions, footnotes, or font-fallback behavior, verify the output item by item and adjust the source or acceptance criteria when needed.

Use Cases

  • Reformat draft docx to official A4 and fixed 27 pt spacing.
  • Set right-aligned signature date with 3-character indent.
  • Remove auto-numbering, orphan control, and hidden marks.
  • Create footer pages as -1- in centered size-4 Fangsong.

Best For

  • Administrative writer: turns draft memos into formatted Word deliverables.
  • Project assistant: checks headings, spacing, signature, and page numbers before submission.
  • IT operations staff: audits auto-numbering, hidden marks, and template residue.
  • Python engineer: builds standardized OOXML Word files with lxml.