docx

Solid

全面的文档创建、编辑和分析功能,支持修订追踪、批注、格式保留和文本提取。当 Claude 需要处理专业文档(.docx 文件)时使用:(1) 创建新文档,(2) 修改或编辑内容,(3) 处理修订追踪,(4) 添加批注,或其他任何文档任务

Data & Documents 457 stars 81 forks Updated 4 months ago

Install

View on GitHub

Quality Score: 74/100

Stars 20%
89
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
0
Description 5%
100

Skill Content

# DOCX 创建、编辑和分析 ## 概述 用户可能会要求您创建、编辑或分析 .docx 文件的内容。.docx 文件本质上是一个包含 XML 文件和其他资源的 ZIP 压缩包,您可以读取或编辑这些内容。针对不同任务,您有不同的工具和工作流程可用。 ## 工作流程决策树 ### 读取/分析内容 使用下方的"文本提取"或"原始 XML 访问"章节 ### 创建新文档 使用"创建新 Word 文档"工作流程 ### 编辑现有文档 - **您自己的文档 + 简单修改** 使用"基础 OOXML 编辑"工作流程 - **他人的文档** 使用 **"红线批注工作流程"**(推荐默认) - **法律、学术、商业或政府文档** 使用 **"红线批注工作流程"**(必须) ## 读取和分析内容 ### 文本提取 如果您只需要读取文档的文本内容,应使用 pandoc 将文档转换为 markdown。Pandoc 能够很好地保留文档结构,并能显示修订追踪: ```bash # 将文档转换为 markdown 并保留修订追踪 pandoc --track-changes=all path-to-file.docx -o output.md # 选项:--track-changes=accept/reject/all ``` ### 原始 XML 访问 以下功能需要原始 XML 访问:批注、复杂格式、文档结构、嵌入式媒体和元数据。对于这些功能,您需要解包文档并读取其原始 XML 内容。 #### 解包文件 `python ooxml/scripts/unpack.py <office_file> <output_directory>` #### 关键文件结构 * `word/document.xml` - 主文档内容 * `word/comments.xml` - document.xml 中引用的批注 * `word/media/` - 嵌入的图片和媒体文件 * 修订追踪使用 `<w:ins>`(插入)和 `<w:del>`(删除)标签 ## 创建新 Word 文档 从头创建新 Word 文档时,使用 **docx-js**,它允许您使用 JavaScript/TypeScript 创建 Word 文档。 ### 工作流程 1. **必须 - 完整阅读文件**:从头到尾完整阅读 [`docx-js.md`](docx-js.md)(约 500 行)。**读取此文件时切勿设置任何范围限制。** 在开始创建文档之前,完整阅读文件内容以了解详细语法、关键格式规则和最佳实践。 2. 使用 Document、Paragraph、TextRun 组件创建 JavaScript/TypeScript 文件(您可以假设所有依赖项已安装,如果没有,请参阅下方的依赖项章节) 3. 使用 Packer.toBuffer() 导出为 .docx ## 编辑现有 Word 文档 编辑现有 Word 文档时,使用 **Document 库**(用于 OOXML 操作的 Python 库)。该库自动处理基础设施设置,并提供文档操作方法。对于复杂场景,您可以通过该库直接访问底层 DOM。 ### 工作流程 1. **必须 - 完整阅读文件**:从头到尾完整阅读 [`ooxml.md`](ooxml.md)(约 600 行)。**读取此文件时切勿设置任何范围限制。** 完整阅读文件内容以了解 Document 库 API 和直接编辑文档文件的 XML...

Details

Author
LeastBit
Repository
LeastBit/Claude_skills_zh-CN
Created
7 months ago
Last Updated
4 months ago
Language
Python
License
None

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Solid

docx-official

A user may ask you to create, edit, or analyze the contents of a .docx file. A .docx file is essentially a ZIP archive containing XML files and other resources that you can read or edit. You have different tools and workflows available for different tasks.

39 Updated 1 months ago
lingxling
Data & Documents Featured

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

14,116 Updated today
eigent-ai
Data & Documents Featured

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

459 Updated yesterday
malob
Data & Documents Featured

minimax-docx

Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: (A) create new documents from scratch, (B) fill/edit content in existing documents, (C) apply template formatting with XSD validation gate-check. MUST use this skill whenever the user wants to produce, modify, or format a Word document — including when they say "write a report", "draft a proposal", "make a contract", "fill in this form", "reformat to match this template", or any task whose final output is a .docx file. Even if the user doesn't mention "docx" explicitly, if the task implies a printable/formal document, use this skill.

358 Updated yesterday
mxyhi
Data & Documents Solid

bruce-doc-converter

双向文档转换工具,将 Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx) 和 PDF (.pdf) 转换为 AI 友好的 Markdown 格式,或将 Markdown (.md) 转换为 Word (.docx) 格式。当用户请求以下操作时使用:(1) 明确请求文档转换,包括任何包含"转换"、"转为"、"转成"、"convert"、"导出"、"export"等词汇的请求(例如:"转换文档"、"把这个文件转为docx"、"convert to markdown"、"导出为Word");(2) 需要 AI 理解文档内容("帮我分析这个 Word 文件"、"读取这个 PDF"、"总结这个 Excel");(3) 上传文档文件并询问内容("这是什么"、"帮我看看");(4) 任何涉及 .docx、.xlsx、.pptx、.pdf、.md 文件格式转换的请求。

49 Updated 2 weeks ago
bruc3van