M AI 员工技能商店
AI 员工平台 返回商城
返回技能商店

Moss Word 文档插件

v1.0.0 · 办公自动化 · 官方

Word 文档 方案 报告 合同 Moss

简介

Moss Word 文档插件 v1.0,AI 一键生成专业文档:

  • 7 种操作:创建、读取、信息、追加、写入、主题查询、字段说明
  • 5 套主题:商务蓝、科技紫、深色、简约灰、公文正式
  • 11 种内容块:标题、段落、列表、表格、图片、引用、代码、分页、分隔线、目录
  • 自动化:封面页、自动目录、页眉页脚、页码
  • 简易大纲:AI 可用 outline 文本快速生成

安装

python\python.exe -m pip install python-docx

可选:编辑 config/word_config.json 设置默认主题/页眉页脚。


注册技能 word_tool

技能名称: word_tool

技能描述: Word 文档自动生成 v1.0,封面目录、主题样式、表格图片、列表引用。用户需要写/读/追加 Word 时使用。

脚本路径: D:\moss-plugins\word\run.bat

参数 JSON(整段复制到 Moss「参数定义」框):

{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "description": "create/read/info/append/write/themes/formats",
      "enum": ["create", "read", "info", "append", "write", "themes", "formats"]
    },
    "output": {"type": "string", "description": "输出docx路径,create必填"},
    "filepath": {"type": "string", "description": "docx路径,read/info/append/write必填"},
    "title": {"type": "string", "description": "封面标题"},
    "subtitle": {"type": "string", "description": "封面副标题"},
    "author": {"type": "string", "description": "作者"},
    "theme": {"type": "string", "enum": ["business", "tech", "dark", "minimal", "formal"]},
    "header": {"type": "string", "description": "页眉文字"},
    "footer": {"type": "string", "description": "页脚文字"},
    "page_number": {"type": "string", "description": "true显示页码"},
    "auto_toc": {"type": "string", "description": "true自动生成目录"},
    "blocks": {"type": "string", "description": "内容块JSON数组字符串,见包内文档"},
    "outline": {"type": "string", "description": "简易大纲文本,与blocks二选一"},
    "text": {"type": "string", "description": "write写入文本"},
    "block_type": {"type": "string", "description": "write块类型paragraph/heading/bullet/numbered"},
    "level": {"type": "string", "description": "write标题级别1-4"},
    "max_paragraphs": {"type": "string", "description": "read最多读取段落数"}
  },
  "required": ["action"]
}

完整 blocks 示例见包内 Word插件.md 第三节;四件套见第五节。


对话示例

  • 写一份项目方案 Word,含封面、自动目录、背景分析和实施步骤
  • 读取 D 盘方案.docx 的内容并总结
  • 向已有文档追加附录章节
  • 有哪些 Word 主题可用?