← Back to Skills Marketplace
sereinzhi

Generate a Word (.docx) document based on the content list provided by the user.

by sereinZhi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
834
Downloads
0
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install generate-word-docx
Description
Create professional Word (.docx) documents from a user-provided content list with styled headings, paragraphs, colors, alignment, and formatting.
README (SKILL.md)

Word Document Generator Skill\r

\r

1. Role & Objective\r

You are a document automation assistant capable of creating professional Word documents (.docx). Your goal is to convert user requests, reports, or articles into formatted Word files with proper styling (headings, colors, alignment).\r \r Core Capabilities:\r

  • Auto-Dependency Management: The script automatically checks and installs python-docx if missing.\r
  • Structure: Create documents with Headings, Paragraphs, and Quotes.\r
  • Formatting: Apply Bold, \x3Cfont color="red">Text Color\x3C/font>, and Alignment (Center/Right).\r \r ---\r \r

2. Trigger & Intent\r

When to use this skill:\r

  • User asks to "write a Word document", "create a docx", or "export report".\r
  • User provides text content and wants it saved as a file.\r
  • User asks for a formal document (e.g., "Draft a resignation letter in Word", "Save this meeting summary").\r \r Trigger Keywords:\r Word, Docx, 文档, 周报, 导出, 撰写, Report, Summary\r \r ---\r \r

3. Data Construction Rules (Crucial)\r

To use the create_word_file function, you must construct a List of Paragraph Objects (content_data).\r \r

Paragraph Structure\r

Each item in the list represents a paragraph. You can configure:\r

  1. text (Required): The content string.\r
  2. style (Optional):\r
    • "Heading 1" (Main Title)\r
    • "Heading 2" (Sub-section)\r
    • "Normal" (Standard text - default)\r
    • "Quote" (Italicized blockquote)\r
  3. alignment (Optional): "LEFT", "CENTER", "RIGHT".\r
  4. bold (Optional): true or false.\r
  5. color (Optional): Hex code (e.g., "#FF0000" for red).\r \r

Example Construction\r

User Request: "Write a document titled 'Project Alpha' (centered, blue), followed by a bold warning 'Confidential'."\r \r Constructed Data:\r

[\r
  {\r
    "text": "Project Alpha",\r
    "style": "Heading 1",\r
    "alignment": "CENTER",\r
    "color": "#0000FF"\r
  },\r
  {\r
    "text": "Confidential",\r
    "style": "Normal",\r
    "bold": true,\r
    "color": "#FF0000"\r
  },\r
  {\r
    "text": "This is the body of the project proposal...",\r
    "style": "Normal"\r
  }\r
]\r
Usage Guidance
This skill appears to do what it claims: build .docx files from a JSON-like content list. Before installing or running it, consider: 1) the script auto-installs python-docx via pip at runtime — if your environment restricts network or package installs, run the install yourself beforehand or review the dependency/version. 2) Running pip from code will modify the Python environment; prefer running in an isolated/sandboxed environment (virtualenv/container) to avoid unintended package changes. 3) Review or pin the python-docx version if you require reproducible builds. 4) The script writes files to the current working directory — ensure that path is acceptable. If you want a stricter posture, ask the author to remove automatic pip install and document explicit dependency installation instead.
Capability Analysis
Type: OpenClaw Skill Name: generate-word-docx Version: 1.0.0 The skill contains a script (generate-word-doc.py) that uses the subprocess module to automatically execute 'pip install' for the 'python-docx' library if it is not found. While this is intended for dependency management, the use of subprocess to modify the environment and access the network is a high-risk capability. The script also requires file system write access to save documents, which is aligned with its stated purpose but remains a broad permission.
Capability Assessment
Purpose & Capability
Name/description (generate .docx documents with styling) align with the code and SKILL.md. The script only implements document creation features (headings, alignment, bold, color). No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md restricts runtime behavior to constructing a list of paragraph objects and calling create_word_file. Neither the instructions nor the code attempt to read arbitrary files, environment variables, or external endpoints beyond installing a Python package.
Install Mechanism
There is no formal install spec, but the bundled script will auto-run pip (via subprocess) to install 'python-docx' into the running Python environment if the import fails. This is coherent with the purpose but has operational and supply-chain implications: it performs network downloads from PyPI and modifies the runtime environment.
Credentials
The skill declares no required env vars, credentials, or config paths. The code does not access environment secrets. The single external dependency (python-docx) is proportionate to the task.
Persistence & Privilege
Skill does not request always:true, does not modify other skills or system-wide settings, and does not persist credentials. It only saves the generated .docx to the current filesystem, which is consistent with its purpose.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install generate-word-docx
  3. After installation, invoke the skill by name or use /generate-word-docx
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Word Document Generator Skill v1.0.0 - Initial release of the skill for generating formatted Word (.docx) documents. - Automatically manages python-docx dependency installation. - Supports styled document creation: Headings, Paragraphs, and Quotes. - Enables formatting options: Bold text, custom text colors (hex codes), and alignment (Left, Center, Right). - Content is input as a list of configurable paragraph objects, following structured data rules.
Metadata
Slug generate-word-docx
Version 1.0.0
License MIT-0
All-time Installs 3
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is Generate a Word (.docx) document based on the content list provided by the user.?

Create professional Word (.docx) documents from a user-provided content list with styled headings, paragraphs, colors, alignment, and formatting. It is an AI Agent Skill for Claude Code / OpenClaw, with 834 downloads so far.

How do I install Generate a Word (.docx) document based on the content list provided by the user.?

Run "/install generate-word-docx" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Generate a Word (.docx) document based on the content list provided by the user. free?

Yes, Generate a Word (.docx) document based on the content list provided by the user. is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Generate a Word (.docx) document based on the content list provided by the user. support?

Generate a Word (.docx) document based on the content list provided by the user. is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Generate a Word (.docx) document based on the content list provided by the user.?

It is built and maintained by sereinZhi (@sereinzhi); the current version is v1.0.0.

💬 Comments