Official Document Formatting Skill: Generate Standard Word Documents per GB/T 9704-2012

Introduction

Official documents are often initially drafted in Markdown, plain text, or non-standard Word formats, requiring manual adjustments to fonts, line spacing, headers, and signature blocks. This process is time-consuming and prone to deviations from national standards. Manually cross-referencing the “Format for Official Documents of Party and Government Organs” item by item is also unfriendly to colleagues in non-typesetting roles. The following introduces the “Official Document Formatting” Skill on SkillHub: it converts existing text into .docx files compliant with GB/T 9704-2012 within Agent conversations, reducing repetitive typesetting labor.

What is this

“Official Document Formatting” is a community Skill on SkillHub, located at @user_2ecc1bb2/gongwenformat-pro. The current version is 1.4.0, categorized under office-efficiency, and published by user_2ecc1bb2 (the author is listed as Matt on the SkillHub page). It targets the scenario of Party and government official documents. Based on GB/T 9704-2012, it converts Markdown, TXT, and DOCX text into Word documents that comply with national standard typesetting. The Skill metadata indicates requires_api_key=false, meaning it does not depend on additional API Keys.

Official Entry Points:

  • API Coordinate Page: https://api.skillhub.cn/user_2ecc1bb2/gongwenformat-pro
  • SkillHub Display Page: https://www.skillhub.cn/skills/user_2ecc1bb2/gongwenformat-pro

Core Features

The verified capabilities are as follows, sourced from the official introduction and the SkillHub page:

  1. National Standard Typesetting: Processes layout according to GB/T 9704-2012, covering scenarios related to official document elements such as letterheads, document numbers, and signature blocks.
  2. Multi-format Input: Accepts Markdown, TXT, and DOCX as source content.
  3. Word Output: Generates docx files meeting “standard format” requirements, suitable for document types such as notices, requests for instructions, reports, letters, meeting minutes, speeches, and discussion/reporting materials (the Skill lists the above scenarios in its trigger words).
  4. Reformatting and Non-standard Documents: Suitable for cases where “the content is already written, just need a formal file,” or when users provide TXT or non-standardly formatted Word documents that require reformatting.
  5. Agent Trigger: When keywords or similar requirements such as official document formatting, generate docx, letterhead document, GB/T 9704, or convert to Word appear in the conversation, the Agent should activate this Skill (the trigger word list is based on the SkillHub introduction).

SkillHub Statistics (Page Scraping): Rating 100000, Downloads 129519, Installs 239 (values may change with platform updates).

Installation and Activation

The Skill follows the standard SKILL.md format and is installed into the current Agent’s skills directory via the SkillHub CLI. If installed in the wrong directory, the Agent cannot recognize it, so the path must be selected according to the environment.

1. Install SkillHub CLI (if not already installed)

command -v skillhub && skillhub --version

If not installed, you can execute the official installation script (full installation includes CLI and default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

CLI Only:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

For installation and priority source strategy instructions, see: https://skillhub.cn/install/skillhub.md.

2. Install “Official Document Formatting” to the corresponding Agent directory

When installing, you must use --dir to point to the current Agent’s skills directory. Common paths (from SkillHub installation documentation):

Agent / Client skills Directory
Cursor ~/.cursor/skills/
Claude Code ~/.claude/skills/
Codex ~/.codex/skills/ or .agents/skills/ under the project
Windsurf ~/.codeium/windsurf/skills/ or .windsurf/skills/

Example (replace <skills directory> with the corresponding path from the table above):

skillhub install user_2ecc1bb2/gongwenformat-pro --dir <skills directory>

Alternatively, you can ask the AI to install it according to SkillHub instructions during the conversation. The official prompt provided is: Install @user_2ecc1bb2/gongwenformat-pro according to https://skillhub.cn/install/skillhub.md.

3. After Activation

After installing to the correct directory, restart or refresh skill loading according to the specific Agent’s requirements. Subsequently, when you propose official document formatting requests in the conversation, the Skill will guide the process. The differences between Cursor, Codex CLI, and Claude Code mainly lie in the skills directory location; the installation command format is the same. No separate configuration options for this Skill on various clients were found.

Typical Usage

The official documentation does not provide standalone CLI subcommand examples. Usage primarily relies on Agent + Skill instructions. The reproducible workflow is as follows:

  1. Confirm the Skill is installed in the current Agent’s skills directory (see the previous section).
  2. State your requirement in the conversation and include one of the trigger scenarios from the Skill introduction, such as: “Format the following content into Word according to official document standards” or “This is the body of a request for instructions, please generate a docx compliant with GB/T 9704.”
  3. Provide the content: Paste Markdown / plain text, or upload TXT or DOCX. If it is a non-standard Word file, specify that it needs reformatting according to national standards.
  4. Supplement header elements (such as agency name, document number, signature block, etc.) according to the Agent and Skill instructions. If the Skill requires structured fields, refer to the explanations in SKILL.md.
  5. Obtain the generated .docx and perform a visual check in local Word before finalizing.

The above steps are consistent with the descriptions “generate a formal file after writing content” and “reformat TXT or non-standard Word” in the SkillHub introduction. Specific typesetting scripts and field rules should be based on the SKILL.md within the installation package; implementation details not captured in this article are not expanded upon here.

Applicable Scenarios and Notes

Who is it for

  • Office workers who frequently produce government official documents and political materials and want to reduce manual layout adjustments.
  • Colleagues already using Agents in environments like Cursor, Claude Code, and Codex who wish to accomplish “write to Word / generate docx” via natural language.

Usage Notes

  • National standard typesetting involves elements such as headers, body text, and signature blocks. If the source draft lacks information, the Agent may ask you to supplement the letterhead, document number, etc. It is recommended to review against your organization’s template and GB/T 9704-2012 in Word before finalizing.
  • Input formats are limited to Markdown, TXT, and DOCX; other formats must be converted or pasted as text first.
  • No API Key is required, but it relies on SkillHub installation and the Agent’s recognition of the skills directory; an incorrect installation path is the most common reason for the “Skill not taking effect.”
  • Community source (community), version 1.4.0; upgrades can be performed via skillhub for this coordinate (specific subcommands are subject to SkillHub CLI help).

Conclusion

“Official Document Formatting” integrates GB/T 9704-2012 typesetting capabilities into the Agent workflow: multi-format text input, standard Word output, covering a range of common trigger scenarios from drafting to reformatting. If you are looking for a skill related to government official documents on SkillHub or Cursor, you can view the introduction and installation tips on the official page: https://www.skillhub.cn/skills/user_2ecc1bb2/gongwenformat-pro.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye