SKILL.md--- name: officecli description: Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents. --- # officecli AI-friendly CLI for .docx, .xlsx, .pptx. Single binary, no dependencies, no Office installation needed. ## Install If `officecli` is not installed: ```bash # macOS / Linux curl -fsSL https://d.officecli.ai/install.sh | bash # Windows (PowerShell) irm https://d.officecli.ai/install.ps1 | iex ``` Verify with `officecli --version`. If still not found after install, open a new terminal. --- ## Strategy **L1 (read) → L2 (DOM edit) → L3 (raw XML)**. Always prefer higher layers. Add `--json` for structured output. **Before doc work, check Specialized Skills** (bottom of this file). Fundraising decks, academic papers, financial models, dashboards, and Morph animations need their own skill loaded first — `load_skill` once, then proceed. --- ## Help System (IMPORTANT) **When unsure about property names, value formats, or command syntax, ALWAYS run help instead of guessing.** One help query beats guess-fail-retry loops. `officecli help` ≡ `officecli --help`, and `officecli <cmd> --help` ≡ `officecli help <cmd>` — same content. ```bash officecli help # All commands + global options + schema entry points officecli help docx # List all docx elements officecli help docx paragraph # Full schema: properties, aliases, examples, readbacks officecli help docx set paragraph # Verb-filtered: only props usable with `set` officecli help docx paragraph --json # Structured schema (machine-readable) ``` Format aliases: `word`→`docx`, `excel`→`xlsx`, `ppt`/`powerpoint`→`pptx`. Verbs: `add`, `set`, `get`, `query`, `remove`. MCP exposes the same schema via the single `command` string param: `{"command":"help docx paragraph"}` (not a structured `{"format":...,"type":...}` object — the MCP tool has exactly one param, `command`, and passes it through to the CLI verbatim). --- ## Performance: Resident Mode **Every command auto-starts a resident on first access** (60s idle timeout) — file-lock conflicts are automatically avoided. Explicit `open`/`close` is still recommended for longer sessions (12min idle): ```bash officecli open report.docx # explicitly keep in memory officecli set report.docx ... # no file I/O overhead officecli close report.docx # save and release ``` Opt out of auto-start: `OFFICECLI_NO_AUTO_RESIDENT=1`. **Flush only at the non-officecli boundary.** officecli's own reads (`get`/`query`/`view`/`dump`) always see your latest edits, so you never need to save mid-workflow. Run `save` (keeps the resident) or `close` (flush + release) only **before a non-officecli program reads the file** — python-docx/openpyxl, Word, a renderer, delivery/upload. (Idle sessions auto-flush within seconds; `OFFICECLI_RE