AI Agent Hub
Back to skills
📁

Official Document Formatter

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_8d26dabd/qclaw-doc-formatter into your AI assistant.

About this skill

The Problem

Formatting official documents and reports often stalls on small details: red headers, fonts, line spacing, page numbers, attachments on a separate page, and signature indentation. This skill works on already-written document content and turns GB/T 9704-2012 requirements into an executable checklist, then produces a reviewable docx file. It does not rely on cloud rendering; its focus is on enforcing formatting rules through locally verifiable document properties.

How It Works

It follows a three-step workflow:
- Extract requirements: parse the formatting guide for page setup, fonts, header, body, page numbers, and common pitfalls, then generate an execution checklist.
- Build step by step: use python-docx to write the red header, title, body hierarchy, line spacing, page-number fields, and attachment rules; if a font or pandoc is missing, it degrades to txt / md and says so explicitly.
- Verify strictly: a validation script checks Word-rendering-relevant properties, such as first-line indent, red separator line, w:fldSimple PAGE fields, and attachment page breaks, and returns to the build step on failure.

Boundaries

It is intended for formatting normalization and demo generation, not for drafting official content. Built-in samples only demonstrate the red-header, title, and signature structure. Formal external documents still need to be checked against the issuing unit's own rules. For document QA or journal-level re-layout, route to the corresponding skill.

Use Cases

  • Format a finished notice draft as a red-header DOCX and verify fonts, line spacing, and page-number fields.
  • Reorganize a report draft’s heading hierarchy and produce a reviewable table of contents with body styles.
  • Convert an implementation plan into a standard official DOCX before submission, checking separate attachments and signature date indents.
  • After the formatting guide changes, reformat an old red-header document and export a verification report for audit.

Best For

  • Agency or public-institution clerks who need to format notice and report drafts into GB/T 9704-2012 compliant DOCX files.
  • Government affairs specialists who must check red headers, separate attachments, page numbers, and signature indentation before submission.
  • Content editors who need to organize an existing report into a heading hierarchy and a reviewable table of contents.
  • Local scripting engineers who want to build and verify official document styles with python-docx instead of editing raw XML.