Skip to main content

docx

Create, edit, inspect, review, and finalize Microsoft Word .docx documents. Use for new Word documents, source- or template-based reports, precise edits that should preserve an existing file, visual or structural review, comments and tracked changes, and final DOCX delivery. Use only for .docx files, not legacy .doc, macro-enabled .docm, or live Microsoft Word control.

来源信息

仓库
OpenBMB/PilotDeck
最近来源活动
2026年8月24日 10:50
检测到的 SKILL.md 语言
英语
星标
4,365
分支
492

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
14 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
docx
description
Create, edit, inspect, review, and finalize Microsoft Word .docx documents. Use for new Word documents, source- or template-based reports, precise edits that should preserve an existing file, visual or structural review, comments and tracked changes, and final DOCX delivery. Use only for .docx files, not legacy .doc, macro-enabled .docm, or live Microsoft Word control.
# DOCX documents Use three stages as a reasoning framework, not a fixed tool pipeline: 1. Understand the request and source materials. 2. Build or edit the document using the approach best suited to the task. 3. Review the actual result before delivery. The user's explicit requirements are the primary acceptance criteria. Adapt the depth of inspection, implementation, and review to the task rather than following a universal checklist. ## Understand Determine the audience, purpose, authoritative sources, required content, expected form, and what must remain unchanged. Distinguish factual sources from templates and visual references. - Preserve source files unless replacement is explicitly requested. - Do not invent unsupported facts, citations, dates, names, figures, or conclusions. - When editing, preserve content, structure, and formatting the user did not ask to change. - Inspect only the material relevant to the requested outcome. For complex sources, use direct Python, `python-docx`, ZIP/XML inspection, or the optional `inspect` command as useful. Resolve the optional CLI once when its evidence or delivery commands help: ```bash SKILL_ROOT={{SKILL_ROOT_SHELL}} DOCX="$SKILL_ROOT/scripts/docx.sh" WORKSPACE="${PILOTDECK_WORK_DIR:?PILOTDECK_WORK_DIR is required}/docx" mkdir -p "$WORKSPACE/tmp" "$WORKSPACE/review" ``` ```bash bash "$DOCX" inspect --input "$INPUT_DOCX" --summary bash "$DOCX" inspect --input "$INPUT_DOCX" --search "target phrase" ``` ## Build Write and run task-specific Python directly. Use the complete `python-docx` API, `lxml`, direct OOXML editing, or another suitable library according to the document and requested change. Choose the script structure and implementation route that make the current task simplest and most reliable. Keep task scripts, candidates, extracted media, reports, renders, and debugging output under `PILOTDECK_WORK_DIR`. Put only the requested final deliverable in the project workspace. Prefer localized edits to reconstruction when modifying an existing document. Inspect package-sensitive features before round-tripping charts, diagrams, embedded objects, content controls, custom XML, signatures, protection, or uncommon fields. Choose a preservation strategy based on the actual document and report limitations honestly. Follow supplied templates and explicit visual requirements. Without either, use restrained neutral presentation: readable typography, semantic headings, useful spacing, simple tables, dark text, and white pages. Do not add decorative covers, oversized titles, branding colors, heading fills, headers, footers, a TOC, or page numbers merely to appear professional. For Word-specific behavior such as fields, revisions, comments, pagination, and renderer differences, read [word-specifics.md](references/word-specifics.md) only when relevant. ## Review Judge the document against the user's requested outcome, not whether a tool ran successfully. Choose evidence according to consequence and uncertainty: - reread or extract final content; - reconcile facts and figures with authoritative sources; - compare a targeted edit with its source; - inspect fields, comments, revisions, relationships, or package structure; - render pages and visually inspect the pages material to the request. The optional CLI provides facts and images, never a content-quality verdict: ```bash bash "$DOCX" validate --input "$WORKSPACE/tmp/candidate.docx" bash "$DOCX" render \ --input "$WORKSPACE/tmp/candidate.docx" \ --out-dir "$WORKSPACE/review/latest" ``` Open relevant full-size page images before making visual claims. After changing the candidate, prior images no longer describe the current document; render the new candidate if visual evidence still matters. LibreOffice rendering can reveal layout defects but may paginate or substitute fonts differently from Microsoft Word. For a simple task, direct inspection may be enough. When correctness depends on data or sources, write a small task-specific checking script directly when it materially improves confidence. ## Deliver Publish the reviewed internal candidate through the delivery command: ```bash bash "$DOCX" deliver \ --input "$WORKSPACE/tmp/candidate.docx" \ --out "$FINAL_DOCX" ``` For an edit, add `--source "$INPUT_DOCX"`. Replace that exact source only when explicitly requested, using `--source "$INPUT_DOCX" --out "$INPUT_DOCX" --replace-source`; a recovery copy remains internal. `deliver` checks package validity, protects the source, and publishes the final file. It does not decide whether the prose, facts, design, or requested outcome are good enough; that judgment belongs to the model's review. Use advanced mechanical commands such as `compare`, `annotate`, `finalize`, and `sanitize` only when they directly serve the request. See [optional-tools.md](references/optional-tools.md) when one is needed.
在 GitHub 查看