AI Agent Hub
Back to skills
Chinese Official Document Workbench icon

Chinese Official Document Workbench

Content Creation Updated 2026.08.30

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

Please install @user_6113fd9f/party-gov-docx in your AI assistant according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

Chinese official documents are not just styled DOCX files. Notices, reports, requests, and letters used by party organs, government agencies, enterprises, and institutions may need a header, document number, body, signature block, seal position, page number, and version record to be usable for formal distribution. Hand-made DOCX often fails on 22 lines x 28 characters, two blank lines from the red line to the title, four-character right offset for the date, odd-right/even-left page numbers, or version-record rules. Reformatting an existing file can also alter body text, footnotes, comments, images, or hyperlinks.

How It Works

The skill targets formal Chinese official writing and separates content, layout parameters, and delivery checks. generate_official_document.py creates a DOCX from structured fields such as issuer, title, and body; repair_official_document.py validates the original hash, issue codes, and content preservation before saving a reflowed version; audit_gov_docx.py --strict performs static OOXML review and returns non-zero on ERROR or WARNING.

Key constraints include:
- Layout selection: header_style distinguishes party from administrative style, and seal_mode distinguishes stamped from unstamped output.
- Execution order: run --dry-run first, then generate in staging and audit; publish only when ERROR=0 and WARNING=0.
- Rule source: prioritize the original GB/T 9704—2012 text, then use Word implementation parameters for layout details.
- Delivery checks: A4, 156 mm x 225 mm text area, 22 lines x 28 characters per page, 29.6 pt fixed line spacing, 4-size half-width Song page numbers, and version-record separators are all hard checks.

Boundaries

It does not create English documents, marketing copy, or technical documentation. It does not forge real seals, and it does not judge secrecy level, signing authority, or legal validity. Passing static review still requires page-by-page verification by exporting PDF in Microsoft Word or the target office environment; STATIC_READY_VISUAL_PENDING is not final delivery.

Use Cases

  • Draft a notice DOCX from only a title and body before formal distribution.
  • Reflow an old request DOCX while preserving body text, footnotes, and comments.
  • Audit a letter's header, page number, and version record against GB/T 9704.
  • Decide whether a material should use party or administrative header style.

Best For

  • Party or government secretarial staff: produce compliant notices, reports, and requests as DOCX.
  • Corporate general-affairs staff: reformat existing materials into official documents and review layout issues.
  • Document reviewers: quickly locate errors in headers, page numbers, and version records.
  • Python document tooling maintainers: call generation, repair, and audit scripts for regression work.