ワンクリックで
create-word-doc
创建、编辑 .docx 文件(报告、合同、提案)。当需要生成 Word 文档、从头创建文档、编辑现有文档、使用模板填充、提取文本时使用。处理报告、备忘录、合同、邀请函、证书等交付物。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
创建、编辑 .docx 文件(报告、合同、提案)。当需要生成 Word 文档、从头创建文档、编辑现有文档、使用模板填充、提取文本时使用。处理报告、备忘录、合同、邀请函、证书等交付物。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
根据任意招标文件生成完整投标文件。5步流程:速查表→逐条应答→底版提取→方案编写→偏差报价回填。触发词:制作标书、写标书、投标。
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Real-time search engine supporting web search, vertical domain search, parallel batch search, and URL content extraction.
Get current weather and forecasts (no API key required).
配置、管理 Lework agent。
Chinese government recognition-policy writing guide for drafting, revising, reviewing, and PDF-formatting official documents about recognition, certification, evaluation, and management of centers, platforms, bases, parks, laboratories, demonstration units, and pilot units. Use when Codex needs to write or improve recognition management measures, red-head issuance notices, application guidelines, application forms, construction-plan templates, capability tables, proof templates, commitment letters, performance evaluation measures, annual assessment notices, and related attachments. Focus on guiding content creation and quality review; use the bundled PDF script only after the agent has drafted the actual document content.
| name | create-word-doc |
| description | 创建、编辑 .docx 文件(报告、合同、提案)。当需要生成 Word 文档、从头创建文档、编辑现有文档、使用模板填充、提取文本时使用。处理报告、备忘录、合同、邀请函、证书等交付物。 |
| allowed-tools | Bash, Read, Write, Glob, Grep |
| metadata | {"tags":["docx","word","report","document"]} |
将主题、草稿、大纲或现有文档转换为专业的 Word 文档。分为两个相连的阶段:首先设计文档结构和内容,然后生成/编辑 .docx 并检查布局。
需要更深入的写作和审阅指导时,请阅读 references/word-document-workflow.md。
| 任务 | 工具/库 | 语言 | 适用场景 |
|---|---|---|---|
| 创建 DOCX | python-docx | Python | 报告、合同、提案 |
| 创建 DOCX | docx | Node.js | 服务端文档生成、TypeScript 项目 |
| DOCX 转 HTML | mammoth.js | Node.js | Web 展示、内容提取 |
| 解析 DOCX | python-docx | Python | 提取文本、表格、元数据 |
| 模板填充 | docxtpl | Python | 邮件合并、基于模板的生成 |
| 审阅流程 | Word 比较/评论/高亮 | 任意 | 人工审阅,无需 OOXML 手术 |
| 修订记录 | OOXML 检查 | 任意 | 真正的修订痕迹或解析修订记录 |
.doc(旧格式)不被这些库支持;需先转换为 .docx(如使用 LibreOffice)。python-docx 无法可靠地创建真正的修订痕迹;使用 Word 比较或专用 OOXML 工具。确定最少的必要信息:
用户未指定时,根据任务推断保守默认值并简要说明。
根据文档用途选择结构:
长文档每个顶级部分负责一个问题。添加子目录仅在改善导航时使用。
逐节从大纲扩展到草稿:
避免填充模式:重复介绍、通用好处、未经支持的夸张表述、冗余的结尾段落。
from docx import Document
from docx.shared import Inches, Pt, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document()
# 标题
title = doc.add_heading('文档标题', 0)
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
# 带格式的段落
para = doc.add_paragraph()
run = para.add_run('这是粗体 ')
run.bold = True
run = para.add_run('和斜体文本。')
run.italic = True
# 表格
table = doc.add_table(rows=3, cols=3)
table.style = 'Table Grid'
for i, row in enumerate(table.rows):
for j, cell in enumerate(row.cells):
cell.text = f'第 {i+1} 行,第 {j+1} 列'
# 图片
doc.add_picture('image.png', width=Inches(4))
# 保存
doc.save('output.docx')
from docxtpl import DocxTemplate
doc = DocxTemplate('template.docx')
context = {
'company_name': '某某公司',
'date': '2025-01-15',
'items': [
{'name': '产品 A', 'price': 100},
{'name': '产品 B', 'price': 200},
]
}
doc.render(context)
doc.save('filled_template.docx')
import { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell } from 'docx';
import * as fs from 'fs';
const doc = new Document({
sections: [{
properties: {},
children: [
new Paragraph({
children: [
new TextRun({ text: '粗体文本', bold: true }),
new TextRun({ text: ' 和普通文本。' }),
],
}),
new Table({
rows: [
new TableRow({
children: [
new TableCell({ children: [new Paragraph('单元格 1')] }),
new TableCell({ children: [new Paragraph('单元格 2')] }),
],
}),
],
}),
],
}],
});
Packer.toBuffer(doc).then((buffer) => {
fs.writeFileSync('output.docx', buffer);
});
soffice --headless --convert-to pdf --outdir <dir> <file.docx> 转换为 PDF 进行检查。pdftoppm -png <file.pdf> <output-prefix> 渲染 PDF 页面。python-docx 提取文本并明确说明未进行布局验证。| 元素 | Python 方法 | Node.js 类 |
|---|---|---|
| 标题 1 | add_heading(text, 1) | HeadingLevel.HEADING_1 |
| 粗体 | run.bold = True | TextRun({ bold: true }) |
| 斜体 | run.italic = True | TextRun({ italics: true }) |
| 字体大小 | run.font.size = Pt(12) | TextRun({ size: 24 }) (半磅) |
| 对齐 | WD_ALIGN_PARAGRAPH.CENTER | AlignmentType.CENTER |
| 分页符 | doc.add_page_break() | new PageBreak() |
references/doc-template-pack.md 记录决策日志和 recurring 文档类型。[插入详情],除非用户明确要求可填充草稿。output/doc/<主题>-报告.docx。参考资料 (references/)
脚本工具 (scripts/)
模板资源 (assets/)
相关技能
../document-pdf/SKILL.md - PDF 生成和转换(如需要)../docs-codebase/SKILL.md - 技术写作模式