$npx -y skills add iOfficeAI/OfficeCLI --skill officecli-pptxUse this skill any time a .pptx file is involved -- as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file; editing, modifying, or updating existing presentations; combining or splitt
| 1 | # OfficeCLI PPTX Skill |
| 2 | |
| 3 | ## Setup |
| 4 | |
| 5 | If `officecli` is missing: |
| 6 | |
| 7 | - **macOS / Linux**: `curl -fsSL https://d.officecli.ai/install.sh | bash` |
| 8 | - **Windows (PowerShell)**: `irm https://d.officecli.ai/install.ps1 | iex` |
| 9 | |
| 10 | Verify with `officecli --version` (open a new terminal if PATH hasn't picked up). If install fails, download a binary from https://github.com/iOfficeAI/OfficeCLI/releases. |
| 11 | |
| 12 | ## ⚠️ Help-First Rule |
| 13 | |
| 14 | **This skill teaches what good slides look like, not every command flag. When a property name, enum value, or alias is uncertain, consult help BEFORE guessing.** |
| 15 | |
| 16 | ```bash |
| 17 | officecli help pptx # List all pptx elements |
| 18 | officecli help pptx <element> # Full element schema (e.g. shape, chart, animation, connector, zoom, group) |
| 19 | officecli help pptx <verb> <element> # Verb-scoped (e.g. add shape, set slide) |
| 20 | officecli help pptx <element> --json # Machine-readable schema |
| 21 | ``` |
| 22 | |
| 23 | Help reflects the installed CLI version. When skill and help disagree, **help is authoritative**. Triggers to run help immediately: `UNSUPPORTED props:` warning, unknown animation preset, `connector.shape=` enum drifts, prop-vs-alias (`lineWidth` vs `line.width`, `color` vs `font.color`). |
| 24 | |
| 25 | ## Shell & Execution Discipline |
| 26 | |
| 27 | **Shell quoting (zsh / bash).** ALWAYS quote element paths (`"/slide[1]/..."`) — zsh globs unquoted `[1]` to `no matches found`. Escaping happens at three layers — keep them separate (the CLI handles the second for you): |
| 28 | |
| 29 | 1. **Shell.** `$` in a value still belongs to the shell — single-quote the whole value: `--prop text='$15M'`. Double-quoted `"$15M"` gets expanded to `M`. The CLI does NOT unescape `\$` for you. |
| 30 | 2. **CLI (`text=`).** The two-char escapes `\n` and `\t` ARE interpreted, consistently across pptx / docx / xlsx — `\n` is a line / paragraph break, `\t` is a tab. To produce a literal backslash-n in text, double it (`\\n`); this is rarely what you want. |
| 31 | 3. **JSON (batch heredoc).** The recipes below pipe `cat <<EOF | officecli batch` **unquoted** so `$SLIDE` / `$FILE` expand inside the body. That same unquoted heredoc also expands a literal `$` in a value: `"$1.42"` silently becomes `.42` and `"$2.4B"` becomes `.4B` (`$1` / `$2` are empty shell params). **Escape currency as `\$`** — `"text":"\$1.42"` — which still lets `$SLIDE` expand. `\n` / `\t` inside the JSON work either way. A fully-quoted `<<'EOF'` protects every `$` but then `$SLIDE` won't expand, so only use it when the body has no shell variables. After writing money values, `view text` and confirm the `$` survived. |
| 32 | |
| 33 | If in doubt, `view text` after writing and compare character-for-character. |
| 34 | |
| 35 | **Incremental execution.** One command → check exit code → continue. A 50-command script that fails at command 3 cascades silently. After any structural op (new slide, chart, animation, connector) run `get` before stacking more. |
| 36 | |
| 37 | ## Requirements for Outputs |
| 38 | |
| 39 | These are the deliverable standards every deck MUST meet. Violating any one = not done, regardless of content quality. |
| 40 | |
| 41 | ### All decks |
| 42 | |
| 43 | **One idea per slide.** If a slide needs a second title to explain what it covers, split it. Dense "everything about X" slides lose the audience inside 3 seconds. Use a section divider to group related one-idea slides, not a mega-slide. |
| 44 | |
| 45 | **Explicit type hierarchy — do NOT rely on theme defaults.** Theme defaults drift between masters. Set sizes explicitly on every text shape. |
| 46 | |
| 47 | | Element | Minimum | Typical | Min shape height | |
| 48 | |---|---|---|---| |
| 49 | | Slide title | **≥ 36pt** bold | 36–44pt | ≥ 2cm | |
| 50 | | Section / subtitle | ≥ 20pt | 20–24pt | ≥ 1.2cm | |
| 51 | | Body text | **≥ 18pt** | 18–22pt | ≥ 1cm | |
| 52 | | Caption / axis label | ≥ 10pt muted | 10–12pt | ≥ 0.6cm | |
| 53 | |
| 54 | Rule of thumb: **min shape height ≈ font_pt × 0.05cm**. An 18pt sublabel in a 0.8cm-tall box will overflow — `view annotated` catches this. |
| 55 | |
| 56 | Title must be **≥ 2× body size** (36pt over 20pt works; 28pt over 20pt looks timid). Four legit exceptions to body ≥ 18pt: chart axis labels, legends, footer / page number, and ≤ 5-word KPI sublabels (e.g. "Active users"). Descriptive sentences must be ≥ 18pt. Left-align body; center only titles and hero numbers. If "the cards won't fit", drop cards instead of shrinking font. |
| 57 | |
| 58 | **Two fonts max, one palette.** One heading font + one body font (e.g. Georgia + Calibri) — a third *display* face is fine only for big numerals or the cover title, as long as that heading+body pair stays intact. One dominant brand color (60–70% weight) + one supporting + o |