officecli

A tool for inspecting, validating, editing, filling, and visually checking existing Word, spreadsheet, and presentation files in the .docx, .xlsx, and .pptx formats.

In plain words
What is it for?
Use it to inspect or validate an Office file, apply several structured changes, merge data into a template, or render it for visual review.
Why use it?
It helps verify that Office files are structurally sound and look right after changes. Multi-step edits and template filling happen on a private copy, protecting the original.

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/mateaix/mateclaw/officecli
Any agent
npx skills add mateaix/mateclaw --skill officecli
Clone the repo
git clone --depth 1 https://github.com/mateaix/mateclaw

Made for: Claude Code, Codex.

Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 804 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.00123 $0.00804
Opus 5 $0.00062 $0.00402
Sonnet 5 $0.00025 $0.00161
Haiku 4.5 $0.00012 $0.00080

Measured 2d ago against content hash 0894d54abd29, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

officecli 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 2d ago.

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.

mateclaw-server/src/main/resources/skills/officecli/SKILL.md · 97 lines

How it starts

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

OfficeCLI advanced Office operations

This skill supplements MateClaw's native Office renderers. It never replaces them.

Routing

User intent Use
Create a simple new document from Markdown renderDocx, renderXlsx, or renderPptx
Inspect an existing Office file office_document(action="inspect")
Validate OpenXML structure office_document(action="validate")
Apply several structured changes office_document(action="batch")
Fill an existing template's placeholders office_document(action="merge")
Render for visual QA office_document(action="render")

Safety contract

  • batch and merge operate on a private copy and never overwrite the source.
  • The tool only accepts .docx, .xlsx, and .pptx inputs inside the active workspace or current chat uploads.
  • Do not install OfficeCLI from inside a chat. If the dependency is missing, explain that an administrator must install it on the MateClaw server.
  • Do not fall back to arbitrary shell commands when office_document rejects an action.
  • Return the generated markdown link verbatim so the user can download and preview the result.

Operations

Inspect

Use one of outline, stats, issues, text, or annotated:

office_document(action="inspect", filePath="report.docx", mode="issues")

Validate

office_document(action="validate", filePath="workbook.xlsx")

Batch edit

payload must be a non-empty OfficeCLI batch JSON array. Prefer stable element IDs returned by inspection over positional paths when available.

office_document(
  action="batch",
  filePath="deck.pptx",
  payload="[{\"command\":\"set\",\"path\":\"/slide[1]/shape[@id=42]\",\"props\":{\"text\":\"Updated\"}}]",
  outputFilename="deck-updated.pptx"
)

Template merge

payload must be a non-empty JSON object:

office_document(
  action="merge",
  filePath="invoice-template.docx",
  payload="{\"client\":\"Acme\",\"total\":\"$5,200\"}",
  outputFilename="invoice-acme.docx"
)

Read the full file on GitHub · 97 lines

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. 2d ago First seen · 97 lines · 123 tokens per session scan A 0894d54abd29

Subscribe to this mod's changes

officecli is a skill published in the GitHub repository mateaix/mateclaw (1,061 stars, last pushed 2d ago), licensed Apache-2.0. It adds 123 tokens to every session and 804 once invoked, about $0.0006 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

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…

agentscope-ai/QwenPaw · 201 tokens

xlsx

当电子表格文件是主要输入或输出时使用此技能。这意味着用户想要:打开、读取、编辑或修复现有的 .xlsx、.xlsm、.csv 或 .tsv 文件(例如添加列、计算公式、格式化、制图、清理混乱数据);从头创建新的电子表格或从其他数据源创建;或在表格文件格式之间进行转换。当用户通过名称或路径引用电子表格文件时特别触发——即使是随意提及(如"我下载目录里的 xlsx")——并且想对其进行操作或从中生成内容。也适用于将混乱的表格数据文件(格式错误的行、错位的表头、垃圾数据)清理或重构为规范的电子表格。交付物必须是电子表格文件。当主要交付物是 Word 文档、HTML 报告、独立 Python 脚本、数据库管道或 Google Sheets…

agentscope-ai/QwenPaw · 232 tokens

data-analysis

Use this skill when the user uploads Excel (.xlsx/.xls) or CSV files and wants to perform data analysis, generate statistics, create summaries, pivot tables, SQL queries, or any form of structured data exploration. Supports multi-sheet Excel workbooks, aggregation, filtering, joins, and exporting results to…

bytedance/deer-flow · 69 tokens

make-skill

Use this skill when sedimenting a session into a reusable workspace skill. Triggers when the user wants to turn the current conversation, workflow, or troubleshooting path into a SKILL.md. Phrases like 'turn this into a skill', 'remember how I did X', 'save this workflow', 'make a skill from this', and any /make-skill…

agentscope-ai/QwenPaw · 85 tokens

make-skill

用于把当前会话沉淀为可复用的 workspace skill。当用户希望把当前对话、工作流或排错路径写成 SKILL.md 时触发。触发表达包括「把这个变成 skill」「记住我是怎么做 X 的」「保存这个工作流」「make a skill from this」以及任何 /make-skill 调用。.

agentscope-ai/QwenPaw · 84 tokens

terraform-skill

Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code…

agentscope-ai/QwenPaw · 62 tokens