{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/docx-md",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=docx-md",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "requirements.txt",
      "README.md",
      "SKILL.md",
      "LICENSE.txt",
      "scripts/apply_edits_docx.py",
      "scripts/read_docx.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/docx-md",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "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."
      },
      {
        "title": "Workflow",
        "body": "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."
      },
      {
        "title": "LLM-oriented pipeline",
        "body": "Read – Parse docx; output Markdown (default) or JSON. Markdown uses <!-- b:N --> prefix per block; revisions: {+inserted+} {-deleted-}; comments: [comment: text].\nSend the output + task prompt to the model; require the model to output only the edit JSON: blockIndex, originalContent, content, basis .\nModify – Script infers op from blockIndex, originalContent, content, basis; converts to OOXML (w:ins / w:del / comment anchors), then write back to Word.\nFinalize – When the user confirms, run finalize to accept all revisions and remove all comments.\n\nSee references/llm-pipeline.md for the Markdown format, JSON schema, and edit format."
      },
      {
        "title": "1. Read",
        "body": "Parse word/document.xml (w:body only) and word/comments.xml.\nOutput Markdown (default) or JSON. Markdown is compact and token-efficient.\n\nScript: scripts/read_docx.py\n\n# Default: Markdown output (token-efficient)\npython3 skills/docx-md/scripts/read_docx.py document.docx\npython3 skills/docx-md/scripts/read_docx.py document.docx -o result.md\n\n# JSON output (full structure)\npython3 skills/docx-md/scripts/read_docx.py document.docx -f json -o result.json\n\nOptions:\n\n-o, --output – Output path (default: stdout)\n-f, --format – md (default) or json"
      },
      {
        "title": "2. Modify",
        "body": "Input: docx path + edit JSON { modifications: [{ blockIndex, originalContent, content, basis }] } (same blockIndex as read output).\nFlow: Convert JSON to OOXML (w:ins / w:del / comments), then write back to Word.\n\nScript: scripts/apply_edits_docx.py. Use - as edits file to read JSON from stdin.\n\npython3 skills/docx-md/scripts/apply_edits_docx.py document.docx edits.json -o output.docx\npython3 skills/docx-md/scripts/apply_edits_docx.py document.docx - -o output.docx  # stdin\n\nOptions: --author (default: \"Review\")"
      },
      {
        "title": "3. Finalize",
        "body": "Accept all revisions (flatten to final text), remove all comments. Save as new docx.\nUses docx-revisions to accept revisions (preserves encoding), then removes comment markup via regex on raw bytes.\n\nScript: scripts/finalize_docx.py\n\nRequires: pip install docx-revisions (see requirements.txt)\n\npython3 skills/docx-md/scripts/finalize_docx.py input.docx -o output.docx"
      },
      {
        "title": "scripts/",
        "body": "read_docx.py – Read: python3 scripts/read_docx.py document.docx [-o out.md] [-f md|json]\napply_edits_docx.py – Modify: python3 scripts/apply_edits_docx.py document.docx edits.json -o output.docx\nfinalize_docx.py – Finalize: python3 scripts/finalize_docx.py input.docx -o output.docx"
      },
      {
        "title": "references/",
        "body": "ooxml.md – OOXML layout (document.xml, comments.xml, revisions, comments)\nllm-pipeline.md – Pipeline: read → Markdown/JSON → model edits → modify; defines Markdown format, JSON shape (blockIndex, originalContent, content, basis)"
      }
    ],
    "body": "Word DOCX (OOXML) – docx-md\nOverview\n\nThree 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.\n\nWorkflow\nGoal\tAction\nGet document for AI\tRead: run read script → Markdown (default) or JSON. Markdown includes <!-- b:N --> blockIndex markers for edit targeting.\nApply AI edits to docx\tModify: run apply script with docx + edits JSON → new docx with track changes and comments.\nDeliver final version\tFinalize: run finalize script → new docx with no revisions/comments.\nLLM-oriented pipeline\nRead – Parse docx; output Markdown (default) or JSON. Markdown uses <!-- b:N --> prefix per block; revisions: {+inserted+} {-deleted-}; comments: [comment: text].\nSend the output + task prompt to the model; require the model to output only the edit JSON: blockIndex, originalContent, content, basis .\nModify – Script infers op from blockIndex, originalContent, content, basis; converts to OOXML (w:ins / w:del / comment anchors), then write back to Word.\nFinalize – When the user confirms, run finalize to accept all revisions and remove all comments.\n\nSee references/llm-pipeline.md for the Markdown format, JSON schema, and edit format.\n\n1. Read\nParse word/document.xml (w:body only) and word/comments.xml.\nOutput Markdown (default) or JSON. Markdown is compact and token-efficient.\n\nScript: scripts/read_docx.py\n\n# Default: Markdown output (token-efficient)\npython3 skills/docx-md/scripts/read_docx.py document.docx\npython3 skills/docx-md/scripts/read_docx.py document.docx -o result.md\n\n# JSON output (full structure)\npython3 skills/docx-md/scripts/read_docx.py document.docx -f json -o result.json\n\n\nOptions:\n\n-o, --output – Output path (default: stdout)\n-f, --format – md (default) or json\n2. Modify\nInput: docx path + edit JSON { modifications: [{ blockIndex, originalContent, content, basis }] } (same blockIndex as read output).\nFlow: Convert JSON to OOXML (w:ins / w:del / comments), then write back to Word.\n\nScript: scripts/apply_edits_docx.py. Use - as edits file to read JSON from stdin.\n\npython3 skills/docx-md/scripts/apply_edits_docx.py document.docx edits.json -o output.docx\npython3 skills/docx-md/scripts/apply_edits_docx.py document.docx - -o output.docx  # stdin\n\n\nOptions: --author (default: \"Review\")\n\n3. Finalize\nAccept all revisions (flatten to final text), remove all comments. Save as new docx.\nUses docx-revisions to accept revisions (preserves encoding), then removes comment markup via regex on raw bytes.\n\nScript: scripts/finalize_docx.py\n\nRequires: pip install docx-revisions (see requirements.txt)\n\npython3 skills/docx-md/scripts/finalize_docx.py input.docx -o output.docx\n\nResources\nscripts/\nread_docx.py – Read: python3 scripts/read_docx.py document.docx [-o out.md] [-f md|json]\napply_edits_docx.py – Modify: python3 scripts/apply_edits_docx.py document.docx edits.json -o output.docx\nfinalize_docx.py – Finalize: python3 scripts/finalize_docx.py input.docx -o output.docx\nreferences/\nooxml.md – OOXML layout (document.xml, comments.xml, revisions, comments)\nllm-pipeline.md – Pipeline: read → Markdown/JSON → model edits → modify; defines Markdown format, JSON shape (blockIndex, originalContent, content, basis)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/yanweiliang323868-del/docx-md",
    "publisherUrl": "https://clawhub.ai/yanweiliang323868-del/docx-md",
    "owner": "yanweiliang323868-del",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}