Preface¶
Developers handling Chinese official documents often encounter two types of issues: first, formatting. Official documents follow the GB/T 9704 national standard, which imposes mandatory requirements on headers, fonts, font sizes, line spacing, and page numbers. Manually checking Word settings is inefficient and prone to errors. Second, workflow. From drafting, modifying, and applying templates to converting to .docx, tools are often scattered, requiring manual assembly every time.
The “Full-Process Official Document Processing Tool” introduced below is a self-contained Skill that consolidates these steps into a single entry point: format checking, automatic repair, inline revision, template generation, style learning, and Markdown to official document conversion. It targets scenarios where .docx official documents need to be processed in batches via code or Agent workflows, without relying on databases or backend services.
What is this¶
The Full-Process Official Document Processing Tool, located at @user_7103d3f8/gongwen-skill, is published and maintained by community developer user_7103d3f8. It is categorized under office-efficiency and sourced from the community. The current version is 1.12.55, with a SkillHub rating of 100000 and 1140 downloads. It is tagged with requires_api_key=false, meaning no API Key is required.
It solves the following problem: given a .docx official document or a Markdown draft, it uses command-line subcommands to perform format compliance checks, repairs according to national standards, generates templates for specific document types, and learns typography styles from existing standard documents.
Core Functions¶
According to the official description, the Skill provides six subcommands covering the complete lifecycle of an official document:
check: Checks the format of a .docx official document against the GB/T 9704 national standard.optimize: Automatically repairs issues identified during the check.optimize-content: Performs inline content revision, marking changes with red highlights, strikethroughs, and revision notes to facilitate manual review.template: Generates official document templates.style-learn: Style learning; reads typography styles from a standard document to generate a custom template.md2docx: Converts Markdown drafts into .docx files formatted as official documents.
Additionally, it supports the injection of headers, footers (edition notes), and page numbers. The supported document types cover 24 categories of official documents, including notices, requests for instructions, reports, letters, and meeting minutes.
The optimize-content function deserves special mention: it does not directly overwrite the original text but leaves revision suggestions within the document in the form of red highlights and strikethroughs, accompanied by revision notes. This implies that the revision results can be confirmed by a human or an upstream process before finalizing, making it suitable for official document scenarios where “modification implies finalization” is not acceptable.
Installation and Activation¶
It should be noted that at the time of writing, the official pages (https://www.skillhub.cn/skills/user_7103d3f8/gongwen-skill and https://api.skillhub.cn/user_7103d3f8/gongwen-skill) were inaccessible. Consequently, the official installation commands, directory conventions, and configuration fields could not be verified and are not provided here.
This Skill is based on the generic SKILL.md format and is a community release. The general method for enabling such Skills is to place the directory containing SKILL.md into the client’s skill search path and then invoke it by the Skill name during a conversation. Specific paths vary by client:
- Cursor: Reference the Skill’s SKILL.md in the rules or skills directory.
- Codex CLI / Claude Code: Place it in the respective skills directory after confirming the location.
The above represents general practices, not official instructions from this specific Skill. Please refer to the official page before installation and do not copy commands from this article blindly.
Typical Usage¶
The behavior described in the official introduction can be organized by subcommand. A typical processing pipeline is “check first, then repair, and finally save”:
- Perform a format check on an existing .docx:
check <document.docx>
This step outputs a list of formatting issues based on GB/T 9704.
- Automatically repair the identified issues:
optimize <document.docx>
- Perform only content revision, retaining a manual confirmation step:
optimize-content <document.docx>
- Generate a template for a specific document type from scratch:
template <document_type>
- Learn styles from an existing standard document to generate a custom template:
style-learn <standard_document.docx>
- Convert a Markdown draft into an official document:
md2docx <draft.md>
The above are illustrations at the subcommand level. Specific parameters, input/output formats, and switches for header, footer, and page number injection for each subcommand were not provided in the available materials; please refer to the official page or SKILL.md for details.
Use Cases and Notes¶
Suitable scenarios: Developers and Agent workflows requiring batch, reproducible processing of official documents; scenarios where existing Markdown drafts need to be converted into compliant .docx files; scenarios where an organization has fixed typography styles and wishes to reverse-engineer a template from a standard document.
Limitations and Pitfalls:
- Format judgment is based on GB/T 9704. If historical internal typography standards conflict with the national standard, the results of
optimizemay conflict with internal requirements, requiring manual verification. optimize-contentproduces an annotated draft rather than a final version; manual confirmation is mandatory before finalizing.- Document type support is limited to 24 categories. Non-standard types require self-extension using
style-learnortemplate. - No API Key is required, and functions should be completed locally. However, when involving specific client paths, the skill directory location still needs to be confirmed.
Conclusion¶
The value of the Full-Process Official Document Processing Tool lies in consolidating GB/T 9704 compliance checking, repair, templating, and conversion into a single self-contained Skill. It is ready to use upon cloning, with no database or backend dependencies, making it suitable for embedding in automated workflows. Teams looking to perform batch format governance or convert Markdown to official documents can start by trying the check and md2docx subcommands.
Official API: https://api.skillhub.cn/user_7103d3f8/gongwen-skill , Page: https://www.skillhub.cn/skills/user_7103d3f8/gongwen-skill .