docx-formatter for Openclaw

A specialized document generator that automates the creation of Word files strictly following Chinese official formatting standards.

rokami
v1.0.1
Mar 3, 2026
1
2.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install docx-formatter

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 docx-formatter 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 docx-formatter?

docx-formatter is a sophisticated utility designed to bridge the gap between plain text drafts and formal government-standard documents. By leveraging the power of Openclaw Skills, this tool automates the intricate requirements of Chinese official document (gongwen) formatting, including specific font mappings, line spacings, and margin controls.

Whether you are a developer building automation workflows or a professional drafting formal reports, this skill ensures that your outputs are always compliant with national standards. It simplifies the transition from Markdown to .docx, making it an essential component for any workflow involving official correspondence or government materials.

docx-formatter Use Cases

  • Generating formal reports, work summaries, and project proposals that require strict official formatting.
  • Converting Markdown content into professional Word documents for government or corporate use.
  • Automating the creation of party-government materials such as democratic life meeting reports and duty performance summaries.
  • Polishing and reformatting existing documents to meet specific font and layout regulations using Openclaw Skills.

How docx-formatter Works

  1. The user initiates a request by providing a Markdown file or raw JSON content to the skill.
  2. docx-formatter parses the input to identify hierarchical structures like titles, subheaders, and body paragraphs.
  3. The engine applies the official style guide, mapping document levels to specific fonts like FangZheng XiaoBiaoSong and FangSong_GB2312.
  4. Layout parameters are configured, including A4 paper size, 28pt fixed line spacing, and precise page margins.
  5. The tool generates a finalized .docx file, including automated page numbering and signature alignment.

docx-formatter Setup

To begin using this skill within your environment, run the following commands to install dependencies:

cd ~/.openclaw/workspace/skills/docx-formatter
./install.sh

The script will automatically detect the environment and install all necessary libraries for Openclaw Skills integration.

docx-formatter Data Schema & Taxonomy

The skill organizes document data based on a strict hierarchy and standard metadata taxonomy:

Element Style / Font Size
Main Title FangZheng XiaoBiaoSong Size 2
Level 1 Heading HeiTi Size 3
Level 2 Heading KaiTi_GB2312 Size 3
Body Text FangSong_GB2312 Size 3

It also enforces specific page metadata including A4 dimensions (8.27" x 11.69") and standard 1" top/bottom margins.

docx-formatter Advanced Features

  • Direct Markdown-to-Docx conversion with intelligent heading recognition.
  • Support for custom signatures including multi-line author and date stamps.
  • Automatic Chinese punctuation pairing for quotes, book titles, and parentheses.
  • Precision control over line spacing (fixed 28pt) and first-line indentation (2 characters).
  • CLI-based JSON input support for programmatic document generation within Openclaw Skills workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0