AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

Chinese Official Document Formatter (gongwen-format)

Typesets Word (.docx) files to China's GB/T 9704-2012 official-document standard, and audits or repairs the formatting of existing docx files.

Docs & OfficeIntermediate★ 973⑂ 44AI score 9/10Last updated: Nov 22, 2026

What it does

  • Converts plain-text drafts (.txt/.md/pasted text) into standard-compliant docx in seven layouts: red-header official file, letter, meeting minutes, order/decree, plain header, general material, and bulletin — plus joint issuance, separate-page attachments, and overprinting on pre-printed red-header paper.
  • Generates a dependency-free single-file HTML version for quick preview, browser printing to PDF, or one-click copy.
  • Audits an existing docx against the standard and emits a P0/P1/P2 issue list; light issues (margins, fonts, line spacing, indentation, page numbers) are auto-fixed, structural issues trigger text extraction and a full re-layout.
  • Writes review findings (JSON) into the document as Word comments, and offers a manual WPS/Word checklist when Python is unavailable.
  • Core rule: format only, never rewrite the text — with --keep-text it performs a character-by-character verification before saving.

Who it's for

  • Staff drafting official documents for Chinese party/government bodies, state-owned enterprises, hospitals and universities.
  • Anyone who must submit standard-compliant docx files into an OA approval/archival workflow.
  • Anyone handed a docx with broken formatting that needs to be checked and restored.

Examples

  1. "Format this notice as a red-header document" → builds the layout JSON, runs build_docx.py, outputs 公文/20260216-notice/成稿.docx with an automatic compliance report.
  2. "Check whether this docx follows the standard" → runs check_docx.py --json and returns P0/P1/P2 findings with clause references.
  3. "Don't change a single character, just fix the layout" → runs fix_docx.py --keep-text, saving a separate repaired file while leaving the original untouched.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/duyunzhoudyz/dyz-gongwen-skills/HEAD/skills/gongwen-format/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the skills/gongwen-format folder from the GitHub repo duyunzhoudyz/dyz-gongwen-skills into my ~/.claude/skills/gongwen-format/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/duyunzhoudyz/dyz-gongwen-skills.git && mkdir -p ~/.claude/skills && cp -r dyz-gongwen-skills/skills/gongwen-format ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and move to your working directory.
  2. Clone the repository: git clone https://github.com/duyunzhoudyz/dyz-gongwen-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy this skill in: cp -r dyz-gongwen-skills/skills/gongwen-format ~/.claude/skills/
  5. Install the Python dependency: pip install -U python-docx (version 1.2.0 or newer).
  6. Verify that the required standard fonts are installed: python ~/.claude/skills/gongwen-format/scripts/gw_fonts.py
  7. Restart Claude Code, then ask something like "typeset this draft as an official document" to trigger the skill.
  8. (Optional) Install LibreOffice if you want rendered page-image previews.
View source on GitHub ↗License: NOASSERTION