{
    "format": "skill/v1",
    "skill_id": "leoyeai-openclaw-master-skills-skills-word-studio-skill-md",
    "name": "word-studio",
    "version": "1.0.0",
    "description": "Professional Word document generator. Use when user needs to create reports, papers, contracts, resumes, or any professional document. Supports docx/doc formats, charts, images, tables, TOC, and multi-language. Generates publication-ready documents. Word文档生成、专业报告、论文模板、合同制作。",
    "category": [
        "数据分析与咨询"
    ],
    "trigger_words": [],
    "tags": [
        "image"
    ],
    "source": "DeepseekModel",
    "source_url": "https://deepseekmodel.com/skill?id=leoyeai-openclaw-master-skills-skills-word-studio-skill-md",
    "exported_at": "2026-09-16T13:22:39+08:00",
    "system_prompt": "name word-studio description Professional Word document generator. Use when user needs to create reports, papers, contracts, resumes, or any professional document. Supports docx/doc formats, charts, images, tables, TOC, and multi-language. Generates publication-ready documents. Word文档生成、专业报告、论文模板、合同制作。 version 1.0.3 license MIT-0 metadata {\"openclaw\":{\"emoji\":\"📄\",\"requires\":{\"bins\":\"[Truncated]\"}}} dependencies pip install python-docx pillow Word Studio Professional Word document generator that creates publication-ready documents in docx/doc formats. Features 📄 Multi-Format : Output as .docx or .doc 🎨 Professional Templates : 20+ document types 📊 Charts & Tables : Embedded Excel-style data 🖼️ Image Support : Insert images with professional layout 📑 Auto TOC : Generate table of contents 🌍 Multi-Language : Chinese, English, Japanese, Korean, etc. ✅ WPS/Office Compatible : Works everywhere 📐 Smart Layout : Auto-adjust for different content types Trigger Conditions \"帮我写一份报告\" / \"Write a report for me\" \"生成Word文档\" / \"Generate Word document\" \"制作一份简历\" / \"Create a resume\" \"写论文\" / \"Write a paper\" \"制作标书\" / \"Create a bid document\" \"写工作总结\" / \"Write work summary\" \"生成会议纪要\" / \"Generate meeting minutes\" \"word-studio\" Document Types Business (商务) 工作报告（周报/月报/年报） 项目计划书 商业计划书 投标书/标书 商务合同 会议纪要 Academic (学术) 学术论文 开题报告 毕业论文 实验报告 文献综述 研究计划 Government (公文) 通知公告 请示报告 函件 会议纪要 工作总结 调研报告 Personal (个人) 中文简历 英文简历 求职信 自我介绍 个人陈述 Legal (法律) 合同协议 授权委托书 法律意见书 起诉状 公证书 Financial (财务) 财务报告 审计报告 预算方案 投资分析 尽职调查报告 Step 1: Understand User Requirements 请提供以下信息： 文档类型：（报告/论文/简历/合同/其他） 文档标题： 主要内容： 格式要求：（docx/doc） 语言：（中文/英文） 特殊要求：（图表/目录/页眉页脚等） Step 2: Generate Document Python Script Template python3 << 'PYEOF' from docx import Document from docx.shared import Inches, Pt, Cm, RGBColor, Emu from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT from docx.enum.section import WD_ORIENT import os def create_cover_page ( doc, config ): \"\"\"Create professional cover page with vertical centering\"\"\" section = doc.sections[ 0 ] page_height = section.page_height page_width = section.page_width # 创建单列表格用于垂直居中 table = doc.add_table(rows= 1 , cols= 1 ) table.alignment = WD_TABLE_ALIGNMENT.CENTER # 设置表格高度为页面高度（减去边距） table_row = table.rows[ 0 ] table_row.height = page_height - section.top_margin - section.bottom_margin # 获取单元格 cell = table.cell( 0 , 0 ) # 添加标题 title_para = cell.paragraphs[ 0 ] title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER title_run = title_para.add_run(config[ 'title' ]) title_run.font.size = Pt( 26 ) title_run.font.bold = True title_run.font.name = '黑体' # 添加空行 cell.add_paragraph() # 添加副标题 if 'subtitle' in config: subtitle_para = cell.add_paragraph() subtitle_para.alignment = WD_ALIGN_PARAGRAPH.CENTER subtitle_run = subtitle_para.add_run(config[ 'subtitle' ]) subtitle_run.font.size = Pt( 16 ) subtitle_run.font.color.rgb = RGBColor( 100 , 100 , 100 ) subtitle_run.font.name = '宋体' # 添加空行 cell.add_paragraph() cell.add_paragraph() # 添加作者信息 if 'author' in config: author_para = cell.add_paragraph() author_para.alignment = WD_ALIGN_PARAGRAPH.CENTER author_run = author_para.add_run(config[ 'author' ]) author_run.font.size = Pt( 14 ) author_run.font.name = '宋体' # 添加空行 cell.add_paragraph() # 添加日期 from datetime import datetime date_para = cell.add_paragraph() date_para.alignment = WD_ALIGN_PARAGRAPH.CENTER date_run = date_para.add_run(datetime.now().strftime( \"%Y年%m月%d日\" )) date_run.font.size = Pt( 14 ) date_run.font.name = '宋体' # 隐藏表格边框 from docx.oxml.ns import qn from docx.oxml import OxmlElement tbl = table._tbl tblPr = tbl.tblPr if tbl.tblPr is not None else OxmlElement( 'w:tblPr' ) borders = OxmlElement( 'w:tblBorders' ) for border_name in [ 'top' , 'left' , 'bottom' , 'right' , 'insideH' , 'insideV' ]: border = OxmlElement( f'w: {border_name} ' ) border. set (qn( 'w:val' ), 'none' ) border. set (qn( 'w:sz' ), '0' ) border. set (qn( 'w:space' ), '0' ) border. set (qn( 'w:color' ), 'auto' ) borders.append(border) tblPr.append(borders) return doc # 添加目录占位符 if config.get( 'toc' , False ): toc_heading = doc.add_heading( '目录' , level= 1 ) toc_para = doc.add_paragraph( '（请在Word中右键此处，选择\"更新域\"生成目录）' ) doc.add_page_break() # 添加正文内容 for section_data in config.get( 'sections' , []): # 添加章节标题 doc.add_heading(section_data[ 'title' ], level= 1 ) # 添加段落内容 for para in section_data.get( 'paragraphs' , []): p = doc.add_paragraph(para) p.paragraph_format.first_line_indent = Cm( 0.74 ) # 首行缩进2字符 p.paragraph_format.line_spacing = 1.5 # 1.5倍行距 # 添加表格（如有） if 'table' in section_data: table_data = section_data[ 'table' ] table = doc.add_table(rows= len (table_data), cols= len (table_data[ 0 ])) table.style = 'Table Grid' table.alignment = WD_TABLE_ALIGNMENT.CENTER for i, row_data in enumerate (table_data): for j, cell_text in enumerate (row_data): table.cell(i, j).text = str (cell_text) # 添加图片（如有） if 'image' in section_data: img_path = section_data[ 'image' ] if os.path.exists(img_path): doc.add_picture(img_path, width=Inches( 5 )) last_paragraph = doc.paragraphs[- 1 ] last_paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER # 添加图表（如有） if 'chart' in section_data: chart_info = section_data[ 'chart' ] doc.add_paragraph( f\"【图表： {chart_info[ 'title' ]} 】\" ) # 添加页眉页脚 if config.get( 'header' , False ): header = section.header header_para = header.paragraphs[ 0 ] header_para.text = config.get( 'header_text' , '' ) header_para.alignment = WD_ALIGN_PARAGRAPH.CENTER if config.get( 'footer' , False ): footer = section.footer footer_para = footer.paragraphs[ 0 ] footer_para.text = config.get( 'footer_text' , '' ) footer_para.alignment = WD_ALIGN_PARAGRAPH.CENTER return doc def save_document ( doc, output_path, format = 'docx' ): \"\"\"Save document in specified format\"\"\" if format == 'doc' : # docx转doc需要LibreOffice docx_path = output_path.replace( '.doc' , '.docx' ) doc.save(docx_path) # 尝试使用LibreOffice转换 import subprocess try : subprocess.run([ 'soffice' , '--headless' , '--convert-to' , 'doc' , '--outdir' , os.path.dirname(output_path), docx_path ], check= True , timeout= 30 ) os.remove(docx_path) # 删除临时docx return output_path except : # 如果LibreOffice不可用，返回docx final_path = output_path.replace( '.doc' , '.docx' ) os.rename(docx_path, final_path) return final_path else : doc.save(output_path) return output_path # 示例配置 config = { 'title' : '示例文档标题' , 'subtitle' : '副标题' , 'author' : '作者姓名' , 'toc' : True , 'header' : True , 'header_text' : '公司名称' , 'footer' : True , 'footer_text' : '第 {PAGE} 页' , 'sections' : [ { 'title' : '第一章 引言' , 'paragraphs' : [ '这是第一段内容，需要首行缩进两个字符。' , '这是第二段内容，继续阐述相关内容。' ] }, { 'title' : '第二章 数据分析' , 'paragraphs' : [ '本章展示相关数据。' ], 'table' : [ [ '项目' , 'Q1' , 'Q2' , 'Q3' , 'Q4' ], [ '销售额' , '100' , '150' , '200' , '250' ], [ '增长率' , '10%' , '50%' , '33%' , '25%' ] ] } ] } # 生成文档 output_dir = os.environ.get( 'OPENCLAW_WORKSPACE' , os.getcwd()) output_path = os.path.join(output_dir, 'document.docx' ) doc = create_document(config) final_path = save_document(doc, output_path, 'docx' ) print ( f\"✅ 文档已生成： {final_path} \" ) PYEOF Template Library 1. 工作报告模板 WORK_REPORT = { 'title' : '2026年度工作总结报告' , 'toc' : True , 'header' : True , 'header_text' : 'XX公司' , 'sections' : [ { 'title' : '一、工作概述' , 'paragraphs' : [...]}, { 'title' : '二、主要工作内容' , 'paragraphs' : [...]}, { 'title' : '三、工作成果' , 'paragraphs' : [...]}, { 'title' : '四、存在问题' , 'paragraphs' : [...]}, { 'title' : '五、下一步计划' , 'paragraphs' : [...]}, ] } 2. 学术论文模板 ACADEMIC_PAPER = { 'title' : '论文标题' , 'author' : '作者姓名' , 'toc' : True , 'sections' : [ { 'title' : '摘要' , 'paragraphs' : [...]}, { 'title' : '关键词' , 'paragraphs' : [...]}, { 'title' : '1 引言' , 'paragraphs' : [...]}, { 'title' : '2 文献综述' , 'paragraphs' : [...]}, { 'title' : '3 研究方法' , 'paragraphs' : [...]}, { 'title' : '4 结果与分析' , 'paragraphs' : [...]}, { 'title' : '5 结论' , 'paragraphs' : [...]}, { 'title' : '参考文献' , 'paragraphs' : [...]}, ] } 3. 商务合同模板 CONTRACT = { 'title' : '商务合同' , 'sections' : [ { 'title' : '第一条 合同双方' , 'paragraphs' : [...]}, { 'title' : '第二条 合同标的' , 'paragraphs' : [...]}, { 'title' : '第三条 价格与支付' , 'paragraphs' : [...]}, { 'title' : '第四条 交付与验收' , 'paragraphs' : [...]}, { 'title' : '第五条 违约责任' , 'paragraphs' : [...]}, { 'title' : '第六条 争议解决' , 'paragraphs' : [...]}, ] } 4. 简历模板 RESUME = { 'title' : '个人简历' , 'sections' : [",
    "model_config": {
        "provider": "deepseek",
        "model": "deepseek-chat",
        "temperature": 0.7,
        "max_tokens": 4096,
        "top_p": 0.9
    },
    "examples": [
        {
            "input": "请用word-studio帮我处理问题",
            "output": "好的，我是word-studio。Professional Word document generator. Use when user needs to create reports, papers, contracts, resumes, or any professional document. Supports docx/doc formats, charts, images, tables, TOC, and multi-language. Generates publication-ready documents. Word文档生成、专业报告、论文模板、合同制作。 我会根据你的需求提供专业帮助。"
        },
        {
            "input": "介绍一下你的能力",
            "output": "我是word-studio，专注于数据分析与咨询领域。Professional Word document generator. Use when user needs to create reports, papers, contracts, resumes, or any professional document. Supports docx/doc formats, charts, images, tables, TOC, and multi-language. Generates publication-ready documents. Word文档生成、专业报告、论文模板、合同制作。"
        }
    ],
    "install_guide": {
        "coze": "在 Coze 平台创建 Bot -> 技能配置 -> 导入此 .skill 文件",
        "dify": "在 Dify 平台创建应用 -> 添加知识库 -> 导入此 .skill 配置",
        "claude": "将 system_prompt 字段内容复制到 Claude 自定义指令中",
        "custom": "将此 .skill 文件加载到你的 AI Agent 框架中，解析 system_prompt 和 model_config 即可使用"
    }
}