Official Document Formatter for Openclaw

An automated document transformation tool that converts Markdown content into Word files following the GB/T 9704-2012 Chinese official document standard.

hunkguo
v1.0.1
Mar 19, 2026
0
2.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install official-document-template

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install official-document-template using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Official Document Formatter?

The Official Document Formatter is a specialized utility within the Openclaw Skills ecosystem designed to bridge the gap between flexible Markdown drafting and rigid official document requirements. It automates the complex styling rules defined by the National Standard of the People's Republic of China (GB/T 9704-2012), ensuring that fonts, margins, and hierarchical structures are applied perfectly without manual intervention.

This tool is indispensable for users working in administrative or governmental contexts who prefer the speed of Markdown but require professional .docx outputs for formal submissions. By utilizing this specific skill among your Openclaw Skills collection, you can guarantee compliance with official standards for notices, requests, and meeting minutes automatically.

Official Document Formatter Use Cases

  • Generating formal governmental notices and institutional reports from simple text inputs.
  • Converting informal meeting notes into standardized meeting minutes.
  • Preparing official requests and replies that require strict hierarchical formatting.
  • Automating the creation of standardized decisions and opinions using Openclaw Skills workflows.

How Official Document Formatter Works

  1. The user provides the core content in Markdown or plain text format to the agent.
  2. The skill identifies the specific document type and its structural hierarchy.
  3. National standard styles (GB/T 9704-2012) are mapped to the content elements.
  4. The script processes font assignments (Heiti, Kaiti, FangSong) and page layout parameters.
  5. A professional .docx file is generated with precise margins, line spacing, and character counts.

Official Document Formatter Setup

To use this tool within your Openclaw Skills environment, ensure you have the required Python dependencies and fonts installed:

pip install python-docx

To run a conversion, use the following command structure:

python3 ~/.openclaw/workspace/official-document-template/scripts/convert_to_docx.py input.md --output output.docx

Note: Ensure your system has the standard official fonts installed, including FangSong, Heiti, and Kaiti.

Official Document Formatter Data Schema & Taxonomy

The skill organizes document data according to the following specification table:

Feature Standard Requirement
Paper Size A4 (210mm x 297mm)
Margins Top: 37mm, Bottom: 35mm, Left: 28mm, Right: 26mm
Body Font FangSong, size 16pt (Sanhao)
Line Spacing Fixed at 28pt
Layout 22 lines per page, 28 characters per line
Hierarchy 5 levels of headers with specific font/numbering rules

Official Document Formatter Advanced Features

  • Multi-level header recognition: Automatically styles headers from Level 1 (Heiti) down to Level 5 (FangSong with specific numbering).
  • Precision layout control: Automatically sets page margins and line spacing to meet strict audit requirements.
  • Intelligent indentation: Forces a standard two-character first-line indent across all body paragraphs.
  • Seamless integration: Designed to work within broader Openclaw Skills automation pipelines for document management.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*