officecli

officecli is a skill for Claude Code, Codex from CHENyiru3/AI-Skills-Collections. It costs 58 tokens per session (692 once invoked), scanned A, original, MIT.

A command-line tool for creating, inspecting, checking, and editing Microsoft Office files such as Word documents, Excel spreadsheets, and PowerPoint presentations. It can work with document structure and properties through commands.

In plain words
What is it for?
Use it to view, query, validate, create, and modify `.docx`, `.xlsx`, and `.pptx` files, including spreadsheet or presentation content and formatting.
Why use it?
It lets an agent examine or change Office files locally and validate the result, with a progression from reading to structured edits and lower-level XML changes.

Skill for Claude CodeCodex

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

Good fit Use it to view, query, validate, create, and modify .docx, .xlsx, and .pptx files, including spreadsheet or presentation content and formatting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chenyiru3/ai-skills-collections/officecli
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 CHENyiru3/AI-Skills-Collections --skill officecli
Clone the repo
git clone --depth 1 https://github.com/CHENyiru3/AI-Skills-Collections

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 officecli

README.md
[![agentmods](https://agentmods.dev/badge/skills/chenyiru3/ai-skills-collections/officecli/github.svg)](https://agentmods.dev/skills/chenyiru3/ai-skills-collections/officecli)
Your own site
<a href="https://agentmods.dev/skills/chenyiru3/ai-skills-collections/officecli"><img src="https://agentmods.dev/badge/skills/chenyiru3/ai-skills-collections/officecli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for officecli

Your own site · 80×15
<a href="https://agentmods.dev/skills/chenyiru3/ai-skills-collections/officecli"><img src="https://agentmods.dev/badge/skills/chenyiru3/ai-skills-collections/officecli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 692 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.
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.00058 $0.00692
Opus 5.5 $0.00023 $0.00277
Sonnet 5.5 $0.00012 $0.00138
Haiku 4.5 $0.00006 $0.00069

Measured 6d ago against content hash dea4a55d47e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 6d 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.

skills-market/documents/office/officecli/SKILL.md · 111 lines

How it starts

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

officecli

Use the local binary at ~/.local/bin/officecli.

First Check

Before using the tool:

command -v officecli
officecli --version

If officecli is missing from PATH, use the absolute path:

$HOME/.local/bin/officecli --version

Strategy

Prefer this progression:

  1. L1 read: view, get, query, validate
  2. L2 DOM edit: set, add, remove, move, swap, batch
  3. L3 raw XML: raw, raw-set, add-part

Always add --json when structured output helps.

Help System

When unsure about element names, paths, or properties, run help instead of guessing:

officecli pptx set
officecli pptx set shape
officecli pptx set shape.fill
officecli docx add
officecli xlsx get

Core Commands

officecli create <file>
officecli view <file> <mode>
officecli get <file> <path> --depth N
officecli query <file> <selector>
officecli set <file> <path> --prop key=value
officecli add <file> <parent> --type <type> --prop key=value
officecli remove <file> <path>
officecli move <file> <path> --to <parent> --index N
officecli swap <file> <path1> <path2>
officecli validate <file>
officecli batch <file>
officecli raw <file> <part>
officecli raw-set <file> <part> --xpath "..." --action replace --xml '<xml/>'

Performance

For 3 or more operations on one file, prefer resident mode:

officecli open file.docx
officecli set file.docx ...
officecli add file.docx ...
officecli close file.docx

For many edits, prefer batch mode:

cat <<'EOF' | officecli batch file.xlsx
[
  {"command":"set","path":"/Sheet1/A1","props":{"value":"Name","bold":"true"}}
]
EOF

Validation

Before considering the document done:

officecli view file.docx issues
officecli validate file.docx

For large files, use targeted reads:

officecli view file.docx text --max-lines 100
officecli view file.xlsx text --start 1 --end 40 --cols A,B,C
officecli view file.pptx text --start 1 --end 5

Specialized Skills

Read the full file on GitHub · 111 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. 6d ago First seen · 111 lines · 58 tokens per session scan A dea4a55d47e2

Subscribe to this mod's changes

officecli is a skill published in the GitHub repository CHENyiru3/AI-Skills-Collections (1 stars, last pushed 7d ago), licensed MIT. It adds 58 tokens to every session and 692 once invoked, about $0.0002 per session on Opus 5.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-10-02.