docx

docx is a skill for Claude Code, Codex from zhixuli0406/DuDuClaw. It costs 34 tokens per session (1,276 once invoked), scanned A, original, Apache-2.0.

A tool for reading, creating, and converting Microsoft Word documents. DOCX is the standard file format used by modern versions of Word.

In plain words
What is it for?
Extracting document text and tables, creating Word reports from Markdown or JSON, and converting DOCX files to PDF.
Why use it?
It removes the need to handle document text and tables by hand when summarising or producing reports. It can also create a PDF version for delivery.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Extracting document text and tables, creating Word reports from Markdown or JSON, and converting DOCX files to PDF.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhixuli0406/duduclaw/docx
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zhixuli0406/DuDuClaw --skill docx
Clone the repo
git clone --depth 1 https://github.com/zhixuli0406/DuDuClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docx

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhixuli0406/duduclaw/docx.svg)](https://agentmods.dev/skills/zhixuli0406/duduclaw/docx)
Your own site
<a href="https://agentmods.dev/skills/zhixuli0406/duduclaw/docx"><img src="https://agentmods.dev/badge/skills/zhixuli0406/duduclaw/docx.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,276 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.01276
Opus 5 $0.00017 $0.00638
Sonnet 5 $0.00007 $0.00255
Haiku 4.5 $0.00003 $0.00128

Measured 8d ago against content hash 700030cb8070, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

docx scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/create.py, scripts/extract.py, scripts/to_pdf.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

crates/duduclaw-agent/src/builtin_skills/docx/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Word (.docx) 文件處理

處理 .docx 檔案的三件事:讀取抽取建立轉換 PDF。所有腳本用 uv run 執行,依賴以 PEP 723 inline metadata 宣告(python-docx),uv 會自動 建立隔離環境;uv 不存在時改用 pip install python-docxpython3 執行。

何時使用

  • 收到 .docx 附件,需要讀出內容或表格來彙總、分析。
  • 要把彙總結果、報告產出成一份 Word 文件回傳給使用者。
  • 需要把 Word 轉成 PDF 交付。

腳本

腳本位於本技能的 scripts/ 目錄(相對於此 SKILL.md)。兩種執行路徑,依你有沒有 Bash 工具擇一:

  • 有 Bash / shell 工具 → 直接跑 uv run scripts/<script>.py ...(見下方各節)。

  • 沒有 Bash / shell 工具(API 模式後端,如 Grok / DeepSeek / MiniMax)不要只回文字, 改用 office_script MCP 工具在伺服器端跑同一支腳本:

    • skilldocx
    • scriptcreate / extract / to_pdf(不含路徑,.py 可省略)
    • args:字串陣列,等同 uv run 後面那串參數;任何路徑須落在你的 agent 目錄或其 attachments/

    例(把報告做成 Word):

    {"skill": "docx", "script": "create",
     "args": ["report.md", "--out", "/你的agent目錄/attachments/report.docx"]}
    

    工具以 uv run(uv 不存在時退回 python3)在你的 agent 目錄內執行並回傳腳本 stdout; 產出檔案後務必依下方 📎DELIVER 協定交付。

1. 讀取抽取 — extract.py

uv run scripts/extract.py <input.docx> --format json   # 依文件順序的 blocks
uv run scripts/extract.py <input.docx> --format md      # markdown 純文字

json 輸出 {"blocks": [{"type":"heading"|"paragraph"|"bullet"|"table", ...}]}依 document body 的實際順序(標題/段落/清單/表格交錯,不重新分組);md 把同一組 blocks 轉成可直接閱讀的 markdown。此 JSON 即 create.py 的輸入格式, 故 extract → create 可往返。

2. 建立 — create.py

從 markdown 或 JSON 來源檔建立 .docx(來源型別依副檔名判定,.json → JSON, 其餘 → markdown):

uv run scripts/create.py report.md --out /abs/path/report.docx
uv run scripts/create.py spec.json --out /abs/path/report.docx

markdown 支援 #/##/### 標題、清單 - 、以及 | 分隔的表格。

3. 轉 PDF — to_pdf.py

用 LibreOffice headless 轉換:

uv run scripts/to_pdf.py <input.docx> --outdir <dir>

未安裝 LibreOffice(soffice)時,腳本會明確回報「LibreOffice 未安裝,僅轉換 功能不可用;讀取與建立功能不受影響」並以非零碼結束 — 不是靜默失敗。

交付檔案給使用者(📎DELIVER 協定)

產出檔案後,在回覆的最後另起一行加上標記,gateway 會自動把該檔案傳回使用者:

📎DELIVER:/絕對路徑/report.docx

規則:

  • 路徑必須是絕對路徑,且位於你的 agent 工作目錄(或其 attachments/)下。
  • 一行一個檔案,可多行。
  • 標記行不會顯示給使用者;請同時用一般文字說明你做了什麼。
  • API 模式同樣適用:用 office_script 產出 .docx 後,一樣在最後一行輸出 📎DELIVER:<絕對路徑>——只回文字不算完成。

Read the full file on GitHub · 98 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 98 lines · 34 tokens per session scan A 700030cb8070

Subscribe to this mod's changes

docx is a skill published in the GitHub repository zhixuli0406/DuDuClaw (47 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 1,276 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

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…

desirecore/market · 203 tokens

office-router

Route Office requests into the correct xlsx, docx, or pptx workflow, while preferring Slidev for new presentation drafts unless .pptx is explicitly required.

matingai/crab · 38 tokens

docx-edit

Edit or generate docx files using paragraph-oriented V1 office tools first, then escalate to python-docx scripts for richer document structure.

matingai/crab · 31 tokens

document-processing

End-to-end document processing agent skill covering PDF manipulation (extract, merge, split, rotate, watermark, form-fill, OCR), DOCX creation and editing (templates, mail-merge, style management), XLSX spreadsheet handling (formulas, charts, pivot tables, data analysis), PPTX presentation generation (layouts, charts…

JPeetz/agent-skills · 174 tokens

report-generator

Generate professional HTML/PDF investment reports with interactive visualizations.

yennanliu/InvestSkill · 11 tokens

document-processing

Use when the deliverable is a document's bytes or its literal content — text/tables out of PDFs, AcroForm fill and flatten, page merge/split, PDF/DOCX from templates, OCR of image-only scans. NOT schema-typed fields pulled from text (that is structured-extraction), NOT signature routing (e-signature) or spreadsheet…

ericrisco/rsc-harness · 84 tokens