word-processor
Create and edit Word documents (.docx) using python-docx. Supports formatting, tables, images, headers, and template-based generation.
от malue-ai★ 37 звёзд на GitHub
Установить word-processor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Word 文档处理
使用 python-docx 创建和编辑 Word 文档(.docx)。
使用场景
- 用户说「帮我生成一份 Word 报告」「把这些内容写成 Word」
- 用户需要创建格式化的文档(标题、表格、列表)
- 用户需要修改现有 Word 文件
依赖安装
pip install python-docx
创建文档
from docx import Document
from docx.shared import Inches, Pt, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document()
# 标题
doc.add_heading('报告标题', level=0)
# 段落
p = doc.add_paragraph('这是正文内容。')
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
# 加粗和斜体
p = doc.add_paragraph()
p.add_run('加粗文本').bold = True
p.add_run(',')
p.add_run('斜体文本').italic = True
# 列表
doc.add_paragraph('要点一', style='List Bullet')
doc.add_paragraph('要点二', style='List Bullet')
# 编号列表
doc.add_paragraph('第一步', style='List Number')
doc.add_paragraph('第二步', style='List Number')
# 表格
table = doc.add_table(rows=3, cols=3, style='Table Grid')
table.cell(0, 0).text = '姓名'
table.cell(0, 1).text = '部门'
table.cell(0, 2).text = '职位'
# 分页
doc.add_page_break()
# 保存
output_path = '/tmp/report.docx'
doc.save(output_path)
print(f'文档已保存: {output_path}')
读取文档
from docx import Document
doc = Document('/path/to/input.docx')
# 读取所有段落
for para in doc.paragraphs:
print(f'[{para.style.name}] {para.text}')
# 读取表格
for table in doc.tables:
for row in table.rows:
print([cell.text for cell in row.cells])
修改文档
from docx import Document
doc = Document('/path/to/input.docx')
# 修改段落文本
for para in doc.paragraphs:
if '旧内容' in para.text:
for run in para.runs:
run.text = run.text.replace('旧内容', '新内容')
doc.save('/path/to/output.docx')
输出规范
- 默认保存到
/tmp/或用户指定路径 - 生成后告知用户文件路径
- 如果在 macOS 上,用
open命令打开文件预览
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл word-processor?
Create and edit Word documents (.docx) using python-docx. Supports formatting, tables, images, headers, and template-based generation.
Как установить скилл word-processor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл word-processor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…