# Send docx-md to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "docx-md",
    "name": "docx-md",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/yanweiliang323868-del/docx-md",
    "canonicalUrl": "https://clawhub.ai/yanweiliang323868-del/docx-md",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/docx-md",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=docx-md",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "requirements.txt",
      "README.md",
      "SKILL.md",
      "LICENSE.txt",
      "scripts/apply_edits_docx.py",
      "scripts/read_docx.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "docx-md",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T22:19:43.882Z",
      "expiresAt": "2026-05-18T22:19:43.882Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=docx-md",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=docx-md",
        "contentDisposition": "attachment; filename=\"docx-md-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "docx-md"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/docx-md"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/docx-md",
    "downloadUrl": "https://openagent3.xyz/downloads/docx-md",
    "agentUrl": "https://openagent3.xyz/skills/docx-md/agent",
    "manifestUrl": "https://openagent3.xyz/skills/docx-md/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/docx-md/agent.md"
  }
}
```
## Documentation

### Overview

Three entry points: Read – output compact Markdown (default, token-efficient) or full JSON; Modify – apply AI-returned edits to the docx; Finalize – accept all revisions and remove all comments. Implemented via OOXML (ZIP + XML). No commercial Word libraries required.

### Workflow

GoalActionGet document for AIRead: run read script → Markdown (default) or JSON. Markdown includes <!-- b:N --> blockIndex markers for edit targeting.Apply AI edits to docxModify: run apply script with docx + edits JSON → new docx with track changes and comments.Deliver final versionFinalize: run finalize script → new docx with no revisions/comments.

### LLM-oriented pipeline

Read – Parse docx; output Markdown (default) or JSON. Markdown uses <!-- b:N --> prefix per block; revisions: {+inserted+} {-deleted-}; comments: [comment: text].
Send the output + task prompt to the model; require the model to output only the edit JSON: blockIndex, originalContent, content, basis .
Modify – Script infers op from blockIndex, originalContent, content, basis; converts to OOXML (w:ins / w:del / comment anchors), then write back to Word.
Finalize – When the user confirms, run finalize to accept all revisions and remove all comments.

See references/llm-pipeline.md for the Markdown format, JSON schema, and edit format.

### 1. Read

Parse word/document.xml (w:body only) and word/comments.xml.
Output Markdown (default) or JSON. Markdown is compact and token-efficient.

Script: scripts/read_docx.py

# Default: Markdown output (token-efficient)
python3 skills/docx-md/scripts/read_docx.py document.docx
python3 skills/docx-md/scripts/read_docx.py document.docx -o result.md

# JSON output (full structure)
python3 skills/docx-md/scripts/read_docx.py document.docx -f json -o result.json

Options:

-o, --output – Output path (default: stdout)
-f, --format – md (default) or json

### 2. Modify

Input: docx path + edit JSON { modifications: [{ blockIndex, originalContent, content, basis }] } (same blockIndex as read output).
Flow: Convert JSON to OOXML (w:ins / w:del / comments), then write back to Word.

Script: scripts/apply_edits_docx.py. Use - as edits file to read JSON from stdin.

python3 skills/docx-md/scripts/apply_edits_docx.py document.docx edits.json -o output.docx
python3 skills/docx-md/scripts/apply_edits_docx.py document.docx - -o output.docx  # stdin

Options: --author (default: "Review")

### 3. Finalize

Accept all revisions (flatten to final text), remove all comments. Save as new docx.
Uses docx-revisions to accept revisions (preserves encoding), then removes comment markup via regex on raw bytes.

Script: scripts/finalize_docx.py

Requires: pip install docx-revisions (see requirements.txt)

python3 skills/docx-md/scripts/finalize_docx.py input.docx -o output.docx

### scripts/

read_docx.py – Read: python3 scripts/read_docx.py document.docx [-o out.md] [-f md|json]
apply_edits_docx.py – Modify: python3 scripts/apply_edits_docx.py document.docx edits.json -o output.docx
finalize_docx.py – Finalize: python3 scripts/finalize_docx.py input.docx -o output.docx

### references/

ooxml.md – OOXML layout (document.xml, comments.xml, revisions, comments)
llm-pipeline.md – Pipeline: read → Markdown/JSON → model edits → modify; defines Markdown format, JSON shape (blockIndex, originalContent, content, basis)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: yanweiliang323868-del
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-11T22:19:43.882Z
- Expires at: 2026-05-18T22:19:43.882Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/docx-md)
- [Send to Agent page](https://openagent3.xyz/skills/docx-md/agent)
- [JSON manifest](https://openagent3.xyz/skills/docx-md/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/docx-md/agent.md)
- [Download page](https://openagent3.xyz/downloads/docx-md)