Word Document Creator Skill for Openclaw

An industrial-grade Word document generator that combines Word COM automation with python-docx for robust and reliable file creation.

woaiwojia8899
v1.0.0
Mar 30, 2026
0
1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install word-document-creator

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 word-document-creator 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 Word Document Creator Skill?

The Word Document Creator Skill is a high-performance tool designed for the programmatic generation of Microsoft Word files. It utilizes a sophisticated hybrid approach, leveraging Word COM for initial document creation to ensure native compatibility and python-docx for efficient content editing and styling. As a key component of the Openclaw Skills ecosystem, it is engineered to handle complex character encoding and resource management, ensuring that generated documents are both structurally sound and professionally formatted.

This skill addresses common pitfalls in automated document generation by implementing a three-layer encoding defense and a COM exception circuit breaker. Whether you are generating simple memos or complex industrial reports, this skill provides a stable and validated workflow that prioritizes data integrity and system stability.

Word Document Creator Skill Use Cases

  • Automating the generation of business reports, academic papers, or legal documents from structured data.
  • Programmatically creating formatted Word documents from JSON-based content sources.
  • Standardizing organizational document styles, including font families, sizes, and paragraph spacing.
  • Building document pipelines that require strict validation of file existence and structural integrity.

How Word Document Creator Skill Works

  1. The skill initializes the runtime environment with a three-layer encoding defense across environment variables, system console settings, and Python output streams.
  2. It initializes the Microsoft Word COM interface to create a valid base document, employing a circuit breaker to terminate the process if the environment is not properly configured.
  3. Content is injected using python-docx, applying a comprehensive style configuration that includes font families like Microsoft YaHei and specific spacing rules.
  4. A back-read validation phase occurs where the skill verifies the physical file path, checks for non-zero file size, and confirms the paragraph count matches the input.
  5. The process concludes by safely releasing the Word COM object and terminating the Word instance to prevent file locks.

Word Document Creator Skill Setup

To use this skill within the Openclaw Skills framework, ensure you have Microsoft Word (Office Suite) installed. Use the following steps for configuration:

# Navigate to your project directory
cd D:\openclaw_project

# Install required dependencies in your virtual environment
.\venv\Scripts\python.exe -m pip install python-docx pywin32

# Ensure the script is placed in the designated scripts folder
# Path: scripts/word_creator.py

Word Document Creator Skill Data Schema & Taxonomy

The skill processes data using the following schema to ensure high-fidelity document generation:

Parameter Type Description
title String The main title of the document, formatted with specific heading styles.
content JSON Array A stringified array of paragraphs to be inserted into the document body.
output_path String The absolute local path for the output .docx file (must be a raw string).
WORD_STYLE_CONFIG Object Internal metadata defining font sizes (12-18pt), line spacing (1.5), and alignment.

Word Document Creator Skill Advanced Features

  • Hybrid Automation: Combines the reliability of Word COM with the speed of python-docx.
  • Triple-Layer Encoding Defense: Prevents character corruption by synchronizing UTF-8 across the OS and Python runtime.
  • Exception Circuit Breaker: Immediately halts execution on COM failures to prevent resource leaks and error propagation.
  • Structural Back-Read Validation: Automatically verifies document integrity and paragraph counts after file creation.
  • Style Configuration Isolation: Decouples document styling from core logic for easy customization of professional layouts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*