Documents

Gongwen Format

Try it

Format, review, or rewrite Chinese official documents (公文) to the GB/T 9704-2012 党政机关公文格式 standard. The full rulebook is bundled in references/formatting_gui...

What it does

Format, review, or rewrite Chinese official documents (公文) to the GB/T 9704-2012 党政机关公文格式 standard. The full rulebook is bundled in references/formatting_gui...

The skill document

Gongwen Format

Overview

Use this skill to turn a draft into a compliant Chinese official document, or to review an existing document against GB/T 9704-2012 (党政机关公文格式).

Read references/formatting_guidelines.md before making layout decisions. It is the concise rulebook extracted from GB/T 9704-2012 and is the source of truth for this skill.

When To Use

  • Formatting or checking doc / docx / plain-text drafts into standard 公文格式
  • Rewriting notices, reports, requests, replies, letters, meeting minutes, or orders into compliant layout
  • Reviewing whether an existing document matches the national standard
  • Producing a formatting checklist before a human finishes the document in Word/WPS

Workflow

  1. Identify the document type:
    • Standard 公文
    • 信函格式
    • 命令(令)格式
    • 纪要格式
  2. Extract or confirm the core elements:
    • 发文机关
    • 发文字号
    • 标题
    • 主送机关
    • 正文层级
    • 附件说明 / 附件
    • 署名、日期、印章或签发人
    • 抄送、印发机关、印发日期
  3. Apply the layout rules in references/formatting_guidelines.md.
  4. If the source data is incomplete, do not invent factual elements such as 发文字号、密级、签发人、抄送机关. Mark them as missing and continue.
  5. Never drop, truncate, or substitute the source content. Preserve every paragraph and the original title; only change layout, not meaning.
  6. When a .docx is provided and in-place reformatting helps, run scripts/format_gongwen_docx.py to set page/margins/fonts/hierarchy/page numbers, then finish 版头/版记 in Word/WPS.
  7. When direct binary Word editing is not practical, output:
    • a normalized final text structure
    • an explicit formatting checklist for Word/WPS execution (see scripts/gongwen_checklist.py)
    • any unresolved missing metadata

Output Requirements

For review tasks, return:

  • Non-compliant items
  • Correct standard for each item
  • A corrected version or exact revision instruction

For drafting or rewriting tasks, return:

  • The normalized document text in final order
  • The layout instructions needed to reproduce it in Word/WPS
  • Any assumptions you made

Rules To Enforce

  • Prefer explicit user or organization template rules over the generic national standard.
  • If no local rule conflicts, use the requirements in references/formatting_guidelines.md (GB/T 9704-2012).
  • Keep wording formal, concise, and administrative in tone.
  • Preserve factual content; do not silently rewrite policy meaning, drop paragraphs, or replace the title.
  • Ensure the first page contains body text.
  • Use exactly one red separator line, in the 版头 (4 mm below the 发文字号). Do NOT add a red line between the title and the body.

Hierarchy Numbering (层次序号)

Must use the following format (GB/T 9704-2012):

  • Level 1: 一、, 二、, 三、... (中文数字+顿号)
  • Level 2: (一), (二), (三)... (全角括号+中文数字)
  • Level 3: 1., 2., 3.... (阿拉伯数字+英文句点)
  • Level 4: (1), (2), (3)... (全角括号+阿拉伯数字)

Do NOT use Roman numerals (I, II, III) or other formats.

Hierarchy Fonts (层次字体)

  • Level 1: 3号黑体 (Heiti / SimHei)
  • Level 2: 3号楷体 (Kai / KaiTi)
  • Level 3 and 4: 3号仿宋 (Fangsong / FangSong_GB2312)

Page Numbers (页码)

  • Font: 4号半角宋体 Arabic numerals
  • Format: — 1 — (一字线 + 页码 + 一字线)
  • Position: below the core text area bottom edge
  • Alignment: odd pages right-aligned, even pages left-aligned

Bundled Resources

  • references/formatting_guidelines.md: concise rulebook extracted from GB/T 9704-2012
  • scripts/format_gongwen_docx.py: reformats an existing .docx in place — applies A4 page setup, margins (天头 37mm / 订口 28mm), per-level fonts, and — 1 — page numbers. Usage: python scripts/format_gongwen_docx.py input.docx output.docx. It only touches 正文 layout; 版头/版记 are finished in Word/WPS.
  • scripts/read_doc_text.py: extracts plain text from a legacy binary .doc (Word 97-2003), which python-docx cannot read. Requires olefile. Usage: python scripts/read_doc_text.py input.doc [output.txt].
  • scripts/gongwen_checklist.py: prints a checklist for standard, letter, order, or minutes format. Usage: python scripts/gongwen_checklist.py --type standard.

Script dependencies: pip install python-docx olefile (gongwen_checklist.py needs no extra packages).

Related skills

Draft, rewrite, or review Chinese official documents and formal working materials with strict fact boundaries.

61 installs1 stars

Convert uploaded Word documents (.docx) into the fixed Chinese official-document format defined by the bundled government-style template bundle. Use when Cod...

39 installs1 stars

此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体(方正仿宋简体)可以自行下载。

26 installs1 stars

Produce Mandarin Chinese that reads as native-written, in the register, script, and region the audience expects.

114 installs3 stars

WPS Office workflow automation for Chinese documents, spreadsheets, and presentations.

140 installs4 stars

公众号排版|Markdown 转 HTML|排版主题|段落样式 — 公众号一键排版工具,Markdown 文稿转微信后台可粘贴 HTML,多主题、多字号、段落样式切换,所见即所得。面向公众号编辑、独立作者、排版岗。触发词:「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个排版主题」「换个版式」「转 HT...

36 installs1 stars