AI Agent Hub
Back to skills
Official Document Formatting Assistant icon

Official Document Formatting Assistant

Office Efficiency Updated 2026.08.30

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

Please follow https://skillhub.cn/install/skillhub.md to install @user_0436b842/ai-text-formatter.

About this skill

The problem

Drafts often live in Markdown, plain text, or ad hoc notes. Converting them into official Word documents normally means manually adjusting heading levels, fonts, type sizes, line spacing, margins, and page numbers. This skill targets that mechanical but error-prone step and formats text into a .docx file aligned with GB/T 9704-2012.

How it works

  • Accepts message text, attached .md / .txt files, or pasted content; stops and asks for content when empty.
  • Detects headings and body text, normalizes nonstandard numbering such as 1、, , and 1), and repairs incomplete structures where possible.
  • Applies official layout settings: A4 page, margins, fonts, type sizes, fixed line spacing, zero paragraph spacing, first-line indentation, and page-number formatting.
  • Derives the file name from the document title when present, sanitizes illegal characters, and falls back to a timestamp if the title is missing; output usually lands on the desktop.
  • Uses python-docx and can install it when missing; code blocks, image Markdown, and other non-document content are removed or demoted to body text.

Boundaries

It is suited to producing a structured official-document draft, not replacing formal issuance review. If 方正小标宋简体 is absent, Word may substitute a nearby font. Documents with skipped heading levels, broken tables, or heavy image reliance should be treated as first drafts and checked manually.

Use Cases

  • Convert a Markdown proposal draft into a reviewable Word official-document first draft with headings and page numbers.
  • Turn pasted meeting notes into an officially formatted document with three-level headings and indented body text.
  • Render a `.md` work-plan attachment as an A4 GB/T 9704-2012 layout and name the `.docx` after the title.
  • Clean a notice containing code blocks and nonstandard numbering, then output a desktop `.docx` body document.

Best For

  • Administrative drafting staff who turn annotated official drafts into standard GB/T 9704-2012 Word layouts.
  • Engineering leads who need Markdown project plans converted to review-ready official Word documents.
  • Operations coordinators who publish notices and need multi-level numbering cleaned into printable official files.
  • Compliance assistants who archive policy text with clear heading levels, page numbers, and `.docx` output.