← 返回 Skills 市场
sereinzhi

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

作者 sereinZhi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
834
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install generate-word-docx
功能描述
Create professional Word (.docx) documents from a user-provided content list with styled headings, paragraphs, colors, alignment, and formatting.
使用说明 (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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install generate-word-docx
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /generate-word-docx 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug generate-word-docx
版本 1.0.0
许可证 MIT-0
累计安装 3
当前安装数 3
历史版本数 1
常见问题

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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 834 次。

如何安装 Generate a Word (.docx) document based on the content list provided by the user.?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install generate-word-docx」即可一键安装,无需额外配置。

Generate a Word (.docx) document based on the content list provided by the user. 是免费的吗?

是的,Generate a Word (.docx) document based on the content list provided by the user. 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Generate a Word (.docx) document based on the content list provided by the user. 支持哪些平台?

Generate a Word (.docx) document based on the content list provided by the user. 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Generate a Word (.docx) document based on the content list provided by the user.?

由 sereinZhi(@sereinzhi)开发并维护,当前版本 v1.0.0。

💬 留言讨论