Official Document Formatting Assistant: Generate Word Documents Compliant with GB/T 9704-2012

Preface

Materials that government agencies, enterprises, and public institutions need to submit daily are often drafted first in chat windows, email bodies, or various editors. Afterward, Word styles are manually applied. If heading levels, body font sizes, margins, or page number positions do not align with national standards, formatting must be repeatedly adjusted. The following introduces a Skill that triggers via natural language within an Agent, automatically cleans up, and exports .docx files. It hands over the “structure recognition + national standard typesetting” to the Skill execution, rather than manually clicking the format brush paragraph by paragraph in Word.

What is This

The “Incantation Bro” (Jueling Ge) Official Document Formatting Assistant is a SkillHub community Skill (Coordinate @user_0436b842/ai-text-formatter, current version v3.4.3, category office-efficiency). The publisher is user_0436b842, and the SkillHub page lists the author as Chen Zhao. It targets existing manuscripts: it automatically cleans formatting noise from official documents or non-official copy, identifies document structure, and formats text according to the fonts, sizes, page layout, and page number requirements of the Format for Official Documents of Party and Government Organs (GB/T 9704-2012), finally generating a downloadable .docx. The tags indicate requires_api_key=false, meaning installation and use do not rely on additional API keys.

Official Portals:

  • SkillHub Display Page: https://www.skillhub.cn/skills/user_0436b842/ai-text-formatter
  • Skill Coordinate Reference: https://api.skillhub.cn/user_0436b842/ai-text-formatter

Core Functions

The capabilities stated in the Skill introduction can be summarized into four points, all of which can be verified on the SkillHub page:

  1. Format Cleanup: Handles messy styles pasted from various sources to lay the foundation for subsequent unified typesetting.
  2. Structure Recognition: Distinguishes hierarchies such as headings and body text to facilitate applying styles according to official document conventions.
  3. National Standard Typesetting: Aligns fonts, sizes, page setup, and page numbers with GB/T 9704-2012.
  4. Export to Word: Outputs .docx files, facilitating further local circulation or application of “Red Head” letterheads.

Triggering relies on user phrasing. Officially listed expressions include: Organize into Word format, Format according to official document standards, Format conversion, Format adjustment, Official document formatting, Convert to official format, Clean up format. Simply initiate the task with the above intents in an Agent that supports Skills; there is no need to memorize dedicated command-line subcommands.

Installation and Activation

SkillHub recommends installation via its CLI, pointing to the current Agent’s skills directory (installing in the wrong directory will prevent the Agent from reading the Skill). First, perform an environment check, then install this Skill.

  1. Confirm whether skillhub is installed:
command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation documentation to perform a full installation (including CLI and default Skills):

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

If only the CLI is needed:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
  1. Install this Skill. The installation prompt provided on the SkillHub page is: Install @user_0436b842/ai-text-formatter according to https://skillhub.cn/install/skillhub.md. The command form is as follows (replace <skills directory> with the path of your current client):
skillhub install @user_0436b842/ai-text-formatter --dir <skills directory>

Common skills directory examples in SkillHub documentation:

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, refresh or restart the session according to the conventions of your Agent to ensure SKILL.md is loaded. You can also send the original installation prompt from the SkillHub page to the AI and let it complete the installation according to the install documentation.

Typical Usage

This Skill is based on the general SKILL.md format; usage is primarily conversational rather than a standalone typesetting CLI.

  1. Attach or paste the manuscript to be organized into the Agent (it can be an official document, or non-official material where you wish to apply official document layouts).
  2. Explain your intent using officially listed trigger phrases, such as: “Format according to official document standards and export to Word” or “Convert to official format after cleaning up formatting.”
  3. The Agent will call the Skill to complete the cleanup, structure recognition, and GB/T 9704-2012 typesetting, delivering the .docx download or save path.

If the hierarchy of the manuscript is chaotic, you can add structural hints in the same sentence (such as main title, level 1 heading, body paragraphs) to help the structure recognition step align with your expectations; specific interaction is subject to the SKILL.md within the Skill.

Applicable Scenarios and Notes

Who it is for

  • Colleagues who need to quickly align existing Chinese manuscripts with the layout of Party and government official documents and obtain a Word file.
  • Scenarios where content is copied from web pages, IM, or older Word versions, and the user wishes to clean formatting first before unifying font sizes and page numbers.

Not suitable or Out of Scope

Task clues and the introduction emphasize that this is a typesetting and format conversion capability, not used for: copy optimization, plain text proofreading, English document typesetting, or PDF conversion. If the goal is to change wording, check typos, format English papers, or convert PDF to Word, other tools or Skills should be chosen.

Other Notes

  • SkillHub Statistics (based on crawled data): Rating 100000, Downloads 2745; please refer to the SkillHub page for real-time data.
  • National standard typesetting covers layout specifications, but offline processes such as red letterheads, seals, and classification levels still need to be completed in the unit’s template or OA system.
  • For complex tables, multi-column layouts, or heavily designed drafts, the recognition and layout results require manual verification in Word.

Conclusion

The Official Document Formatting Assistant consolidates “Clean Format -> Recognize Structure -> Output Word per GB/T 9704-2012” into a triggerable Agent Skill, suitable for reducing the time spent manually applying styles to existing manuscripts. For installation and details, see SkillHub: https://www.skillhub.cn/skills/user_0436b842/ai-text-formatter

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

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

Xiaoye