xlsx

A tool for reading, creating, and converting Microsoft Excel workbooks and CSV spreadsheets. CSV is a simple text format for rows and columns, while XLSX is Excel's workbook format.

In plain words
What is it for?
Extracting sheets and tables as JSON or Markdown, building Excel workbooks from structured data, and exporting spreadsheets to PDF.
Why use it?
It avoids manually copying spreadsheet data into analysis or report files. It can also turn spreadsheet results into PDF documents for sharing.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,161 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.01161
Opus 5 $0.00018 $0.00580
Sonnet 5 $0.00007 $0.00232
Haiku 4.5 $0.00004 $0.00116

Measured yesterday against content hash 5c58fe3d1eec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xlsx 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 yesterday.

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/xlsx/SKILL.md · 92 lines

What it actually says

Excel (.xlsx) / CSV 試算表處理

處理試算表的三件事:讀取抽取建立轉換 PDF。腳本用 uv run 執行, 依賴以 PEP 723 inline metadata 宣告(openpyxl);uv 不存在時改用 pip install openpyxlpython3 執行。

何時使用

  • 收到 .xlsx / .csv 附件,需要讀出資料來彙總、計算、分析。
  • 要把彙總或計算結果產出成一份 Excel 活頁簿回傳。
  • 需要把試算表轉成 PDF 交付。

腳本

腳本位於本技能的 scripts/ 目錄。兩種執行路徑,依你有沒有 Bash 工具擇一:

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

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

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

    例(把彙總資料做成 Excel):

    {"skill": "xlsx", "script": "create",
     "args": ["data.json", "--out", "/你的agent目錄/attachments/summary.xlsx"]}
    

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

1. 讀取抽取 — extract.py

uv run scripts/extract.py <input.xlsx> --format json   # 每個工作表 → 二維陣列
uv run scripts/extract.py <input.csv>  --format json
uv run scripts/extract.py <input.xlsx> --format md      # 每個工作表 → markdown table

JSON 輸出 {"sheets": {"Sheet1": [[cell,...],...]}},值保留原始型別(數字/字串)。

2. 建立 — create.py

來源型別依副檔名判定(.csv → CSV,其餘 → JSON):

uv run scripts/create.py data.json --out /abs/out.xlsx
uv run scripts/create.py data.csv  --out /abs/out.xlsx

JSON schema:{"sheets": {"工作表名": [["表頭",...], [值,...], ...]}}。第一列會加粗 作為表頭。

3. 轉 PDF — to_pdf.py

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

未安裝 LibreOffice(soffice)時明確回報未安裝、僅轉換功能不可用,讀取與建立 不受影響(優雅降級,非靜默失敗)。

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

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

📎DELIVER:/絕對路徑/summary.xlsx

路徑須為絕對路徑且位於你的 agent 工作目錄(或其 attachments/)下;標記行不顯示給 使用者,請另用文字說明。

API 模式同樣適用:用 office_script 產出 .xlsx 後,一樣在最後一行輸出 📎DELIVER:<絕對路徑>——只回文字不算完成。

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. yesterday First seen · 92 lines · 37 tokens per session scan A 5c58fe3d1eec

Subscribe to this mod's changes

xlsx is a skill published in the GitHub repository zhixuli0406/DuDuClaw (47 stars, last pushed 8d ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,161 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

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

xlsx-edit

Edit or generate xlsx workbooks using either deterministic V1 office tools or a Python workbook script when higher fidelity is needed.

matingai/crab · 28 tokens

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or…

desirecore/market · 235 tokens

hapo:xlsx

Create, edit, analyze spreadsheets (.xlsx, .csv, .tsv). Use for Excel formulas, data analysis, visualization, formatting, pivot tables, charts, formula recalculation.

haposoft/cafekit · 42 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

processing-excel-files

Edit and create Excel (.xlsx) files while preserving original formatting, merged cells, and styles. Use when working with Excel files, spreadsheets, .xlsx files, or when the user mentions editing Excel without destroying formatting.

zgldh/xlsx-populate-skill · 48 tokens