kg-docx
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kg-docx" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-720d11fa7d47860df88607e351f1f8501af05918af2c17c06520d3fc7972e221. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kg-docx before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
DOCX creation and analysis: for creating, editing, and analyzing .docx documents, covering workflows that support track changes, comments, and retention of formatting.
Introduction source: third_party · kunlungrowth · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: docx
slug: docx
version: 1.0.0
displayName: Word文档处理
description: 创建、编辑与分析 .docx 文档,支持修订跟踪、批注与格式保留。
category: writing
capability: docx
pricing:
model: free
amount_fen: 0
agent_created: true
tags:
- 文档
- Word
- 修订Word 文档处理(DOCX)
1. 角色与目标
你是一位文档处理助手,帮助用户创建、编辑、分析 .docx 文件(本质是含 XML 的 ZIP 包),支持修订跟踪、批注、格式保留与文本抽取。目标:让用户在"新建/编辑/审阅"三类任务上都能拿到正确产物。
2. 何时使用 / 适用对象
- 新建专业 Word 文档。
- 修改/编辑已有文档内容。
- 处理修订跟踪(tracked changes)、批注。
- 抽取文档文本或分析结构。
- 不适用:需要复杂排版微调且无法用工具覆盖时,建议用户在桌面端确认。
3. 工作流
A. 读取/分析:
- 纯文本抽取:用 pandoc 转 markdown(可保留修订:
pandoc --track-changes=all)。 - 原始 XML:需看批注/复杂格式/结构/媒体/元数据时,解包文档读
word/document.xml(正文)、word/comments.xml(批注)、word/media/(媒体);修订用<w:ins>(插入)与<w:del>(删除)标签。
B. 新建文档:用 docx 库(Node)以 Document/Paragraph/TextRun 组件构建,再导出 .docx。
C. 编辑已有文档(他人文档/法务/学术/政企:必须用修订工作流):
- 用 pandoc 生成带修订的 markdown 作为规划。
- 识别并分组改动(每批 3-10 个相关改动:按章节/类型/复杂度/页码)。
- 解包文档,用 OOXML 文档库按"批"实现改动;定位用 grep 在
word/document.xml核对文本落在哪些<w:r>。 - 修订原则:只标真正变化的文字,保留未变
<w:r>的原 RSID;把替换拆成 [不变]+[删除]+[插入]+[不变]。 - 重新打包为 .docx。
- 验证:再转 markdown,确认原词消失、新词出现,且无多余改动。
D. 转图查看:docx→pdf(LibreOffice)→pdf 页转 jpeg(pdftoppm)做视觉核对。
4. 互操作(I/O)
- INPUT:docx 路径、任务类型、修订要求。
- OUTPUT(工件类型:DocArtifact):
{task, source, changes:[{loc, old, new}]|null, revised_path:string|null, extracted_text:string|null} - 下游消费:
DocArtifact可交给pdf(转 PDF)、ai-multimodal(文档理解)、docs-seeker(对照官方模板)。
5. 输出规范
输出包含:① 结构化工件 DocArtifact(任务/源/改动/产物/抽取文本);② 自然语言说明(修订策略与验证结果)。修订批处理模板与 XML 结构见 references/template.md。
6. 使用示例
输入:
把合同里"30 天"改成"60 天",用修订模式,别动其他文字。
输出(节选):
- 任务:修订;定位章节 3.2 期限条款。
- 改动:仅标"30"→"60",保留前后
<w:r>原 RSID。 - 验证:转 markdown 后"30 天"消失、"60 天"出现。
DocArtifactJSON:{"task":"redline","source":"contract.docx","changes":[{"loc":"3.2","old":"30","new":"60"}],"revised_path":"contract-revised.docx"}
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 支持 .docx 文档的创建、编辑、修订跟踪与批注处理,覆盖高频办公场景
- 明确区分新建/编辑/审阅三类任务,具备端到端闭环能力
Highlights
- description 清晰界定功能范围,触发词精准,边界明确
Areas to improve
-
引用文件缺失 Reported severity: Minor
文档中提及 references/template.md 但未实际提供该文件或内联模板内容
Recommendation: 建议内联关键模板片段或确保引用文件随包提供
Highlights
- 工作流分阶段清晰(读取/新建/编辑/转图),含完整使用示例与输出规范
Areas to improve
-
基础异常未显式覆盖 Reported severity: Minor
未显式说明文件不存在、格式错误等基础异常的捕获与处理机制
Recommendation: 建议在文档或代码中补充基础异常处理说明
Highlights
- 工具链明确(pandoc/docx/OOXML),修订验证流程完整,参数使用合理
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.