[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1FCWRJHZMQVE63FD02YA8":3,"skill-same:01M7F1FCWRJHZMQVE63FD02YA8":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7F1FCWRJHZMQVE63FD02YA8","officecli",null,"Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) with the officecli CLI. Use when the user wants to build, inspect, check formatting, or chart a Word\u002FExcel\u002FPPT file.","rfdiosuao\u002Flom-desktop","rfdiosuao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F190207982?v=4","01M7F1CG2W9D5TCHRQF8VT1Y8G","宇航（贺昂）","01M7F1CG3EKBWF7WXG2B353MW9",15,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fauto-inject\u002Fofficecli\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: officecli\ndescription: Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) with the officecli CLI. Use when the user wants to build, inspect, check formatting, or chart a Word\u002FExcel\u002FPPT file.\n---\n\n> **⚠️ Platform note — read before running any command.** The shell snippets in this skill are written for **macOS \u002F Linux** (bash\u002Fzsh). Always check which OS you are on first. On **Windows** do **not** run them verbatim — the underlying tool\u002FCLI commands are usually cross-platform, but the surrounding shell syntax is not. Translate it to PowerShell before running:\n>\n> | bash (macOS \u002F Linux) | PowerShell (Windows) |\n> | --- | --- |\n> | `a && b` | run as two steps, or `a; if ($?) { b }` |\n> | `cat \u003C\u003C'EOF' \\| tool …` (heredoc) | write the text to a temp file, then pipe\u002Fpass that file to the tool |\n> | `VAR=$(cmd)` … `$VAR` | `$VAR = cmd` … `$VAR` |\n> | `cmd > \u002Fdev\u002Fnull` | `cmd > $null` |\n> | `… \\| grep PAT` | `… \\| Select-String PAT` |\n> | `… \\| jq …` | `… \\| ConvertFrom-Json`, then read the fields |\n> | `python3 x.py` | `python x.py` (or `py x.py`) |\n> | `~\u002Fdir`, `\u002Ftmp` | `$env:USERPROFILE\\dir`, `$env:TEMP` |\n> | `cp` \u002F `mkdir -p` \u002F `rm -rf` | `Copy-Item` \u002F `New-Item -ItemType Directory -Force` \u002F `Remove-Item -Recurse -Force` |\n>\n> If a command has no obvious Windows equivalent, prefer the built-in file\u002FHTTP tools over raw shell.\n\n# officecli\n\nAI-friendly CLI for .docx, .xlsx, .pptx. Single binary, no dependencies, no Office installation needed.\n\n## Install\n\nIf `officecli` is not installed:\n\n```bash\n# macOS \u002F Linux\ncurl -fsSL https:\u002F\u002Fd.officecli.ai\u002Finstall.sh | bash\n\n# Windows (PowerShell)\nirm https:\u002F\u002Fd.officecli.ai\u002Finstall.ps1 | iex\n```\n\nVerify with `officecli --version`. If still not found after install, open a new terminal.\n\n---\n\n## Strategy\n\n**L1 (read) → L2 (DOM edit) → L3 (raw XML)**. Always prefer higher layers. Add `--json` for structured output.\n\n**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.\n\n---\n\n## Help System (IMPORTANT)\n\n**When unsure about property names, value formats, or command syntax, ALWAYS run help instead of guessing.** One help query beats guess-fail-retry loops.\n\n`officecli help` ≡ `officecli --help`, and `officecli \u003Ccmd> --help` ≡ `officecli help \u003Ccmd>` — same content.\n\n```bash\nofficecli help                                  # All commands + global options + schema entry points\nofficecli help docx                             # List all docx elements\nofficecli help docx paragraph                   # Full schema: properties, aliases, examples, readbacks\nofficecli help docx set paragraph               # Verb-filtered: only props usable with `set`\nofficecli help docx paragraph --json            # Structured schema (machine-readable)\n```\n\nFormat aliases: `word`→`docx`, `excel`→`xlsx`, `ppt`\u002F`powerpoint`→`pptx`. Verbs: `add`, `set`, `get`, `query`, `remove`. MCP exposes the same schema via `{\"command\":\"help\",\"format\":\"docx\",\"type\":\"paragraph\"}`.\n\n---\n\n## Performance: Resident Mode\n\n**Every command auto-starts a resident on first access** (60s idle timeout) — file-lock conflicts are automatically avoided. Explicit `open`\u002F`close` is still recommended for longer sessions (12min idle):\n```bash\nofficecli open report.docx       # explicitly keep in memory\nofficecli set report.docx ...    # no file I\u002FO overhead\nofficecli close report.docx      # save and release\n```\n\nOpt out of auto-start: `OFFICECLI_NO_AUTO_RESIDENT=1`.\n\n---\n\n## Quick Start\n\n**PPT:**\n```bash\nofficecli create slides.pptx\nofficecli add slides.pptx \u002F --type slide --prop title=\"Q4 Report\" --prop background=1A1A2E\nofficecli add slides.pptx '\u002Fslide[1]' --type shape --prop text=\"Revenue grew 25%\" --prop x=2cm --prop y=5cm --prop font=Arial --prop size=24 --prop color=FFFFFF\n```\n\n**Word:**\n```bash\nofficecli create report.docx\nofficecli add report.docx \u002Fbody --type paragraph --prop text=\"Executive Summary\" --prop style=Heading1\nofficecli add report.docx \u002Fbody --type paragraph --prop text=\"Revenue increased by 25% year-over-year.\"\n```\n\n**Excel:**\n```bash\nofficecli create data.xlsx\nofficecli set data.xlsx \u002FSheet1\u002FA1 --prop value=\"Name\" --prop bold=true\nofficecli set data.xlsx \u002FSheet1\u002FA2 --prop value=\"Alice\"\n```\n\n---\n\n## L1: Create, Read & Inspect\n\n```bash\nofficecli create \u003Cfile>               # Create blank .docx\u002F.xlsx\u002F.pptx (type from extension)\nofficecli view \u003Cfile> \u003Cmode>          # outline | stats | issues | text | annotated | html\nofficecli get \u003Cfile> \u003Cpath> --depth N # Get a node and its children [--json]\nofficecli query \u003Cfile> \u003Cselector>     # CSS-like query\nofficecli validate \u003Cfile>             # Validate against OpenXML schema\n```\n\n### view modes\n\n| Mode | Description | Useful flags |\n|------|-------------|-------------|\n| `outline` | Document structure | |\n| `stats` | Statistics (pages, words, shapes) | |\n| `issues` | Formatting\u002Fcontent\u002Fstructure problems | `--type format\\|content\\|structure`, `--limit N` |\n| `text` | Plain text extraction | `--start N --end N`, `--max-lines N` |\n| `annotated` | Text with formatting annotations | |\n| `html` | Static HTML snapshot — same renderer as `watch`, no server needed | `--browser`, `--page N` (docx), `--start N --end N` (pptx) |\n| `screenshot` \u002F `svg` \u002F `pdf` \u002F `forms` | PNG via headless browser \u002F SVG (pptx slide) \u002F PDF via exporter plugin \u002F form-fields JSON via format-handler plugin | `-o`, `--screenshot-width\u002F-height`, pptx `--grid N` |\n\nUse `view html` for one-shot snapshots (CI artifacts, archival, diffing); use `watch` when you need live refresh or browser-side click-to-select.\n\n### get\n\nAny XML path via element localName. Use `--depth N` to expand children. Add `--json` for structured output. Default text output is grep-friendly: `path (type) \"text\" key=val key=val ...`\n\n```bash\nofficecli get report.docx '\u002Fbody\u002Fp[3]' --depth 2 --json\nofficecli get slides.pptx '\u002Fslide[1]' --depth 1          # list all shapes on slide 1\nofficecli get data.xlsx '\u002FSheet1\u002FB2' --json\n```\n\n### Stable ID Addressing\n\nElements with stable IDs return `@attr=value` paths instead of positional indices. Prefer these in multi-step workflows — positional indices shift on insert\u002Fdelete, stable IDs do not.\n\n```\n\u002Fslide[1]\u002Fshape[@id=550950021]                    # PPT shape\n\u002Fslide[1]\u002Ftable[@id=1388430425]\u002Ftr[1]\u002Ftc[2]       # PPT table\n\u002Fbody\u002Fp[@paraId=1A2B3C4D]                         # Word paragraph\n\u002Fcomments\u002Fcomment[@commentId=1]                    # Word comment\n```\n\nPPT also accepts `@name=` (e.g. `shape[@name=Title 1]`), with morph `!!` prefix awareness. Elements without stable IDs (slide, run, tr\u002Ftc, row) fall back to positional indices.\n\n### query\n\nCSS-like selectors: `[attr=value]`, `[attr!=value]`, `[attr~=text]`, `[attr>=value]`, `[attr\u003C=value]`, `:contains(\"text\")`, `:empty`, `:has(formula)`, `:no-alt`. Boolean `and`\u002F`or` supported across `query`\u002F`set`\u002F`remove`: `cell[value>5000 or value\u003C100]`, `cell[(type=Number or type=Date) and value>0]`. Excel row-by-column-name: `Sheet1!row[Salary>5000]`. `set` accepts selectors and Excel-native paths (parity with `get`\u002F`query`). Bare unscoped selectors rejected on `set`\u002F`remove`.\n\n```bash\nofficecli query report.docx 'paragraph[style=Normal] > run[font!=Arial]'\nofficecli query slides.pptx 'shape[fill=FF0000]'\n```\n\n---\n\n## Watch & Interactive Selection\n\nLive HTML preview that auto-refreshes on every file change. Browsers can click \u002F shift-click \u002F box-drag to select shapes; the CLI can read the current browser selection and act on it.\n\n```bash\nofficecli watch \u003Cfile> [--port N]      # Start preview server (default port 26315)\nofficecli unwatch \u003Cfile>               # Stop\nofficecli goto \u003Cfile> \u003Cpath>           # Scroll watching browser(s) to element (docx: p \u002F table \u002F tr \u002F tc)\n```\n\nOpen the printed `http:\u002F\u002Flocalhost:N` URL. Click to select; shift\u002Fcmd\u002Fctrl+click to multi-select; drag from empty space to box-select. PPT\u002FWord use blue outline; Excel uses native-style green selection (double-click cell to edit inline; drag a chart to reposition).\n\n### `get \u003Cfile> selected` — read what the user clicked\n\n```bash\nofficecli get \u003Cfile> selected [--json]\n```\n\nReturns DocumentNodes for whatever is currently selected. Empty result if nothing selected. Exit code != 0 if no watch is running.\n\n```bash\n# User clicks shapes in the browser, then asks \"make these red\"\nPATHS=$(officecli get deck.pptx selected --json | jq -r '.data.Results[].path')\nfor p in $PATHS; do officecli set deck.pptx \"$p\" --prop fill=FF0000; done\n```\n\n### Key properties\n\n- **Selection survives file edits.** Paths use stable `@id=` form.\n- **All connected browsers share one selection.** Last-write-wins.\n- **Same-file single-watch.** A given file can have only one watch process at a time.\n- **Group shapes select as a whole.** Drilling into individual children of a group is not supported in v1.\n- **Coverage:** `.pptx` shapes\u002Fpictures\u002Ftables\u002Fcharts\u002Fconnectors\u002Fgroups; `.docx` top-level paragraphs and tables. Inherited layout\u002Fmaster decorations and Word nested elements (table cells, run-level) are not addressable. **`.xlsx` does not emit `data-path`** — `mark`\u002F`selection` on xlsx always resolve `stale=true` (v2 candidate).\n\n### Marks — edit proposals waiting for review\n\nUse `mark` when changes need human review BEFORE they hit the file. Marks live in the watch process only; a separate `set` pipeline applies accepted ones. For one-shot changes use `set` directly; for permanent file annotations use `add --type comment` (Word native).\n\n```bash\nofficecli mark \u003Cfile> \u003Cpath> [--prop find=... color=... note=... tofix=... regex=true] [--json]\nofficecli unmark \u003Cfile> [--path \u003Cp> | --all] [--json]\nofficecli get-marks \u003Cfile> [--json]\n```\n\nProps: `find` (literal or regex when `regex=true`; raw form `find='r\"[abc]\"'`), `color` (hex \u002F `rgb(...)` \u002F 22 named whitelist), `note`, `tofix` (drives apply pipeline). **Path** must be `data-path` format from watch HTML — see subskills for full pipeline.\n\n---\n\n## L2: DOM Operations\n\n### set — modify properties\n\n```bash\nofficecli set \u003Cfile> \u003Cpath> --prop key=value [--prop ...]\n```\n\n**Any XML attribute is settable** via element path (found via `get --depth N`) — even attributes not currently present. Without `find=`, `set` applies format to the entire element.\n\n**Value formats:**\n\n| Type | Format | Examples |\n|------|--------|---------|\n| Colors | Hex (with\u002Fwithout `#`), named, RGB, theme | `FF0000`, `#FF0000`, `red`, `rgb(255,0,0)`, `accent1`..`accent6` |\n| Spacing | Unit-qualified | `12pt`, `0.5cm`, `1.5x`, `150%` |\n| Dimensions | EMU or suffixed | `914400`, `2.54cm`, `1in`, `72pt`, `96px` |\n\n**Dotted-attr aliases** — `font.\u003Cattr>` forms accepted on shape\u002Frun\u002Fparagraph\u002Ftable\u002Frow\u002Fcell\u002Fsection\u002Fstyles, e.g. `--prop font.color=red --prop font.bold=true --prop font.size=14pt`. Run `officecli help \u003Cfmt> \u003Celement>` for the full list.\n\n### find — format or replace matched text\n\nUse top-level `--find` \u002F `--replace` on `set` (and `--find` on `query`). Legacy `--prop find=X` still works but emits a hint.\n\n```bash\n# Format matched text (auto-splits runs)\nofficecli set doc.docx '\u002Fbody\u002Fp[1]' --find weather --prop bold=true --prop color=red\n\n# Regex matching (regex= still a prop flag)\nofficecli set doc.docx '\u002Fbody\u002Fp[1]' --find '\\d+%' --prop regex=true --prop color=red\n\n# Replace text (use `\u002F` for whole-document scope)\nofficecli set doc.docx \u002F --find draft --replace final\n\n# docx: tracked Find&Replace\nofficecli set doc.docx \u002F --find draft --replace final --prop revision.author=Alice\n\n# PPT — same syntax, different paths\nofficecli set slides.pptx \u002F --find draft --replace final\n```\n\n**Path controls search scope:** `\u002F` = whole document, `\u002Fbody\u002Fp[1]` or `\u002Fslide[N]\u002Fshape[M]` = specific element, `\u002Fheader[1]` \u002F `\u002Ffooter[1]` = headers\u002Ffooters.\n\n**Notes:**\n- Case-sensitive by default. Case-insensitive: `--prop 'find=(?i)error' --prop regex=true`\n- Matches work across run boundaries\n- No match = silent success. `--json` includes `\"matched\": N`\n- **Excel:** only `find` + `replace` supported (no find + format props)\n\n### add — add elements or clone\n\n```bash\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> [--prop ...]\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> --after \u003Cpath> [--prop ...]   # insert after anchor\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> --before \u003Cpath> [--prop ...]  # insert before anchor\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> --index N [--prop ...]        # 0-based position (legacy)\nofficecli add \u003Cfile> \u003Cparent> --from \u003Cpath>                               # clone existing element\n```\n\n`--after`, `--before`, `--index` are mutually exclusive. No position flag = append to end.\n\n**Element types (with aliases):**\n\n| Format | Types |\n|--------|-------|\n| **pptx** | slide (incl. hidden), shape (font.latin\u002Fea\u002Fcs, direction=rtl, underline.color, highlight=COLOR (Add\u002FSet\u002FGet\u002FHTML preview), effective.X+effective.X.src; arrow alias for rightArrow; slideMaster\u002FslideLayout typed add\u002Fset\u002Fremove), picture (SVG, brightness\u002Fcontrast\u002Fglow\u002Fshadow, rotation, link, tooltip), chart (direction=rtl, pieOfPie, barOfPie, axisLine\u002Fgridline per-attr setters, animation+chartBuild=byCategory|bySeries, line dropLines\u002FhiLowLines\u002FupDownBars, anchor=x,y,w,h shorthand), table (cell direction=rtl, fill\u002Fbackground, built-in PowerPoint style catalogue, \u002Fcol[C] get + swap\u002FcopyFrom, row\u002Fcol Move\u002FCopyFrom), row (tr), connector (from\u002Fto accept @name=, startshape\u002Fendshape SetByPath), group (link, tooltip, deep walk by get\u002Fquery\u002Fadd\u002Fremove), video\u002Faudio (loop, autoStart alias), equation, notes (direction=rtl, lang), comment (legacy + modern p188 threaded round-trip), animation (15 emphasis + 16 exit presets, multi-effect chains, motion-path presets, repeat\u002Frestart\u002FautoReverse, chart animations), transition (12 p15 presets + morph\u002Fp14), paragraph (para), run, zoom, ole (preview=, full dump round-trip via add-part+raw-set), placeholder (phType=...), model3d (rotation=ax,ay,az; full dump round-trip), smartart (dump round-trip via add-part). |\n| **docx** | paragraph (direction\u002Ffont.latin\u002Fea\u002Fcs, bold.cs\u002Fitalic.cs\u002Fsize.cs, lang.latin\u002Fea\u002Fcs, wordWrap, framePr.\\*, tabs shorthand), run (lang slots, direction, underline.color, position half-pts, **revision.type=ins\\|del\\|format\\|moveFrom\\|moveTo + revision.action=accept\\|reject** with .author\u002F.date — `\u002Frevision[@author=X]` selector for filtered accept\u002Freject), table (direction=rtl, hMerge, **virtual column ops**: add\u002Fremove\u002Fmove\u002Fcopyfrom on \u002Fbody\u002Ftbl[N]\u002Fcol), row (tr), cell (td), image, header\u002Ffooter (direction), section (pageNumFmt full enum, direction=rtl, rtlGutter, pgBorders=box), bookmark, comment, footnote, endnote, formfield, sdt, chart, equation, field (28 types), hyperlink, style (direction, indents, pbdr, lineSpacing on Add\u002FSet), toc, watermark, break, ole, **num\u002FabstractNum\u002Flvl**, **tab**, **textbox\u002Fshape** (full Add+Get; geometry, fill, line, wrap, alt, anchor, **rotation, verticalText (eaVert\u002Fvert\u002Fvert270\u002FwordArt\\*), gradient, shadow, opacity**), embedded **OLE round-trip on dump→batch**. docDefaults.rtl, autoHyphenation, `get \u002F` exposes locale + \u002Fcomments \u002Ffootnotes \u002Fendnotes. `create --minimal` for raw OOXML scaffolding. |\n| **xlsx** | sheet (visible\u002Fhidden\u002FveryHidden, print margins, printTitleRows\u002FCols, rightToLeft sheetView, cascade-aware rename), row (c{N}= cell-content shorthand; add accepts --from \u002FSheet\u002Fcol[L]; formula-ref rewrite on insert), col (formula-ref rewrite, named-range follow on move), cell (type=richtext+runs, merge=range\u002Fsweep, direction=rtl, phonetic; **--shift left\\|up on remove, shift=right\\|down on add** — Excel UI dialog parity; formula auto-detect; OFFSET\u002FINDIRECT in calc), chart (per-axis RTL\u002Ftitle, anchor=x,y,w,h, pareto), image (SVG), comment (direction=rtl), table (listobject), namedrange (definedname, volatile, `[@name=X]`; formula-body inlined at parse), pivottable (cache CoW + cross-pivot sharing, labelFilter, topN, fillDownLabels, calculatedField), sparkline, validation, autofilter, shape, textbox, CF (databar\u002Fcolorscale\u002Ficonset\u002Fformulacf\u002FcellIs\u002FtopN\u002FaboveAverage), ole, csv. Query supports `merge`\u002F`mergedrange`. Workbook: password. Shape selector enumerates leaves inside grpSp. |\n\n### Pivot tables (xlsx)\n\n```bash\nofficecli add data.xlsx \u002FSheet1 --type pivottable \\\n  --prop source=\"Sheet1!A1:E100\" --prop rows=Region,Category \\\n  --prop cols=Year --prop values=\"Sales:sum,Qty:count\" \\\n  --prop grandTotals=rows --prop subtotals=off --prop sort=asc\n```\n\nKey props: `rows`, `cols`, `values` (Field:func[:showDataAs]), `filters`, `source`, `position`, `layout` (compact\u002Foutline\u002Ftabular), `repeatLabels`, `blankRows`, `aggregate`, `showDataAs` (percent_of_total\u002Frow\u002Fcol, running_total), `grandTotals`, `subtotals`, `sort`. Aggregators: sum, count, average, max, min, product, stdDev, stdDevp, var, varp, countNums. Date columns auto-group. Run `officecli help xlsx pivottable` for full schema.\n\n### Document-level properties (all formats)\n\n```bash\nofficecli set doc.docx \u002F --prop docDefaults.font=Arial --prop docDefaults.fontSize=11pt\nofficecli set doc.docx \u002F --prop protection=forms --prop evenAndOddHeaders=true\nofficecli set data.xlsx \u002F --prop calc.mode=manual --prop calc.refMode=r1c1\nofficecli set slides.pptx \u002F --prop defaultFont=Arial --prop show.loop=true --prop print.what=handouts\n```\n\nRun `officecli help \u003Cformat> \u002F` for all document-level properties (docDefaults, docGrid, CJK spacing, calc, print, show, theme, extended).\n\n### Sort (xlsx)\n\n```bash\nofficecli set data.xlsx \u002FSheet1 --prop sort=\"C desc\" --prop sortHeader=true\nofficecli set data.xlsx '\u002FSheet1\u002FA1:D100' --prop sort=\"A asc\" --prop sortHeader=true\n```\n\nFormat: `COL DIR[, COL DIR ...]`. Rejects ranges with merged cells or formulas. Sidecar metadata (hyperlinks, comments, conditional formatting, drawings) follows rows automatically.\n\n### Text-anchored insert (`--after find:X` \u002F `--before find:X`)\n\nLocate an insertion point by text match within a paragraph. Inline types (run, picture, hyperlink) insert within the paragraph; block types (table, paragraph) auto-split it. PPT only supports inline.\n\n```bash\n# Word: inline run after matched text\nofficecli add doc.docx '\u002Fbody\u002Fp[1]' --type run --after find:weather --prop text=\" (sunny)\"\n\n# Word: block table after matched text (auto-splits paragraph)\nofficecli add doc.docx '\u002Fbody\u002Fp[1]' --type table --after \"find:First sentence.\" --prop rows=2 --prop cols=2\n```\n\n### Clone\n\n`officecli add \u003Cfile> \u002F --from '\u002Fslide[1]'` — copies with all cross-part relationships.\n\n### move, swap, remove\n\n```bash\nofficecli move \u003Cfile> \u003Cpath> [--to \u003Cparent>] [--index N] [--after \u003Cpath>] [--before \u003Cpath>]\nofficecli swap \u003Cfile> \u003Cpath1> \u003Cpath2>\nofficecli remove \u003Cfile> '\u002Fbody\u002Fp[4]'\n```\n\nWhen using `--after` or `--before`, `--to` can be omitted — the target container is inferred from the anchor.\n\n### batch — multiple operations in one save cycle\n\nContinues on error by default (returns exit 1 if any item fails). Use `--stop-on-error` to abort on the first failure. `--force` is the docx-protection bypass.\n\n`officecli dump \u003Cfile> [\u003Cpath>]` emits a replayable batch JSON for round-trip — `.docx` (full coverage) and `.pptx` (text\u002Ftables\u002Fpictures\u002Fcharts\u002Fnotes\u002Ftheme + OLE\u002F3D\u002Fvideo\u002Faudio\u002FSmartArt\u002Fmorph\u002Fp15 transitions via raw-set passthrough). Path defaults to `\u002F` (whole document); pass a subtree path (`\u002Fbody`, `\u002Fbody\u002Fp[N]`, `\u002Fbody\u002Ftbl[N]`, `\u002Ftheme`, `\u002Fsettings`, `\u002Fnumbering`, `\u002Fstyles`) to scope the dump. `officecli refresh \u003Cfile.docx>` recalculates TOC page numbers \u002F PAGE \u002F cross-references after replay (Word backend on Windows; headless-HTML fallback elsewhere). `officecli plugins list` extends support to `.doc`, `.hwpx`, `.pdf` export.\n\n```bash\necho '[\n  {\"command\":\"set\",\"path\":\"\u002FSheet1\u002FA1\",\"props\":{\"value\":\"Name\",\"bold\":\"true\"}},\n  {\"command\":\"set\",\"path\":\"\u002FSheet1\u002FB1\",\"props\":{\"value\":\"Score\",\"bold\":\"true\"}}\n]' | officecli batch data.xlsx --json\n\nofficecli batch data.xlsx --commands '[{\"op\":\"set\",\"path\":\"\u002FSheet1\u002FA1\",\"props\":{\"value\":\"Done\"}}]' --json\nofficecli batch data.xlsx --input updates.json --force --json\n```\n\nSupports: `add`, `set`, `get`, `query`, `remove`, `move`, `swap`, `view`, `raw`, `raw-set`, `validate`. Fields: `command` (or `op`), `path`, `parent`, `type`, `from`, `to`, `index`, `after`, `before`, `props`, `selector`, `mode`, `depth`, `part`, `xpath`, `action`, `xml`.\n\n---\n\n## L3: Raw XML\n\nUse when L2 cannot express what you need. No xmlns declarations needed — prefixes auto-registered.\n\n```bash\nofficecli raw \u003Cfile> \u003Cpart>                          # view raw XML\nofficecli raw-set \u003Cfile> \u003Cpart> --xpath \"...\" --action replace --xml '\u003Cw:p>...\u003C\u002Fw:p>'\nofficecli add-part \u003Cfile> \u003Cparent>                   # create new document part (returns rId)\n```\n\n`raw-set` actions: `append`, `prepend`, `insertbefore`, `insertafter`, `replace`, `remove`, `setattr`. Run `officecli help \u003Cformat> raw` for available parts.\n\n---\n\n## Common Pitfalls\n\n| Pitfall | Correct Approach |\n|---------|-----------------|\n| `--name \"foo\"` | Use `--prop name=\"foo\"` — all attributes go through `--prop` |\n| Unquoted `[N]` paths in zsh\u002Fbash | Always quote: `'\u002Fslide[1]'` or `\"\u002Fslide[1]\"` (shell glob-expands brackets) |\n| PPT `shape[1]` for content | `shape[1]` is typically the title placeholder. Use `shape[2]+` for content shapes |\n| `\u002Fshape[myname]` | Name indexing not supported. Use numeric index or `@name=` (PPT only) |\n| Guessing property names | Run `officecli help \u003Cformat> \u003Celement>` to see exact names |\n| Modifying an open file | Close the file in PowerPoint\u002FWPS first |\n| `\\n` in shell strings | Use `\\\\n` for newlines in `--prop text=\"...\"` |\n| `$` in shell text | `--prop text=\"$15M\"` strips `$15`. Use single quotes: `--prop text='$15M'`, or heredoc batch |\n\n---\n\n## Specialized Skills\n\n`officecli load_skill \u003Cname>` — output is a SKILL.md, follow its rules.\n\n**Loading rule**:\n- Pick the most specific match in \"When to use\"; if none fits, load the format default (`word` \u002F `pptx` \u002F `excel`).\n- Scenes already contain the format default's rules — load **one** skill per artifact, never stack.\n- Loaded rules persist across turns; don't re-load each reply.\n- Two distinct artifacts → two separate loads.\n\n### Word (.docx)\n\n| Name | When to use |\n|------|-------------|\n| `word` | Reports, letters, memos, proposals, generic documents |\n| `academic-paper` | Journal \u002F conference \u002F thesis: APA \u002F Chicago \u002F IEEE \u002F MLA citations, equations, SEQ + PAGEREF cross-refs, multi-column journal layout, bibliography. NOT for business reports or letters (route those to `word`) |\n\n### PowerPoint (.pptx)\n\n| Name | When to use |\n|------|-------------|\n| `pptx` | Generic decks: board reviews, sales decks, all-hands, product launches |\n| `pitch-deck` | **Fundraising only** — seed \u002F Series A-C \u002F SAFE \u002F convertible \u002F strategic raise. NOT for sales \u002F product \u002F board decks (route those to `pptx`) |\n| `morph-ppt` | Cinematic Morph-animated presentations. NOT for static decks (route those to `pptx`) |\n| `morph-ppt-3d` | 3D Morph: GLB models, camera moves, depth. NOT for 2D-only Morph (route those to `morph-ppt`) |\n\n### Excel (.xlsx)\n\n| Name | When to use |\n|------|-------------|\n| `excel` | Generic workbooks, formulas, pivots, trackers |\n| `financial-model` | Financial models, scenarios, projections. NOT for general data analysis (route those to `excel`) |\n| `data-dashboard` | CSV\u002Ftabular data → KPI \u002F analytics \u002F executive dashboards with charts and sparklines. NOT for raw data tracking (route those to `excel`) |\n\nExample: a fundraising deck task → `officecli load_skill pitch-deck` → use the printed rules.\n\n---\n\n## Notes\n\n- Paths are **1-based** (XPath convention): `'\u002Fbody\u002Fp[3]'` = third paragraph\n- `--index` is **0-based** (array convention): `--index 0` = first position\n- **Excel exception**: for `add --type row` and `add --type col`, `--index N` is **1-based** (matches OOXML RowIndex \u002F column letter index). `--index 5` inserts at row 5 \u002F column 5.\n- After modifications, verify with `validate` and\u002For `view issues`\n- **When unsure**, run `officecli help \u003Cformat> \u003Celement>` instead of guessing\n","> **⚠️ Platform note — read before running any command.** The shell snippets in this skill are written for **macOS \u002F Linux** (bash\u002Fzsh). Always check which OS you are on first. On **Windows** do **not** run them verbatim — the underlying tool\u002FCLI commands are usually cross-platform, but the surrounding shell syntax is not. Translate it to PowerShell before running:\n>\n> | bash (macOS \u002F Linux) | PowerShell (Windows) |\n> | --- | --- |\n> | `a && b` | run as two steps, or `a; if ($?) { b }` |\n> | `cat \u003C\u003C'EOF' \\| tool …` (heredoc) | write the text to a temp file, then pipe\u002Fpass that file to the tool |\n> | `VAR=$(cmd)` … `$VAR` | `$VAR = cmd` … `$VAR` |\n> | `cmd > \u002Fdev\u002Fnull` | `cmd > $null` |\n> | `… \\| grep PAT` | `… \\| Select-String PAT` |\n> | `… \\| jq …` | `… \\| ConvertFrom-Json`, then read the fields |\n> | `python3 x.py` | `python x.py` (or `py x.py`) |\n> | `~\u002Fdir`, `\u002Ftmp` | `$env:USERPROFILE\\dir`, `$env:TEMP` |\n> | `cp` \u002F `mkdir -p` \u002F `rm -rf` | `Copy-Item` \u002F `New-Item -ItemType Directory -Force` \u002F `Remove-Item -Recurse -Force` |\n>\n> If a command has no obvious Windows equivalent, prefer the built-in file\u002FHTTP tools over raw shell.\n\n# officecli\n\nAI-friendly CLI for .docx, .xlsx, .pptx. Single binary, no dependencies, no Office installation needed.\n\n## Install\n\nIf `officecli` is not installed:\n\n```bash\n# macOS \u002F Linux\ncurl -fsSL https:\u002F\u002Fd.officecli.ai\u002Finstall.sh | bash\n\n# Windows (PowerShell)\nirm https:\u002F\u002Fd.officecli.ai\u002Finstall.ps1 | iex\n```\n\nVerify with `officecli --version`. If still not found after install, open a new terminal.\n\n---\n\n## Strategy\n\n**L1 (read) → L2 (DOM edit) → L3 (raw XML)**. Always prefer higher layers. Add `--json` for structured output.\n\n**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.\n\n---\n\n## Help System (IMPORTANT)\n\n**When unsure about property names, value formats, or command syntax, ALWAYS run help instead of guessing.** One help query beats guess-fail-retry loops.\n\n`officecli help` ≡ `officecli --help`, and `officecli \u003Ccmd> --help` ≡ `officecli help \u003Ccmd>` — same content.\n\n```bash\nofficecli help                                  # All commands + global options + schema entry points\nofficecli help docx                             # List all docx elements\nofficecli help docx paragraph                   # Full schema: properties, aliases, examples, readbacks\nofficecli help docx set paragraph               # Verb-filtered: only props usable with `set`\nofficecli help docx paragraph --json            # Structured schema (machine-readable)\n```\n\nFormat aliases: `word`→`docx`, `excel`→`xlsx`, `ppt`\u002F`powerpoint`→`pptx`. Verbs: `add`, `set`, `get`, `query`, `remove`. MCP exposes the same schema via `{\"command\":\"help\",\"format\":\"docx\",\"type\":\"paragraph\"}`.\n\n---\n\n## Performance: Resident Mode\n\n**Every command auto-starts a resident on first access** (60s idle timeout) — file-lock conflicts are automatically avoided. Explicit `open`\u002F`close` is still recommended for longer sessions (12min idle):\n```bash\nofficecli open report.docx       # explicitly keep in memory\nofficecli set report.docx ...    # no file I\u002FO overhead\nofficecli close report.docx      # save and release\n```\n\nOpt out of auto-start: `OFFICECLI_NO_AUTO_RESIDENT=1`.\n\n---\n\n## Quick Start\n\n**PPT:**\n```bash\nofficecli create slides.pptx\nofficecli add slides.pptx \u002F --type slide --prop title=\"Q4 Report\" --prop background=1A1A2E\nofficecli add slides.pptx '\u002Fslide[1]' --type shape --prop text=\"Revenue grew 25%\" --prop x=2cm --prop y=5cm --prop font=Arial --prop size=24 --prop color=FFFFFF\n```\n\n**Word:**\n```bash\nofficecli create report.docx\nofficecli add report.docx \u002Fbody --type paragraph --prop text=\"Executive Summary\" --prop style=Heading1\nofficecli add report.docx \u002Fbody --type paragraph --prop text=\"Revenue increased by 25% year-over-year.\"\n```\n\n**Excel:**\n```bash\nofficecli create data.xlsx\nofficecli set data.xlsx \u002FSheet1\u002FA1 --prop value=\"Name\" --prop bold=true\nofficecli set data.xlsx \u002FSheet1\u002FA2 --prop value=\"Alice\"\n```\n\n---\n\n## L1: Create, Read & Inspect\n\n```bash\nofficecli create \u003Cfile>               # Create blank .docx\u002F.xlsx\u002F.pptx (type from extension)\nofficecli view \u003Cfile> \u003Cmode>          # outline | stats | issues | text | annotated | html\nofficecli get \u003Cfile> \u003Cpath> --depth N # Get a node and its children [--json]\nofficecli query \u003Cfile> \u003Cselector>     # CSS-like query\nofficecli validate \u003Cfile>             # Validate against OpenXML schema\n```\n\n### view modes\n\n| Mode | Description | Useful flags |\n|------|-------------|-------------|\n| `outline` | Document structure | |\n| `stats` | Statistics (pages, words, shapes) | |\n| `issues` | Formatting\u002Fcontent\u002Fstructure problems | `--type format\\|content\\|structure`, `--limit N` |\n| `text` | Plain text extraction | `--start N --end N`, `--max-lines N` |\n| `annotated` | Text with formatting annotations | |\n| `html` | Static HTML snapshot — same renderer as `watch`, no server needed | `--browser`, `--page N` (docx), `--start N --end N` (pptx) |\n| `screenshot` \u002F `svg` \u002F `pdf` \u002F `forms` | PNG via headless browser \u002F SVG (pptx slide) \u002F PDF via exporter plugin \u002F form-fields JSON via format-handler plugin | `-o`, `--screenshot-width\u002F-height`, pptx `--grid N` |\n\nUse `view html` for one-shot snapshots (CI artifacts, archival, diffing); use `watch` when you need live refresh or browser-side click-to-select.\n\n### get\n\nAny XML path via element localName. Use `--depth N` to expand children. Add `--json` for structured output. Default text output is grep-friendly: `path (type) \"text\" key=val key=val ...`\n\n```bash\nofficecli get report.docx '\u002Fbody\u002Fp[3]' --depth 2 --json\nofficecli get slides.pptx '\u002Fslide[1]' --depth 1          # list all shapes on slide 1\nofficecli get data.xlsx '\u002FSheet1\u002FB2' --json\n```\n\n### Stable ID Addressing\n\nElements with stable IDs return `@attr=value` paths instead of positional indices. Prefer these in multi-step workflows — positional indices shift on insert\u002Fdelete, stable IDs do not.\n\n```\n\u002Fslide[1]\u002Fshape[@id=550950021]                    # PPT shape\n\u002Fslide[1]\u002Ftable[@id=1388430425]\u002Ftr[1]\u002Ftc[2]       # PPT table\n\u002Fbody\u002Fp[@paraId=1A2B3C4D]                         # Word paragraph\n\u002Fcomments\u002Fcomment[@commentId=1]                    # Word comment\n```\n\nPPT also accepts `@name=` (e.g. `shape[@name=Title 1]`), with morph `!!` prefix awareness. Elements without stable IDs (slide, run, tr\u002Ftc, row) fall back to positional indices.\n\n### query\n\nCSS-like selectors: `[attr=value]`, `[attr!=value]`, `[attr~=text]`, `[attr>=value]`, `[attr\u003C=value]`, `:contains(\"text\")`, `:empty`, `:has(formula)`, `:no-alt`. Boolean `and`\u002F`or` supported across `query`\u002F`set`\u002F`remove`: `cell[value>5000 or value\u003C100]`, `cell[(type=Number or type=Date) and value>0]`. Excel row-by-column-name: `Sheet1!row[Salary>5000]`. `set` accepts selectors and Excel-native paths (parity with `get`\u002F`query`). Bare unscoped selectors rejected on `set`\u002F`remove`.\n\n```bash\nofficecli query report.docx 'paragraph[style=Normal] > run[font!=Arial]'\nofficecli query slides.pptx 'shape[fill=FF0000]'\n```\n\n---\n\n## Watch & Interactive Selection\n\nLive HTML preview that auto-refreshes on every file change. Browsers can click \u002F shift-click \u002F box-drag to select shapes; the CLI can read the current browser selection and act on it.\n\n```bash\nofficecli watch \u003Cfile> [--port N]      # Start preview server (default port 26315)\nofficecli unwatch \u003Cfile>               # Stop\nofficecli goto \u003Cfile> \u003Cpath>           # Scroll watching browser(s) to element (docx: p \u002F table \u002F tr \u002F tc)\n```\n\nOpen the printed `http:\u002F\u002Flocalhost:N` URL. Click to select; shift\u002Fcmd\u002Fctrl+click to multi-select; drag from empty space to box-select. PPT\u002FWord use blue outline; Excel uses native-style green selection (double-click cell to edit inline; drag a chart to reposition).\n\n### `get \u003Cfile> selected` — read what the user clicked\n\n```bash\nofficecli get \u003Cfile> selected [--json]\n```\n\nReturns DocumentNodes for whatever is currently selected. Empty result if nothing selected. Exit code != 0 if no watch is running.\n\n```bash\n# User clicks shapes in the browser, then asks \"make these red\"\nPATHS=$(officecli get deck.pptx selected --json | jq -r '.data.Results[].path')\nfor p in $PATHS; do officecli set deck.pptx \"$p\" --prop fill=FF0000; done\n```\n\n### Key properties\n\n- **Selection survives file edits.** Paths use stable `@id=` form.\n- **All connected browsers share one selection.** Last-write-wins.\n- **Same-file single-watch.** A given file can have only one watch process at a time.\n- **Group shapes select as a whole.** Drilling into individual children of a group is not supported in v1.\n- **Coverage:** `.pptx` shapes\u002Fpictures\u002Ftables\u002Fcharts\u002Fconnectors\u002Fgroups; `.docx` top-level paragraphs and tables. Inherited layout\u002Fmaster decorations and Word nested elements (table cells, run-level) are not addressable. **`.xlsx` does not emit `data-path`** — `mark`\u002F`selection` on xlsx always resolve `stale=true` (v2 candidate).\n\n### Marks — edit proposals waiting for review\n\nUse `mark` when changes need human review BEFORE they hit the file. Marks live in the watch process only; a separate `set` pipeline applies accepted ones. For one-shot changes use `set` directly; for permanent file annotations use `add --type comment` (Word native).\n\n```bash\nofficecli mark \u003Cfile> \u003Cpath> [--prop find=... color=... note=... tofix=... regex=true] [--json]\nofficecli unmark \u003Cfile> [--path \u003Cp> | --all] [--json]\nofficecli get-marks \u003Cfile> [--json]\n```\n\nProps: `find` (literal or regex when `regex=true`; raw form `find='r\"[abc]\"'`), `color` (hex \u002F `rgb(...)` \u002F 22 named whitelist), `note`, `tofix` (drives apply pipeline). **Path** must be `data-path` format from watch HTML — see subskills for full pipeline.\n\n---\n\n## L2: DOM Operations\n\n### set — modify properties\n\n```bash\nofficecli set \u003Cfile> \u003Cpath> --prop key=value [--prop ...]\n```\n\n**Any XML attribute is settable** via element path (found via `get --depth N`) — even attributes not currently present. Without `find=`, `set` applies format to the entire element.\n\n**Value formats:**\n\n| Type | Format | Examples |\n|------|--------|---------|\n| Colors | Hex (with\u002Fwithout `#`), named, RGB, theme | `FF0000`, `#FF0000`, `red`, `rgb(255,0,0)`, `accent1`..`accent6` |\n| Spacing | Unit-qualified | `12pt`, `0.5cm`, `1.5x`, `150%` |\n| Dimensions | EMU or suffixed | `914400`, `2.54cm`, `1in`, `72pt`, `96px` |\n\n**Dotted-attr aliases** — `font.\u003Cattr>` forms accepted on shape\u002Frun\u002Fparagraph\u002Ftable\u002Frow\u002Fcell\u002Fsection\u002Fstyles, e.g. `--prop font.color=red --prop font.bold=true --prop font.size=14pt`. Run `officecli help \u003Cfmt> \u003Celement>` for the full list.\n\n### find — format or replace matched text\n\nUse top-level `--find` \u002F `--replace` on `set` (and `--find` on `query`). Legacy `--prop find=X` still works but emits a hint.\n\n```bash\n# Format matched text (auto-splits runs)\nofficecli set doc.docx '\u002Fbody\u002Fp[1]' --find weather --prop bold=true --prop color=red\n\n# Regex matching (regex= still a prop flag)\nofficecli set doc.docx '\u002Fbody\u002Fp[1]' --find '\\d+%' --prop regex=true --prop color=red\n\n# Replace text (use `\u002F` for whole-document scope)\nofficecli set doc.docx \u002F --find draft --replace final\n\n# docx: tracked Find&Replace\nofficecli set doc.docx \u002F --find draft --replace final --prop revision.author=Alice\n\n# PPT — same syntax, different paths\nofficecli set slides.pptx \u002F --find draft --replace final\n```\n\n**Path controls search scope:** `\u002F` = whole document, `\u002Fbody\u002Fp[1]` or `\u002Fslide[N]\u002Fshape[M]` = specific element, `\u002Fheader[1]` \u002F `\u002Ffooter[1]` = headers\u002Ffooters.\n\n**Notes:**\n- Case-sensitive by default. Case-insensitive: `--prop 'find=(?i)error' --prop regex=true`\n- Matches work across run boundaries\n- No match = silent success. `--json` includes `\"matched\": N`\n- **Excel:** only `find` + `replace` supported (no find + format props)\n\n### add — add elements or clone\n\n```bash\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> [--prop ...]\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> --after \u003Cpath> [--prop ...]   # insert after anchor\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> --before \u003Cpath> [--prop ...]  # insert before anchor\nofficecli add \u003Cfile> \u003Cparent> --type \u003Ctype> --index N [--prop ...]        # 0-based position (legacy)\nofficecli add \u003Cfile> \u003Cparent> --from \u003Cpath>                               # clone existing element\n```\n\n`--after`, `--before`, `--index` are mutually exclusive. No position flag = append to end.\n\n**Element types (with aliases):**\n\n| Format | Types |\n|--------|-------|\n| **pptx** | slide (incl. hidden), shape (font.latin\u002Fea\u002Fcs, direction=rtl, underline.color, highlight=COLOR (Add\u002FSet\u002FGet\u002FHTML preview), effective.X+effective.X.src; arrow alias for rightArrow; slideMaster\u002FslideLayout typed add\u002Fset\u002Fremove), picture (SVG, brightness\u002Fcontrast\u002Fglow\u002Fshadow, rotation, link, tooltip), chart (direction=rtl, pieOfPie, barOfPie, axisLine\u002Fgridline per-attr setters, animation+chartBuild=byCategory|bySeries, line dropLines\u002FhiLowLines\u002FupDownBars, anchor=x,y,w,h shorthand), table (cell direction=rtl, fill\u002Fbackground, built-in PowerPoint style catalogue, \u002Fcol[C] get + swap\u002FcopyFrom, row\u002Fcol Move\u002FCopyFrom), row (tr), connector (from\u002Fto accept @name=, startshape\u002Fendshape SetByPath), group (link, tooltip, deep walk by get\u002Fquery\u002Fadd\u002Fremove), video\u002Faudio (loop, autoStart alias), equation, notes (direction=rtl, lang), comment (legacy + modern p188 threaded round-trip), animation (15 emphasis + 16 exit presets, multi-effect chains, motion-path presets, repeat\u002Frestart\u002FautoReverse, chart animations), transition (12 p15 presets + morph\u002Fp14), paragraph (para), run, zoom, ole (preview=, full dump round-trip via add-part+raw-set), placeholder (phType=...), model3d (rotation=ax,ay,az; full dump round-trip), smartart (dump round-trip via add-part). |\n| **docx** | paragraph (direction\u002Ffont.latin\u002Fea\u002Fcs, bold.cs\u002Fitalic.cs\u002Fsize.cs, lang.latin\u002Fea\u002Fcs, wordWrap, framePr.\\*, tabs shorthand), run (lang slots, direction, underline.color, position half-pts, **revision.type=ins\\|del\\|format\\|moveFrom\\|moveTo + revision.action=accept\\|reject** with .author\u002F.date — `\u002Frevision[@author=X]` selector for filtered accept\u002Freject), table (direction=rtl, hMerge, **virtual column ops**: add\u002Fremove\u002Fmove\u002Fcopyfrom on \u002Fbody\u002Ftbl[N]\u002Fcol), row (tr), cell (td), image, header\u002Ffooter (direction), section (pageNumFmt full enum, direction=rtl, rtlGutter, pgBorders=box), bookmark, comment, footnote, endnote, formfield, sdt, chart, equation, field (28 types), hyperlink, style (direction, indents, pbdr, lineSpacing on Add\u002FSet), toc, watermark, break, ole, **num\u002FabstractNum\u002Flvl**, **tab**, **textbox\u002Fshape** (full Add+Get; geometry, fill, line, wrap, alt, anchor, **rotation, verticalText (eaVert\u002Fvert\u002Fvert270\u002FwordArt\\*), gradient, shadow, opacity**), embedded **OLE round-trip on dump→batch**. docDefaults.rtl, autoHyphenation, `get \u002F` exposes locale + \u002Fcomments \u002Ffootnotes \u002Fendnotes. `create --minimal` for raw OOXML scaffolding. |\n| **xlsx** | sheet (visible\u002Fhidden\u002FveryHidden, print margins, printTitleRows\u002FCols, rightToLeft sheetView, cascade-aware rename), row (c{N}= cell-content shorthand; add accepts --from \u002FSheet\u002Fcol[L]; formula-ref rewrite on insert), col (formula-ref rewrite, named-range follow on move), cell (type=richtext+runs, merge=range\u002Fsweep, direction=rtl, phonetic; **--shift left\\|up on remove, shift=right\\|down on add** — Excel UI dialog parity; formula auto-detect; OFFSET\u002FINDIRECT in calc), chart (per-axis RTL\u002Ftitle, anchor=x,y,w,h, pareto), image (SVG), comment (direction=rtl), table (listobject), namedrange (definedname, volatile, `[@name=X]`; formula-body inlined at parse), pivottable (cache CoW + cross-pivot sharing, labelFilter, topN, fillDownLabels, calculatedField), sparkline, validation, autofilter, shape, textbox, CF (databar\u002Fcolorscale\u002Ficonset\u002Fformulacf\u002FcellIs\u002FtopN\u002FaboveAverage), ole, csv. Query supports `merge`\u002F`mergedrange`. Workbook: password. Shape selector enumerates leaves inside grpSp. |\n\n### Pivot tables (xlsx)\n\n```bash\nofficecli add data.xlsx \u002FSheet1 --type pivottable \\\n  --prop source=\"Sheet1!A1:E100\" --prop rows=Region,Category \\\n  --prop cols=Year --prop values=\"Sales:sum,Qty:count\" \\\n  --prop grandTotals=rows --prop subtotals=off --prop sort=asc\n```\n\nKey props: `rows`, `cols`, `values` (Field:func[:showDataAs]), `filters`, `source`, `position`, `layout` (compact\u002Foutline\u002Ftabular), `repeatLabels`, `blankRows`, `aggregate`, `showDataAs` (percent_of_total\u002Frow\u002Fcol, running_total), `grandTotals`, `subtotals`, `sort`. Aggregators: sum, count, average, max, min, product, stdDev, stdDevp, var, varp, countNums. Date columns auto-group. Run `officecli help xlsx pivottable` for full schema.\n\n### Document-level properties (all formats)\n\n```bash\nofficecli set doc.docx \u002F --prop docDefaults.font=Arial --prop docDefaults.fontSize=11pt\nofficecli set doc.docx \u002F --prop protection=forms --prop evenAndOddHeaders=true\nofficecli set data.xlsx \u002F --prop calc.mode=manual --prop calc.refMode=r1c1\nofficecli set slides.pptx \u002F --prop defaultFont=Arial --prop show.loop=true --prop print.what=handouts\n```\n\nRun `officecli help \u003Cformat> \u002F` for all document-level properties (docDefaults, docGrid, CJK spacing, calc, print, show, theme, extended).\n\n### Sort (xlsx)\n\n```bash\nofficecli set data.xlsx \u002FSheet1 --prop sort=\"C desc\" --prop sortHeader=true\nofficecli set data.xlsx '\u002FSheet1\u002FA1:D100' --prop sort=\"A asc\" --prop sortHeader=true\n```\n\nFormat: `COL DIR[, COL DIR ...]`. Rejects ranges with merged cells or formulas. Sidecar metadata (hyperlinks, comments, conditional formatting, drawings) follows rows automatically.\n\n### Text-anchored insert (`--after find:X` \u002F `--before find:X`)\n\nLocate an insertion point by text match within a paragraph. Inline types (run, picture, hyperlink) insert within the paragraph; block types (table, paragraph) auto-split it. PPT only supports inline.\n\n```bash\n# Word: inline run after matched text\nofficecli add doc.docx '\u002Fbody\u002Fp[1]' --type run --after find:weather --prop text=\" (sunny)\"\n\n# Word: block table after matched text (auto-splits paragraph)\nofficecli add doc.docx '\u002Fbody\u002Fp[1]' --type table --after \"find:First sentence.\" --prop rows=2 --prop cols=2\n```\n\n### Clone\n\n`officecli add \u003Cfile> \u002F --from '\u002Fslide[1]'` — copies with all cross-part relationships.\n\n### move, swap, remove\n\n```bash\nofficecli move \u003Cfile> \u003Cpath> [--to \u003Cparent>] [--index N] [--after \u003Cpath>] [--before \u003Cpath>]\nofficecli swap \u003Cfile> \u003Cpath1> \u003Cpath2>\nofficecli remove \u003Cfile> '\u002Fbody\u002Fp[4]'\n```\n\nWhen using `--after` or `--before`, `--to` can be omitted — the target container is inferred from the anchor.\n\n### batch — multiple operations in one save cycle\n\nContinues on error by default (returns exit 1 if any item fails). Use `--stop-on-error` to abort on the first failure. `--force` is the docx-protection bypass.\n\n`officecli dump \u003Cfile> [\u003Cpath>]` emits a replayable batch JSON for round-trip — `.docx` (full coverage) and `.pptx` (text\u002Ftables\u002Fpictures\u002Fcharts\u002Fnotes\u002Ftheme + OLE\u002F3D\u002Fvideo\u002Faudio\u002FSmartArt\u002Fmorph\u002Fp15 transitions via raw-set passthrough). Path defaults to `\u002F` (whole document); pass a subtree path (`\u002Fbody`, `\u002Fbody\u002Fp[N]`, `\u002Fbody\u002Ftbl[N]`, `\u002Ftheme`, `\u002Fsettings`, `\u002Fnumbering`, `\u002Fstyles`) to scope the dump. `officecli refresh \u003Cfile.docx>` recalculates TOC page numbers \u002F PAGE \u002F cross-references after replay (Word backend on Windows; headless-HTML fallback elsewhere). `officecli plugins list` extends support to `.doc`, `.hwpx`, `.pdf` export.\n\n```bash\necho '[\n  {\"command\":\"set\",\"path\":\"\u002FSheet1\u002FA1\",\"props\":{\"value\":\"Name\",\"bold\":\"true\"}},\n  {\"command\":\"set\",\"path\":\"\u002FSheet1\u002FB1\",\"props\":{\"value\":\"Score\",\"bold\":\"true\"}}\n]' | officecli batch data.xlsx --json\n\nofficecli batch data.xlsx --commands '[{\"op\":\"set\",\"path\":\"\u002FSheet1\u002FA1\",\"props\":{\"value\":\"Done\"}}]' --json\nofficecli batch data.xlsx --input updates.json --force --json\n```\n\nSupports: `add`, `set`, `get`, `query`, `remove`, `move`, `swap`, `view`, `raw`, `raw-set`, `validate`. Fields: `command` (or `op`), `path`, `parent`, `type`, `from`, `to`, `index`, `after`, `before`, `props`, `selector`, `mode`, `depth`, `part`, `xpath`, `action`, `xml`.\n\n---\n\n## L3: Raw XML\n\nUse when L2 cannot express what you need. No xmlns declarations needed — prefixes auto-registered.\n\n```bash\nofficecli raw \u003Cfile> \u003Cpart>                          # view raw XML\nofficecli raw-set \u003Cfile> \u003Cpart> --xpath \"...\" --action replace --xml '\u003Cw:p>...\u003C\u002Fw:p>'\nofficecli add-part \u003Cfile> \u003Cparent>                   # create new document part (returns rId)\n```\n\n`raw-set` actions: `append`, `prepend`, `insertbefore`, `insertafter`, `replace`, `remove`, `setattr`. Run `officecli help \u003Cformat> raw` for available parts.\n\n---\n\n## Common Pitfalls\n\n| Pitfall | Correct Approach |\n|---------|-----------------|\n| `--name \"foo\"` | Use `--prop name=\"foo\"` — all attributes go through `--prop` |\n| Unquoted `[N]` paths in zsh\u002Fbash | Always quote: `'\u002Fslide[1]'` or `\"\u002Fslide[1]\"` (shell glob-expands brackets) |\n| PPT `shape[1]` for content | `shape[1]` is typically the title placeholder. Use `shape[2]+` for content shapes |\n| `\u002Fshape[myname]` | Name indexing not supported. Use numeric index or `@name=` (PPT only) |\n| Guessing property names | Run `officecli help \u003Cformat> \u003Celement>` to see exact names |\n| Modifying an open file | Close the file in PowerPoint\u002FWPS first |\n| `\\n` in shell strings | Use `\\\\n` for newlines in `--prop text=\"...\"` |\n| `$` in shell text | `--prop text=\"$15M\"` strips `$15`. Use single quotes: `--prop text='$15M'`, or heredoc batch |\n\n---\n\n## Specialized Skills\n\n`officecli load_skill \u003Cname>` — output is a SKILL.md, follow its rules.\n\n**Loading rule**:\n- Pick the most specific match in \"When to use\"; if none fits, load the format default (`word` \u002F `pptx` \u002F `excel`).\n- Scenes already contain the format default's rules — load **one** skill per artifact, never stack.\n- Loaded rules persist across turns; don't re-load each reply.\n- Two distinct artifacts → two separate loads.\n\n### Word (.docx)\n\n| Name | When to use |\n|------|-------------|\n| `word` | Reports, letters, memos, proposals, generic documents |\n| `academic-paper` | Journal \u002F conference \u002F thesis: APA \u002F Chicago \u002F IEEE \u002F MLA citations, equations, SEQ + PAGEREF cross-refs, multi-column journal layout, bibliography. NOT for business reports or letters (route those to `word`) |\n\n### PowerPoint (.pptx)\n\n| Name | When to use |\n|------|-------------|\n| `pptx` | Generic decks: board reviews, sales decks, all-hands, product launches |\n| `pitch-deck` | **Fundraising only** — seed \u002F Series A-C \u002F SAFE \u002F convertible \u002F strategic raise. NOT for sales \u002F product \u002F board decks (route those to `pptx`) |\n| `morph-ppt` | Cinematic Morph-animated presentations. NOT for static decks (route those to `pptx`) |\n| `morph-ppt-3d` | 3D Morph: GLB models, camera moves, depth. NOT for 2D-only Morph (route those to `morph-ppt`) |\n\n### Excel (.xlsx)\n\n| Name | When to use |\n|------|-------------|\n| `excel` | Generic workbooks, formulas, pivots, trackers |\n| `financial-model` | Financial models, scenarios, projections. NOT for general data analysis (route those to `excel`) |\n| `data-dashboard` | CSV\u002Ftabular data → KPI \u002F analytics \u002F executive dashboards with charts and sparklines. NOT for raw data tracking (route those to `excel`) |\n\nExample: a fundraising deck task → `officecli load_skill pitch-deck` → use the printed rules.\n\n---\n\n## Notes\n\n- Paths are **1-based** (XPath convention): `'\u002Fbody\u002Fp[3]'` = third paragraph\n- `--index` is **0-based** (array convention): `--index 0` = first position\n- **Excel exception**: for `add --type row` and `add --type col`, `--index N` is **1-based** (matches OOXML RowIndex \u002F column letter index). `--index 5` inserts at row 5 \u002F column 5.\n- After modifications, verify with `validate` and\u002For `view issues`\n- **When unsure**, run `officecli help \u003Cformat> \u003Celement>` instead of guessing\n",{"name":5,"description":7},"main","bd0eb29fc5bf4551824b4d266ac0bf417d0fdc3d","core\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fauto-inject\u002Fofficecli",1,"https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop","https:\u002F\u002Flom.entermodetwo.com","https:\u002F\u002Fgithub.com\u002Frfdiosuao","独立开发者 \u002F Independent Developer · AI Agent Builder · 自动化工作流 \u002F Automation Workflows","2026-11-07 01:17:53",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add rfdiosuao\u002Flom-desktop --skill officecli",{"tool":39,"command":40},"bunx","bunx skills add rfdiosuao\u002Flom-desktop --skill officecli",{"tool":42,"command":43},"pnpm","pnpm dlx skills add rfdiosuao\u002Flom-desktop --skill officecli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fauto-inject\u002Fofficecli\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7F1MSSV7NN2SD674R3ENJQR","example-skill","Fixture skill used by startup_materialize integration tests.","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-extension\u002Ftests\u002Ffixtures\u002Fbuiltin-skills-fixture\u002Fexample-skill\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7F1MNWHK6VHTXN6Q20Z18R8","xiaohongshu-recruiter","用于在小红书上发布高质量的 AI 相关岗位招聘帖子。包含自动生成极客风格的招聘封面图和详情图，并提供自动化发布脚本。当用户需要发布招聘信息、寻找 Agent 设计师或其他 AI 领域人才时使用。","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fxiaohongshu-recruiter\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7F1MK75VJD35TXCN2N26AZ1","x-recruiter","用于在 X (x.com) 发布招聘帖子。包含文案规范、图片生成提示和自动化发布脚本。发布 AI 相关岗位或设计类岗位时优先使用。","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fx-recruiter\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7F1MH8M6EGTWGDKJVQBY4FM","weixin-file-send","Use when the user wants a local file or image sent back, such as \"send me the file\"\nor \"发给我\".","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fweixin-file-send\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7F1MCF5F7XK42Z2307JA3VH","story-roleplay","Parse and apply character cards and world info files in multiple formats (PNG, WebP, JSON), fully compatible with SillyTavern format. Supports automatic parsing, keyword triggering, and dynamic updates.","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fstory-roleplay\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7F1M0CEANG3HD4YVVA84SDY","openclaw-setup","OpenClaw usage expert: Helps you install, deploy, configure, and use OpenClaw personal AI assistant. Can diagnose issues, create bots, execute automated tasks, etc. Use when users need to install OpenClaw, configure Gateway, set up Channels, create Agents, troubleshoot issues, or perform OpenClaw-related operations.","https:\u002F\u002Fgithub.com\u002Frfdiosuao\u002Flom-desktop\u002Fblob\u002Fmain\u002Fcore\u002Fcrates\u002Faionui-app\u002Fassets\u002Fbuiltin-skills\u002Fopenclaw-setup\u002FSKILL.md",[],[]]