$npx -y skills add iOfficeAI/OfficeCLI --skill officecli-data-dashboardUse this skill to build a multi-element Excel dashboard — Dashboard sheet on open, multiple formula-driven KPI cards, multiple charts, sparklines, and conditional formatting — from CSV or tabular input. Trigger on: 'dashboard', 'KPI dashboard', 'analytics dashboard', 'executive d
| 1 | # Data Dashboard (scene-layer on officecli-xlsx) |
| 2 | |
| 3 | A dashboard is not "a spreadsheet with charts". It is a composition: **one Dashboard sheet the user lands on** with formula-driven KPI cards, cell-range-linked charts, sparklines, and semantic conditional formatting. Everything else (raw data, aggregations) is upstream infrastructure the user should never need to open. This skill teaches the composition pattern. Everything about the xlsx engine — cells, formulas, batch JSON, shell quoting, validate, HTML preview — comes from `officecli-xlsx` and is not re-taught here. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | If `officecli` is missing: |
| 8 | |
| 9 | - **macOS / Linux**: `curl -fsSL https://d.officecli.ai/install.sh | bash` |
| 10 | - **Windows (PowerShell)**: `irm https://d.officecli.ai/install.ps1 | iex` |
| 11 | |
| 12 | 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. |
| 13 | |
| 14 | ## ⚠️ Help-First Rule |
| 15 | |
| 16 | **When a prop name, enum value, or alias is uncertain, consult help before guessing.** |
| 17 | |
| 18 | ```bash |
| 19 | officecli help xlsx # element list |
| 20 | officecli help xlsx chart # full schema for charts |
| 21 | officecli help xlsx sparkline # sparklines |
| 22 | officecli help xlsx conditionalformatting # all CF rule types |
| 23 | ``` |
| 24 | |
| 25 | Help reflects the installed CLI version. When this skill and help disagree, **help wins**. DeferredAddKeys (`combosplit`, `holesize`) work on `add` only — see Reference. |
| 26 | |
| 27 | ## Mental Model & Inheritance |
| 28 | |
| 29 | This skill **inherits every xlsx hard rule** from `officecli-xlsx` — shell quoting, zero formula errors, visual delivery floor, batch JSON shape (`{"command":"set"|"add","path":...,"props":{...}}` — key is `command`, NOT `action`), batch JSON dotted-name rule, chart data-feed forms, batch+resident limits, `validate` discipline. Read officecli-xlsx first; honour those rules, do not re-teach them here. |
| 30 | |
| 31 | **Reverse handoff — do NOT use this skill when:** |
| 32 | |
| 33 | - The ask is a **single-sheet CSV-with-formatting tracker** (no Dashboard sheet, no KPI cards, ≤ 1 chart) → go back to `officecli-xlsx`. |
| 34 | - The ask is a **3-statement / DCF / LBO financial model** with blue-inputs / black-formulas / cross-sheet drivers → use `officecli-financial-model`. |
| 35 | - The ask is a **weekly status report** with one SUMIF summary and one chart over < 10 rows → `officecli-xlsx`. |
| 36 | |
| 37 | This skill only accepts: "a Dashboard sheet the user opens first, multiple KPI cards, multiple charts, some CF / sparklines". |
| 38 | |
| 39 | ## Shell & Execution Discipline |
| 40 | |
| 41 | → see officecli-xlsx §Shell & Execution Discipline for the baseline (quoting, heredoc for `!`, incremental execution). |
| 42 | |
| 43 | Two increments specific to dashboards: |
| 44 | |
| 45 | - **Long chart `add` commands exceed 180 chars.** Always split across lines with trailing `\`; never pack a chart command onto a single line. The longer the command, the higher the chance a shell-escape bug hides inside it. |
| 46 | - **Multi-instance counts use `query --json | jq length`, never `raw-get | grep -c`.** Example: `officecli query "$FILE" chart --json | jq '.data.results | length'` for "how many charts do I have?". |
| 47 | |
| 48 | ## Core Principles |
| 49 | |
| 50 | Five non-negotiable principles. If any one is violated the output is not a dashboard, it is a spreadsheet that happens to have a chart. |
| 51 | |
| 52 | 1. **Formula-driven KPIs.** Every KPI value on the Dashboard sheet is a formula — `SUM`, `AVERAGE`, `IFERROR((...-...)/...,0)`, whatever — referring to cells on the Data / Summary sheet. Never hardcode a computed number. When the underlying data changes tomorrow, KPIs update on open. |
| 53 | |
| 54 | 2. **Cell-range references for charts.** Every chart series reads from a cell range: `series1.values="Sheet1!B2:B13"`. Inline `data="Revenue:100,200,300"` is for a 5-minute demo, not a delivered dashboard. The one exception: data requires an aggregation Excel cannot express (rare) — document the exception in a comment cell. |
| 55 | |
| 56 | 3. **Dashboard-first architecture.** KPI label cells, KPI value cells, charts, sparklines all live on the **Dashboard** sheet — the single sheet a user lands on. Raw imports and `SUMIFS` rollups live on Data / Summary sheets, upstream of the Dashboard. The user should never need to switch tabs to find the answer. |
| 57 | |
| 58 | 4. **Visible cells only for chart sources.** LibreOffice does not evaluate formulas in hidde |