Skip to content
Back to skills

Gridcraft

ASecurity

GridCraft is an open-source, clean-room Rust reimplementation of Microsoft Excel: a spreadsheet app for macOS, Windows, Linux, BSD and the web that reads and writes real .xlsx and can be driven headlessly through a CLI, an MCP server and a JSON control channel. Use this skill whenever the user mentions GridCraft; asks what it can do or which formats, shortcuts or functions it has; wants to create, edit, calculate, print or export spreadsheets; wants to automate or script it (MCP, CLI, control...

  • 122 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 16, 2026
ai-agentsjavascriptpythonrustgojavashellnodeexpressawstesting

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add midasmatterhorn/artcraft-skills --skill gridcraft --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gridcraft?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gridcraft
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/midasmatterhorn-gridcraft/badge)](https://www.skillsdirectory.com/skills/midasmatterhorn-gridcraft)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gridcraft
description: >-
  GridCraft is an open-source, clean-room Rust reimplementation of Microsoft Excel: a spreadsheet
  app for macOS, Windows, Linux, BSD and the web that reads and writes real .xlsx and can be driven
  headlessly through a CLI, an MCP server and a JSON control channel. Use this skill whenever the
  user mentions GridCraft; asks what it can do or which formats, shortcuts or functions it has;
  wants to create, edit, calculate, print or export spreadsheets; wants to automate or script it
  (MCP, CLI, control channel, `window.gridcraft`); needs inputs prepared for it (.xlsx, CSV, TSV,
  JSON, or .xls/.xlsb/.ods/.slk converted); wants output verified or repaired (gridcraft-cli check,
  sandbox-check); or reports a symptom (crash, wrong formula, content warning). Trigger it even
  when the job is Excel-style spreadsheet work — "make me an Excel file", "add a formula column",
  "pivot this data". Do not assume Excel parity; check this skill first.
---

# GridCraft

**Audit basis.** Refreshed **2026-12-03** against tag **v0.20.0**, commit **`fc9fd456b70041e7beced6d295085b83349c3ea3`** — `git rev-parse HEAD` in the pinned checkout confirms, and the installed GridCraft bundle matches it: its binary prints `GridCraft 0.20.0`, and its `Info.plist` carries `CFBundleShortVersionString` 0.20.0 with bundle id `ai.storyteller.gridcraft`. The previous release this skill described was **v0.19.1** (`476448d7d9f3a5f8e93fcf7d98b47fd52293fe7f`).

**v0.19.1 → v0.20.0 delta.** The release diff touches **511 files (+59,871 / −13,858 lines)** and adds **6 command ids, none removed** — the registry is **391 ids** (was 385), and the Excel catalog is **282/296 (95.3%)** (was 281/296): `insert.wordArt` ("Decorative Text") landed. **28 `ChartKind`s** (was 26; `LineStacked100`, `LineStacked100Markers`), **11 shape kinds** (was 10; WordArt), **514 of Excel's 523 worksheet functions by name, 505 working (96.6%)** (was 513/504; **GETPIVOTDATA** landed), and **23 advertised UI-only command ids** (was 18). MCP stays **22 tools / 3 resources**, CLI stays **12 subcommands**, control stays **35 method names in 30 arms**, shortcut bindings **72** (+5 macOS-only overrides), key-tips **413**, interface languages **19**. New automation: **Quick Analysis** (`analysis.addTotal`, `analysis.addSparklines`, Ctrl+Q), **WordArt** (`insert.wordArt`, `wordArt.set`), **`chart.setValuesRange`** with a draggable source-data outline, **`data.validationList`**; printer output is bounded (2,000 pages, 4,000,000 chart primitives, 512 MiB of images). File work moved onto shared craft-libs crates at `8fa4db64a9bb943520259ea95331a303ba788f21`: **`craft-xls`** (`.xls` import now carries cell formatting and data validation), **`craft-csv`** (CSV/SYLK), **`craft-opc`**, **`craft-offcrypto` + `craft-cfb`** (encrypted workbooks), **`craft-ods`** (ODS displayed text), and **`craft-gridcraft-format`** (the native JSON workbook, now byte-golden tested). **PDF Arabic is now shaped and embedded** (harfrust + Unicode bidi + subset Type3 fonts, `crates/pdf/src/arabic.rs`) and RTL sheets mirror in print; Devanagari and Thai still cannot export. An unedited embedded chart now keeps its original chart XML on save (`PreservedChart`). **Correction:** the previous skill said there was no Insert ▸ PivotChart command — `insert.pivotChart` existed at v0.19.1 too and is documented here.

**v0.17.0 → v0.19.1 (history).** 238 files; no id changes (385 both tags); `sandbox-check` became the 12th subcommand; `crates/sandbox` arrived (Landlock ABI 3 + seccomp on Linux, `sandbox-exec` on macOS); `window.gridcraft` appeared in the web build; cell reading direction (`ReadingOrder`), Arabic bidi/shaping, `B1`/`B2` Hijri formats, legacy array formulas read with implicit `@`, chart point budgets, the MCP 16 MB message cap and the 64 MiB HTML chart-SVG budget all landed. Older history (v0.14.0–v0.17.0) is folded into `CHANGES.md`.

**Verify against your installed version** — the ArtCraft Launcher auto-updates, so a newer build may differ; every count quoted here was re-measured at this tag, and code paths that moved were re-cited. The measurement method for each count is in `evidence.md`.

## Overview

GridCraft is an open-source, clean-room reimplementation of Microsoft Excel's workflow in pure Rust (`README.md`), by the ArtCraft team; source: `github.com/storytold/gridcraft`. XLSX is the native document format, and the architecture is engine-first: every ribbon button, menu item, dialog OK, keystroke and mouse gesture is a *command* (`crates/engine/src/cmd/`), reachable over a JSON control channel, an MCP server, a headless CLI and (in the web build) a page-level JavaScript API. Maturity is **alpha**: the core workflow (open XLSX → edit/format → sort/filter → chart/pivot → print to PDF → save XLSX) works end to end, but the project's own estimate is ~75% feature breadth and ~50% "ready for real work" (`docs/target-app-parity.md`; `ROADMAP.md`). It runs natively on macOS 11+, Windows, Linux and BSD, and in the browser via WebAssembly (`apps/gridcraft-web`). The UI runs on egui 0.37, patched to the storytold fork (`Cargo.toml` `[patch.crates-io]`).

## Capabilities (verified)

### Core workbook and editing
- **One native window per workbook window:** `view.newWindow` opens another window **on the same workbook** (no clone; saving from either window saves it), `view.arrangeAll` tiles the windows, `window.list`/`window.close` manage them, and `view.switchWindows`/`window.activate {index}` switch workbooks (`crates/engine/src/cmd.rs`).
- Three built-in samples `budget`, `sales`, `grades`: `file.new {sample}`, CLI `--sample`, URL `?sample=` (`crates/engine/src/sample.rs`).
- **391 engine commands** (**+6/−0** this release; live `gridcraft-cli commands --json` prints 391); **282 of the 296 Excel catalog ids implemented, 95.3%** (**+1**: `insert.wordArt`) — `crates/engine/src/cmd/*.rs`, `crates/engine/src/catalog.rs`, generated `docs/parity-checklist.md`; the 14 unimplemented entries are listed there, and the generated checklist now reports all 282 implemented catalog commands as **headless: yes** (14 no, 0 partial).
- Formatting: fonts, fills, borders, alignment, merges, Excel's number-format language (`crates/numfmt`), cell styles and themes, conditional formatting (CellIs, expression, text, top-10, above-average, time period, duplicate/unique, colour scale, data bar, icon set) and data validation (whole, decimal, list, date, time, text length, custom). `data.validationList {cell?, search?}` returns a list validation's entries (10,000 cap, 200,000 source cells) for dropdown-style lookup (`crates/engine/src/cmd/data/validation.rs`).
- **Cell reading direction:** Format Cells ▸ Alignment offers Context / Left to right / Right to left, i.e. `home.formatCells {range, style:{align:{reading_order:"Context"|"LeftToRight"|"RightToLeft"|null}}}` (`crates/engine/src/cmd/format.rs`), modelled as `ReadingOrder` (`crates/model/src/style.rs`), written and read as the `readingOrder` attribute incl. differential styles (`crates/xlsx/src/styles.rs`). It is per cell and independent of sheet RTL; **Context** follows the first non-whitespace character's bidi class (`crates/ui-egui/src/text_direction.rs`), and the formula bar and conditional-format styles follow it.
- **WordArt (new):** `insert.wordArt {style?, text?, at?, width?, height?, fontSize?, bold?, italic?, fill?, outline?: hex|false, outlineWidth?, shadow?: hex|bool}` and `wordArt.set {id, …}` insert/edit **Decorative Text** — 10 presets (Classic … Lime Pop), text capped at 1,000 characters, default text `Your text here` (`crates/engine/src/cmd/wordart.rs`; catalog label "Decorative Text", `docs/parity-checklist.md`). It is a `ShapeKind::WordArt` (`crates/model/src/features.rs:921`) saved as a text box carrying Excel's non-warping `textNoShape` marker, so it reads back as WordArt (`crates/xlsx/src/drawing.rs:273-282,721,751-762`).
- Tables (structured references, header/total rows, banded rows, style gallery, Resize Table, remove duplicates), notes and threaded comments with replies/resolution/timestamps, hyperlinks, pictures floating or inside a cell (PNG/JPEG only), shapes and text boxes (**11 `ShapeKind`s**: rectangle, rounded rectangle, ellipse, triangle, line, arrow, text box, icon, ink, WordArt, equation), checkboxes, freehand ink with Ink to Shape, sparklines (line/column/win-loss; markers supported).
- **Quick Analysis (new):** Ctrl+Q (Control+Q on macOS) or the corner button opens a 5-tab popup — Formatting, Charts, Totals, Tables, Sparklines — whose tiles run engine commands (`crates/ui-egui/src/quick_analysis.rs`; `ui.quickAnalysis`). Two new commands back it: `analysis.addTotal {function?: sum|average|count|min|max|percentTotal|runningTotal, direction?: columns|rows, range?, overwrite?}` writes totals (or per-cell percentages/running totals) as ordinary formulas in one undo step; `analysis.addSparklines {type?: line|column|winLoss, direction?: rows|columns, markers?, range?, overwrite?}` adds up to 10,000 sparklines, refusing blocks over 200,000 output cells and scanning at most 5,000,000 (`crates/engine/src/cmd/quick_analysis.rs`).
- **Form controls:** buttons, sliders and spin buttons placed on the sheet, with `control.list`, `control.format`, `control.assign`, `control.setValue` and `control.press`. A button never opens a web page or a dialog, and `control.press` on a workbook that came from a file asks first (`crates/engine/src/cmd/controls.rs`; XLSX `crates/xlsx/src/controls.rs`).
- **One object selection** across charts, pictures, shapes, equations and slicers, with eight resize handles; only the selected object's handles resize, and each drag is its own undo step (`crates/ui-egui/src/objects.rs`). `ui.object.select {id?, kind?}` selects one and replies `{selected, rect}`.
- **Chart source-data outline (new):** a selected chart outlines its series names (red), categories (purple) and a values block (blue); dragging a corner of the values block previews another range and the release runs `chart.setValuesRange` as one undo step — series keep their formatting, a wider block adds series, a narrower one drops them, names/categories follow, Esc cancels (`crates/engine/src/chart_data.rs`; `chart.setValuesRange {chart?, range}` in `crates/engine/src/cmd/extra.rs:66`, `crates/engine/src/cmd/extra/chart.rs`).
- Editing: fill handle (drag; right-drag for Copy Cells / Fill Series / Formatting Only / Without Formatting / Series…), AutoFill options, Flash Fill, Paste Special, Format Painter, Find/Replace, Go To/Special, Watch Window, bounded undo/redo. Pasted rows/columns repeat into filters; merged cells no longer trap Shift+arrows, Enter or Tab; Multi-column resize applies on release.
- **Paste a picture from the system clipboard** at the active cell (`crates/ui-egui/src/app/clipboard.rs`).
- AutoSum (`formulas.autoSum`, ⌘⇧T): a single cell guesses above then left; a multi-cell selection gets column totals below and row totals in the empty last column. AutoSum from the ribbon/menu with no `range` proposes the formula in the editor with the range pointed, so typing or clicking replaces it; programmatic `run` enters the total (`crates/ui-egui/src/app/commands.rs`). Options ▸ Formulas Maximum Iterations / Maximum Change; Options ▸ General "Highlight the active cell's row".
- Background error checking, AutoSave for workbooks that already have a file, "Remove personal information on save", R1C1 reference style, page margins as decimals.
- **Opening recalculates every formula** (`DocState::new` → `Calc::recalc_all`, `crates/engine/src/lib.rs`), so volatile formulas run on open; there is no recalc-on-open switch. To read what a file *stores*, bypass the session (`gridcraft-cli check` does).
- Slicers exist as in-sheet filter widgets over one table column but are **not** written to XLSX.

### Formulas and calculation
- **514 of Excel's 523 worksheet functions by name, 505 working (96.6%)** (**+1** this release: `GETPIVOTDATA`) — including dynamic arrays and spilling, LET/LAMBDA (a self-calling LAMBDA stops at 140 calls with `#NUM!`), MAP/REDUCE/SCAN/BYROW/BYCOL/MAKEARRAY, GROUPBY/PIVOTBY, structured table references and iterative calculation — `docs/function-parity.md`, `crates/functions/src/`, `crates/calc/src/eval.rs`.
- **GETPIVOTDATA works** (`crates/calc/src/pivotdata.rs`; up to 126 field/item pairs; a value read from the report cell), but clicking a PivotTable value while typing a formula does not insert the formula yet. The 9 absent names are IMAGE, STOCKHISTORY, TRANSLATE, DETECTLANGUAGE, CALL, REGISTER.ID, RTD, COPILOT, PY; the 9 error stubs are the 7 CUBE functions plus WEBSERVICE and FILTERXML.
- **Legacy array formulas:** a formula saved without dynamic-array metadata (no `cm` attribute, which includes every `.xls` formula) is read with Excel's implicit intersection (`@`) and does not spill; only a genuinely dynamic formula gets `cm` metadata on save (`crates/xlsx/src/array_formula.rs`, `crates/engine/tests/legacy_array_functions.rs`).
- Lookups onto a blank target follow Excel: VLOOKUP/HLOOKUP/LOOKUP/XLOOKUP keep the empty target as a blank, so `ISBLANK` and `&` see blank (`crates/functions/src/lookup.rs`).
- Evaluate without editing: `gridcraft-cli eval '=SUM(A1:A9)' --in book.xlsx` or `formulas.evaluate`. A formula that could not be typed into a cell is an error that says why.
- Calculation settings travel with the workbook: automatic / automaticExceptTables / manual, iterative on/off, max iterations/change (`formulas.calculationOptions`); Set precision as displayed rounds calculation results.
- **Python cells** (a cell type, not an Excel function): `python.set {cell, code, output?}` and `python.output` set the code and return type; Python mode edits the code in the formula bar (`ui.pythonMode`, Ctrl+Alt+Shift+M toggles the return type). Code and a file's cached result are stored; **GridCraft never runs Python**, so new or changed code shows `#BLOCKED!` (`crates/engine/src/cmd/python.rs`, `crates/xlsx/src/python_part.rs`).
- **Equations:** Insert ▸ Symbols ▸ Equation (`insert.equation {latex}`, `equation.edit`), LaTeX source laid out by RaTeX 0.1.14 into cached glyph/rule/path data and written as OMML for a common subset (`crates/math/src/lib.rs`, `crates/xlsx/src/omml.rs`). Source capped at 4 KB, nesting 32, 50,000 items, 2,500 matrix cells, 10,000 em, no macro definitions.
- Carried hardening: accounting negatives, `INDEX(A1:C3,2)` → `#REF!`, REGEXREPLACE bounds, a 16-million-cell budget before scanning, capped text-function arrays.

### Files it reads and writes
- **`.xlsx` is native read/write**: cells, shared/array/dynamic/legacy formulas, styles incl. per-cell reading direction, themes, merges, conditional formats, validation, tables, notes/threaded comments, hyperlinks, names, freeze panes, outlines, print settings, pictures (media written once), shapes incl. ink and WordArt, sparklines, form controls, PivotTables, PivotCharts, sheet/workbook protection and Allow Edit Ranges, calc settings — each sheet keeps its sheetId across a rewrite, and an unchanged formula keeps its stored text (`crates/formula/src/adjust.rs`).
- **Unedited embedded charts keep their original chart part on save** (`PreservedChart`, `crates/model/src/preserved.rs`; `crates/xlsx/src/passthrough.rs`), so axis scaling, point colours, labels, error bars and chart text boxes survive a move/resize or an unrelated edit. Editing the chart, renaming/deleting a plotted sheet or a structural insert falls back to GridCraft's model; a kept part's cached series values are not refreshed.
- **Pass-through on save** (kept when their owner survives): custom document properties, ribbon customisation, custom XML, external workbook links (never followed), data connections, sheet query tables, printer settings, ActiveX/unmodelled form controls, OLE objects, sheet backgrounds with VML, header/footer pictures, chart sheets, and allowlisted self-contained `extLst` elements (`crates/xlsx/src/extlist.rs`).
- `.xlsm` / `.xltm` keep their VBA project byte-for-byte; macros are **never executed**. `.xltx`/`.xltm` save with the template content type.
- **Import-only `.xls`/`.xlt` (BIFF8), now deeper:** values, formulas (legacy implicit `@`), **cell formatting incl. fonts, fills, borders and alignment**, number formats, merges, column widths, row heights, defined names, print areas/titles, sheet display settings and **data validation**. Still not imported: charts, pictures, comments, conditional formats (read then dropped with a warning), hyperlinks, freeze panes; chart/macro/dialog sheets are skipped; BIFF5 and password-protected `.xls` are refused (`crates/xlsx/src/xls.rs`).
- **Import-only `.xlsb` and `.ods`:** worksheet cells, formulas with their saved results (cached results become constants), names and merges for `.xlsb`; `.ods` adds typed values, displayed text and merges. Styles/charts/pictures/macros are not imported; neither is ever written.
- **Import-only `.slk` SYLK:** values, R1C1 formulas converted to A1, number formats, column widths; save refused (`crates/engine/src/io/sylk.rs`, `crates/xlsx/src/csv.rs`).
- **Text/data:** CSV and TSV/TXT/TAB with delimiter/encoding detection; writes the *displayed* text, keeps the separator a file was opened with, refuses output over 512 MiB; `file.open {csvAsText:true}` keeps every field as text.
- **Native JSON workbook:** `.json`/`.scjson` is now a real read/write format through `craft-gridcraft-format` (byte-for-byte golden tests in `crates/engine/src/tests/json_golden.rs`; macros are kept), not the old debug serde dump (`crates/engine/src/io.rs`).
- **HTML:** `file.exportHtml` writes one sheet as a table (pictures as data-URI images, charts as inline SVG, at most 100,001 rows); opening a page imports its table as a sheet. The page's charts share a 64 MiB SVG budget and the export fails rather than dropping a chart (`crates/engine/src/chart_svg.rs`).
- **`.pdf` export:** own PDF 1.7 writer; `file.exportPdf {path?, sheets?: active|all, range?, fitToPage?}` returns `{pages, bytes, path}` or base64; `file.print` returns the same PDF. `http(s)` hyperlinks and internal destinations become link annotations; `file:` links are omitted. Printing is capped at 2,000 pages, 4,000,000 chart primitives and 512 MiB of image data (`crates/engine/src/cmd/print.rs`, `crates/pdf/src/lib.rs`).
- **Password-encrypted `.xlsx` open** (Agile AES and Standard encryption, [MS-OFFCRYPTO]) via `password`; RC4, Extensible, certificate-only and rights-managed files are refused (`crates/xlsx/src/crypto.rs`). Saving is always unencrypted.
- **Save is refused** for `.xls`, `.xlsb`, `.ods` and `.slk`; `.csv/.tsv/.json/.html/.pdf` are exports (only `.xlsx` and `.json` clear the dirty flag and become the document's file). Hard caps: 512 MB per XLSX part, 1 GB per package, 2 GB per file read, 100,001 HTML rows, 512 MiB CSV/TSV output, 64 MiB SVG per exported page, 16,000,000 cells per array result (`crates/engine/src/io.rs`, `crates/xlsx/src/package.rs`).
- **Excel-open harness:** `packaging/windows/excel-open-check/check.ps1` saves workbooks with the CLI and opens each in real Excel through COM (a repair is a failure). `docs/gaps.md` §1 reports 24 of 25 synthetic files opening cleanly; a real-world corpus is still missing.

### Charts, PivotTables and analysis
- **28 `ChartKind`s (+2):** column/bar/line/pie/doughnut/area/scatter/bubble/radar/histogram/waterfall/funnel/treemap/sunburst/box-whisker/stock/combo and subtypes, now including **100% stacked line and 100% stacked line with markers**; chartex parts for histogram/box-whisker/waterfall/funnel/treemap/sunburst, six trendline types, Recommended Charts, Select Data, Switch Row/Column, Change Type/Colours/Layout. About 28 of Excel's ~60 subtypes (~47%); a doughnut draws every series as its own concentric ring.
- **Chart work is capped and clipped before evaluation:** 100,000 points per series (255 series), 2,000,000 points per chart — every series keeps its first `2,000,000 / series` points, no series dropped — and at most 16 trendlines per chart (`crates/chart/src/resolve.rs`).
- Chart objects move/resize, use the shared object selection, and 2-D kinds survive XLSX. Chart data tables exist for column/bar/line/area/compatible combo charts (128 categories, 32 series, live values, XLSX round-trip). No 3-D, axis min/max/log/units, error bars or per-point formatting.
- **PivotCharts:** `insert.pivotChart {pivot?, type?, subtype?, title?, at?, width?, height?}` binds a chart to a PivotTable's report (categories = innermost row items, series = column items × value fields) and follows refreshes; it existed before v0.20.0. PivotCharts arriving in a file are read and kept, with `c:pivotSource` round-trip.
- PivotTables: field list, Filters/Rows/Columns/Values, report filters (labels only), layouts, date grouping, show-values-as, calculated fields, values on rows, grand totals, styles, refresh, change source, Show Details/Enable show details, `GETPIVOTDATA`. No calculated items, number grouping, timelines or data-model pivots; PivotTable formulas in files are unverified in Excel.
- Data tools: multi-key sort (incl. custom lists and colour), AutoFilter with cascading dropdown values, `data.filterBy` (values, custom comparisons, Top-N/percent/bottom, above-average; file-loaded colour/icon filters), Advanced Filter, remove duplicates, text-to-columns, Flash Fill, group/ungroup/subtotals, consolidate, scenario manager, Goal Seek, data table.
- Solver (Simplex LP with integer/binary, GRG Nonlinear, Evolutionary; Answer/Sensitivity/Limits reports; save/load model), Forecast Sheet with hindcast, Analysis ToolPak with all 19 tools (`crates/engine/src/cmd/analysis.rs`).
- Printing: native macOS/Windows/Linux jobs through pinned `craft-print`, Page Setup, Page Break Preview, Page Layout view with rulers, **3 print scopes** (active sheets / entire workbook / selection), 24 named paper sizes incl. JIS B4/B5/B6 and Japanese envelopes (`crates/model/src/paper.rs`).

### Text, languages and scripts
- **Arabic and other right-to-left text:** the egui 0.37 renderer shapes with harfrust and lays text out with Unicode bidi; cells, the in-cell editor and the formula bar follow the cell's reading direction, caret movement and word deletion are visual (`crates/ui-egui/tests/{arabic_bidi,arabic_editing}.rs`). Arabic faces join the font fallbacks (`crates/ui-egui/src/theme/font_fallback.rs`).
- **PDF Arabic (new):** Arabic text is shaped with harfrust, ordered with Unicode bidi and drawn from **embedded subset Type3 fonts** built from Noto Sans Arabic outlines, with `ToUnicode` and logical `ActualText`; cells, headers and chart labels keep their direction, and RTL sheet geometry mirrors (`crates/pdf/src/arabic.rs`, `crates/pdf/src/lib.rs`, `crates/engine/src/cmd/print.rs`). Release builds embed the faces (`CRAFT_FONTS_DIR` at build time); a build without them looks for an installed Noto Sans Arabic and, failing that, sets Arabic in the CID font (no Arabic glyphs) with a message. Devanagari and Thai still cannot export.
- **CJK and script fallbacks** share the Latin baseline; CJK in PDF uses a predefined, non-embedded Adobe-GB1 CID font.
- **Number formats:** Excel's `B1` (Gregorian) and `B2` (Hijri) calendar prefixes are hidden and `B2` renders the tabular Hijri calendar with Arabic month/weekday names; a misplaced prefix makes the code General and `TEXT` return `#VALUE!` (`crates/numfmt/src/calendar.rs`). Values round on Excel's 15-significant-digit decimal string, half away from zero.
- **Interface languages**: 19 (`Language::ALL`): en, es, el, zh, ja, ko, ru, pt-BR, de, cs, fr, sr, pl, it, uk, vi, nl, ro, tr. Untranslated strings fall back to English; command ids, document text, formulas and number formats stay English/en-US. `app.language.set {language|code}` switches at runtime.

### Automation surface (the reason to read this skill)
Counts at v0.20.0, with v0.19.1 in brackets where it differs: **391 engine commands** (385); **282/296 catalog ids** (281); **22 MCP tools** (unchanged); **12 CLI subcommands** (unchanged); **35 control method names in 30 dispatch arms** (unchanged) plus command-id passthrough; **23 advertised UI-only command ids** (18); **72 shortcut bindings on command specs** (unchanged) plus 5 macOS-only overrides; **413 key-tip sequences** (unchanged); **19 interface languages**; **28 chart kinds** (26); **11 shape kinds** (10); **514/523 worksheet functions** (513); **3 MCP resources**; **14 `check` round-trip categories**.

- **The control channel requires a token:** the first line of a connection must authenticate with the app's token, and a connection that does not — or later sends a malformed line — is answered once and closed (`apps/gridcraft/src/control_server.rs`; `gridcraft_mcp::control_auth`). The token is `--control-token <token>` or `GRIDCRAFT_CONTROL_TOKEN` (at least 16 characters), else 256 random bits written to a file only the user can read whose path is printed to stderr (`$XDG_RUNTIME_DIR/gridcraft/control-<port>.token`, else `~/.cache/gridcraft/…`; Windows `%USERPROFILE%\.gridcraft\…`). `gridcraft-cli send` and `mcp --connect` read it automatically. A nightly profile gets its own token folder (`set_token_root`), so channels can never authenticate each other.
- **CLI `gridcraft-cli`** (headless; the app bundle ships no CLI): `info`, `convert`, `eval`, `cat`, `run`, `check`, `sandbox-check`, `commands`, `functions`, `mcp`, `send`, `version` — **12 subcommands** (`apps/gridcraft-cli/src/main.rs`). Version 0.20.0. `--help`/`-h`/`help` now prints usage (not a subcommand); `--launch-profile`/`--profile-root` belong to the desktop app and are refused with exit 2.
- **`check`** recalculates every formula against the file's Excel-cached values (skipping volatile formulas and files flagged `fullCalcOnLoad`), then writes and re-reads the workbook through GridCraft's own writer and compares **14 categories** — package, sheets, values, formulas, numFmts, merges, names, tables, condFormats, validations, charts, comments, hyperlinks, pivots — and validates the package. Flags `--tolerance 1e-9`, `--max-report N`, `--json` (schema `gridcraft-check/1`); exit 1 on any difference. Directory inputs recurse to depth 32, collect at most 100,000 files, key visited directories by (dev, inode) and read only regular files (`apps/gridcraft-cli/src/check.rs`).
- **`sandbox-check`:** with no program it runs a confined copy of itself that tries each action the sandbox must deny (read outside the policy, write, truncate, TCP/UDP, start/signal a process, list the home directory) plus two that must still work (a thread, reading an allowed file); with `-- PROGRAM ARGS…` it runs that program confined (`--read PATH`/`--exec PATH` add policy paths). Exit 0 = everything as required, 1 = not, 2 = no sandbox for this system (`apps/gridcraft-cli/src/sandbox_check.rs`, `docs/sandbox.md`). macOS needs `/usr/bin/sandbox-exec`; Linux needs Landlock ABI 3 (kernel 6.2); Windows, BSD and the web have none.
- **MCP server** over stdio, protocol `2025-06-18` (older clients answered in their own version); headless (`--in FILE | --sample NAME`) or remote (`--connect PORT`). **22 tools**: `execute_command`, `list_commands`, `inspect_workbook`, `read_range`, `write_range`, `set_cell`, `get_cell`, `evaluate_formula`, `select`, `format_range`, `insert_chart`, `create_table`, `sort_range`, `filter`, `open_workbook`, `save_workbook`, `new_workbook`, `undo`, `redo`, `screenshot`, `list_functions`, `list_windows`. A message over **16 MB** is answered with `-32600` and dropped. Resources: `gridcraft://workbook`, `gridcraft://commands`, `gridcraft://functions`; `prompts/list` is empty (`crates/mcp/src/{server,tools}.rs`). **`--connect` dials only a loopback address**, so the token is never sent over a network (`crates/mcp/src/backend.rs`).
- **Control-channel methods** (35 names in 30 match arms; aliases share an arm): read state — `engine.execute` (aliases `command`, `ui.menu.invoke`), `engine.commands`, `engine.journal` (10,000 entries / 64 MB, passwords stripped), `document.inspect`, `sheet.read`, `cell.get`, `selection.stats`, `ui.inspect`; objects and UI — `ui.object.select`, `ui.ribbon`, `ui.set`, `ui.dialog`, `ui.dialog.set|confirm|cancel`, `ui.message.dismiss`, `ui.edit.begin|text|commit|cancel`, `ui.key`, `ui.text`, `ui.move`, `ui.click`, `ui.drag`, `ui.cell.click`, `ui.cell.drag`, `ui.resize`, `ui.focus`, `ui.screenshot`; files and lifetime — `app.open`, `app.save`, `app.quit`. Any other method naming an engine command id runs that command (`crates/ui-egui/src/control.rs`).
- **UI-only commands** reachable through `engine.execute` in the running app (so also over `mcp --connect`); `engine.commands` marks them `"ui": true` and serves **23**: the previous 18 plus `ui.window.minimize`, `ui.window.maximize`, `ui.window.close`, `ui.window.beginResize {direction}` and `ui.selectionMode {mode?: "extend"|"add"|"off"}` (`crates/ui-egui/src/control.rs:262-300`; handlers `crates/ui-egui/src/app/commands.rs`). `ui.quickAnalysis {open?}` is also a UI-only command but is **not** in the advertised list.
- **Recorded scripts** (Automate tab): `automate.recordActions`, `automate.newScript`, `automate.allScripts`, `automate.runScript`, `automate.trustScripts`, `automate.deleteScript`, `automate.stopAction`. A workbook opened from a file that carries scripts starts untrusted; steps may not call `file.*`, `link.*` or `window.*` or pass a `path`. Scripts are stored as the hidden defined name `_sc_scripts`.
- **Web build**: same UI crate via the eframe web runner; URL flags `?sample=`, `?webgl`, `?chrome=none|notitlebar|nofiletab`, `?host=parent&author=`; **`data-host="page"`** lets a page host GridCraft in its own document (`apps/gridcraft-web/src/host.rs`); no TCP control channel. **`window.gridcraft`** is on the page in every mode: `request(method, params)` plus `execute`, `commands`, `docInspect`, `uiInspect`, `screenshot`, each a Promise with the shared page API's timeout; a call the app had not started is skipped (`apps/gridcraft-web/src/api.rs`).
- **Programmatic calls never open dialogs**: `file.open`/`file.save`/`data.getData`/`data.fromTextCsv` without a file path return "missing `path`…: programmatic calls never open dialogs".

## Known limitations and not-implemented

- **Partial:** `.xls` import covers values, formulas, number formats, **cell formatting (fonts/fills/borders/alignment)**, merges, sizes, names, print area/titles, validation, calc and WINDOW2 display settings; no charts, pictures, comments, conditional formats, hyperlinks or freeze panes; chart/macro/dialog sheets skipped, BIFF5 and FILEPASS refused. `.xlsb`/`.ods` stay data-only (values, cached formula results, names/merges; ODS also displayed text). `.slk` is values, R1C1 formulas, formats and widths only. None of the four is ever written.
- **The sandbox is groundwork, not a Python runtime.** `crates/sandbox` confines a spawned helper and only `sandbox-check` starts it today; Python cells still show `#BLOCKED!` for new or changed code and never execute (`docs/sandbox.md`, `crates/engine/src/cmd/python.rs`).
- **Regional formats are not wired.** `crates/core/src/region.rs` holds CLDR-derived conventions and `Workbook::region` exists, but no UI page, command or format path reads it; everything is en-US (`crates/model/src/workbook.rs`).
- **Encryption is read-only**: Agile and Standard `.xlsx` open with a password; saves are always unencrypted and have no save path, so Save asks where to go. RC4/Extensible and encrypted `.xls` are refused.
- **Macros never run.** VBA is carried byte-for-byte only into `.xlsm`/`.xltm`; any other save drops it. Recorded scripts are not VBA.
- **Python cells are storage, not execution** — no `PY` worksheet function.
- **Equations are LaTeX-source shapes.** OMML outside the supported subset comes back as a plain text box; macros, deep nesting and large matrices are refused rather than laid out.
- **Excel-repair-free output is still unproven for real files.** The Windows COM harness exists and the project reports 24/25 synthetic files opening cleanly; no real corpus yet. Unmodelled content is dropped when its owner is rewritten — slicers and slicer caches, timelines, the data model, query tables attached to tables, unmodelled `extLst`; chart sheets are passed through but cannot be viewed/edited/created.
- **Slicers/timelines:** slicers can be created and clicked in-sheet but are not saved to XLSX; timelines are catalogued but not implemented.
- **Charts are shallow:** no 3-D types, axis options (min/max/log/units), error bars or per-point formatting; data labels and gridlines are booleans; ~28 of Excel's ~60 subtypes (~47%); chart sheets are not editable; a chart is bounded at 100,000 points/series and 2,000,000 per chart. An **unedited** imported chart keeps its original XML, but a kept part's cached series values are not refreshed, and any edit writes GridCraft's simpler model.
- **PivotTables:** no calculated items, number grouping, timelines or data-model pivots; `pivot.filter` selects labels only (no Top-10/value filters there); Show Details/Enable show details exist, but PivotTable round-trip is unverified in Excel; clicking a PivotTable value does not insert a GETPIVOTDATA formula.
- **No Power Query or data model:** Get & Transform is only From Text/CSV, Get Data and From Table/Range; Refresh All refreshes PivotTables only. No From Web, Stocks, Geography, Relationships or Analyze Data.
- **Scale:** recalculation is single-threaded; the project reports ~100 MB workbooks failing to open (#175). Whole-range work is capped and refuses rather than hanging.
- **Text:** Devanagari and Thai are unverified in the grid and cannot export to PDF (no shaping path); PDF CJK uses a non-embedded CID font; no Arabic interface catalog or mirrored shell (RTL sheets mirror the grid and PDF geometry, not sheet tabs/scrollbars). Screen-reader behaviour in bidi text is unverified.
- **Accessibility:** AccessKit is enabled and some widgets set node labels, but grid cells and the ribbon are not exposed as an accessible tree; Check Accessibility is a basic scan; no high-contrast mode.
- **No VBA/Office Scripts/add-in or custom-function API, no collaboration/co-authoring, no mobile build, no in-app AI.**
- **Functions:** 9 of Excel's 523 names are absent (IMAGE, STOCKHISTORY, TRANSLATE, DETECTLANGUAGE, CALL, REGISTER.ID, RTD, COPILOT, PY) and 9 are error stubs (7 CUBE functions, WEBSERVICE, FILTERXML). `docs/function-parity.md` now agrees with the code (514/523 present, 505 working).
- **HTML is a table extractor, not a document model:** opening a saved page imports its table; `file.exportHtml` writes one sheet.
- **Objects:** inserted icons still lose their artwork on XLSX save (#551); Office InkML is not imported; pictures must be PNG/JPEG.
- **Form controls are three kinds only:** buttons, sliders, spin buttons; a button's action is a macro or a command, never a web page/dialog.
- **Save semantics:** only `.xlsx` and `.json` clear the dirty flag and become the document's file; `.csv/.tsv/.html/.pdf` are exports; `.xls/.xlsb/.ods/.slk` writes are refused. `file.close {force:true}` and `app.quit` discard unsaved changes silently.
- **Stale repo prose** (verify against code, not docs): `README.md` still says "89% of standard ribbon commands"; `docs/target-app-parity.md` still reports 281/296 (line 16) and "321 command ids" (line 58); `docs/gaps.md` and `docs/ui-parity.md` still say "59 command shortcuts" (command specs carry 72); `docs/cli.md` still says `.xls` imports no fonts/fills/borders (the adapter now maps them, plus validation); `docs/feature-names.md` still calls WordArt "pending". Prefer code and the generated `docs/parity-checklist.md`.

## How to operate

### macOS launch, flags, environment
- `open -a GridCraft`; `open -a GridCraft book.xlsx` — Finder double-clicks and `open` arrive as Apple events, and dropped files open too.
- The bundle's binary is `Contents/MacOS/GridCraft`. It takes only `[--control PORT [--control-token TOKEN]] [--sample budget|sales|grades] [--] [files…]`, plus `--version`/`-V`, which prints `GridCraft 0.20.0` and exits. **`--` ends the options**: everything after it is a file. There is **no `--help`**: any unrecognised flag becomes a file path and starts the GUI, so do not pass one. **Never pass the internal `--sandbox-launch`, `--sandbox-confined`, `--sandbox-probe-child` or `--sandbox-report` flags**, or the Launcher's `--launch-profile`/`--profile-root` (a stable build refuses the nightly profile with exit 2).
- **Nightly builds are a different app** (`GridCraft Nightly`, own profile/icons): they refuse `--control`/`--control-token`, own a separate preference/token folder, and are launched only by the ArtCraft Launcher. Do not expect a nightly to serve a control channel.
- Environment: `GRIDCRAFT_CONTROL_PORT=<port>`, **`GRIDCRAFT_CONTROL_TOKEN=<token>`** (the control channel requires it), `GRIDCRAFT_NO_PREFS=1` (agent test runs: no preferences or log file), `GRIDCRAFT_NO_NATIVE_MENU`, `GRIDCRAFT_SYSTEM_TITLEBAR=1`, `RUST_LOG` (default `warn,gridcraft*=info`).
- Settings/logs: `Library/Application Support/GridCraft/` in the user's home — `ui.json`, `prefs.json`, `logs/gridcraft.log` rotated to `gridcraft.1.log`/`gridcraft.2.log`, 16 MiB cap.

### Getting the CLI (the launcher installs the app, not the CLI)

The ArtCraft Launcher installs `GridCraft.app`; it does not put `gridcraft-cli` on your `PATH`.
It ships **no** CLI binary inside the bundle — the bundle holds only `GridCraft` — so a
launcher-only install has no `gridcraft-cli` at all. The CLI is published on the app's GitHub
release as `gridcraft-cli-0.20.0-macos-universal.zip` (**20.1 MB**, 21,049,868 bytes,
SHA-256 `bc35bdc767ee4e058688d4c96b70946163bfb2ed5aea009af6d9521d2b14f9cd`) at
`https://github.com/storytold/gridcraft/releases/download/v0.20.0/gridcraft-cli-0.20.0-macos-universal.zip`,
so `gridcraft-cli` answering *command not found* means "not installed yet", not "not supported".

Find it, in this order:

1. **On `PATH`** — `command -v gridcraft-cli`. If it answers, `gridcraft-cli --version` must report
   the version this skill was written against (0.20.0). A different version means the CLI and the
   app have drifted: re-read *Verify against your installed version* before trusting ids.
2. **Bundle copy** — Skip it: `find "/Applications/GridCraft.app" -name 'gridcraft-cli'` finds
   nothing (verified), so go to step 3.
3. **Install it from the release** — user-local, no `sudo`:

```sh
APP_VER=0.20.0
REL="https://github.com/storytold/gridcraft/releases/download/v$APP_VER"
ASSET="gridcraft-cli-$APP_VER-macos-universal.zip"
mkdir -p "$HOME/.local/bin" "$HOME/Downloads/gridcraft-cli" && cd "$HOME/Downloads/gridcraft-cli"
curl -fLO "$REL/$ASSET" && curl -fLO "$REL/SHA256SUMS.txt"
expected=$(grep -F "$ASSET" SHA256SUMS.txt | awk '{print $1}')
actual=$(shasum -a 256 "$ASSET" | awk '{print $1}')
[ "$expected" = "$actual" ] && echo "checksum OK" || { echo "checksum MISMATCH — stop"; exit 1; }
unzip -oq "$ASSET"
install -m 0755 "gridcraft-cli-$APP_VER-macos-universal/gridcraft-cli" "$HOME/.local/bin/gridcraft-cli"
"$HOME/.local/bin/gridcraft-cli" --version
```

The zip holds one folder with the 53.7 MB universal (x86_64 + arm64) executable plus licences and
README. `~/.local/bin` must be on `PATH` for the shell that runs the skill:
`export PATH="$HOME/.local/bin:$PATH"` (put it in your shell profile to keep it).

Rules: never `sudo` into `/usr/local`, never unzip into `/Applications`, and never replace an
existing `gridcraft-cli` of a different version without telling the user. Building from source
(`cargo install --path apps/gridcraft-cli --locked`) is a developer path only — full Rust toolchain,
minutes of compiling; prefer the release binary above.

### CLI usage

```sh
gridcraft-cli info book.xlsx [--json]
gridcraft-cli convert in.xls out.xlsx [--sheet Sales]     # input may be .xls/.xlsb/.ods/.slk/CSV/TSV/HTML;
                                                          # output .xlsx/.csv/.tsv/.json/.html/.pdf by extension
gridcraft-cli eval '=XLOOKUP("b",{"a","b"},{1,2})'        # → 2
gridcraft-cli eval '=GETPIVOTDATA("Sum of Sales",Sheet2!A3,"Region","East")' --in book.xlsx
gridcraft-cli cat book.xlsx --range A1:F20 [--formulas|--csv]
gridcraft-cli run --in book.xlsx --cmd 'cell.set={"cell":"D2","input":"=B2*C2"}' \
    --cmd 'analysis.addTotal={"range":"D2:D20"}' --out book.xlsx --print A1:D5
gridcraft-cli check corpus/ --json --tolerance 1e-9       # calc oracle + XLSX round-trip fidelity
gridcraft-cli sandbox-check                               # does this machine confine a helper process?
gridcraft-cli commands --search chart                     # every command and its params doc
gridcraft-cli functions --category statistical            # function list with signatures
gridcraft-cli send 7979 engine.execute '{"command":"home.bold","params":{"range":"A1:C1"}}'
```

- `run` flags: `--in FILE | --sample NAME`, repeated `--cmd`, `--script FILE`, `--out FILE`, repeated `--print RANGE|used`, `--sheet`, `--quiet`, `--csv`, `--formulas`. A `--cmd` is `id`, `id={json}` or `id {json}`; a script has one step per line as `id={json}` or `{"command":"id","params":{…}}`; blank lines and `#`/`//` comments are skipped; **unknown JSON keys are an error** (a typo once ran a command with no params, #2256). The first failing step stops the run non-zero.
- `convert` refuses an unknown output extension; `.pdf` goes through `file.exportPdf` and reports bytes/pages.
- `check` never writes next to its inputs; `--json` is schema `gridcraft-check/1`.
- `sandbox-check` prints `sandbox: available (…)`/`sandbox: unsupported (…)` first, then one line per attempt; it writes nothing.
- `gridcraft-cli --version` → `gridcraft-cli 0.20.0`; `--help` prints usage; `--launch-profile`/`--profile-root` exit 2.

### MCP
```sh
claude mcp add gridcraft -- gridcraft-cli mcp                     # headless in-process session
claude mcp add gridcraft-app -- gridcraft-cli mcp --connect 7979 # drive the visible app (loopback only)
```
Results are one text block holding pretty JSON; failures set `isError: true`. Unknown tools and missing/wrong arguments are JSON-RPC `-32602`; malformed JSON `-32700`; unknown methods `-32601`; a message over 16 MB is `-32600` and dropped. `--connect` refuses a non-loopback address (`PermissionDenied`) because the token travels in plain TCP. The remote backend uses a 30 s socket timeout: after a timeout, re-read the state instead of retrying blind. `list_windows` enumerates open workbook windows.

### Control channel (drive the running app)
```sh
GridCraft --sample sales --control 7979
# stderr prints the token file path (or use --control-token / GRIDCRAFT_CONTROL_TOKEN), then
# newline-delimited JSON to 127.0.0.1:7979 — the FIRST line must authenticate with the token:
{"id":0,"method":"auth","params":{"token":"<token>"}}
{"id":1,"method":"engine.execute","params":{"command":"cell.set","params":{"cell":"B2","input":"=SUM(A1:A9)"}}}
{"id":2,"method":"engine.execute","params":{"command":"insert.wordArt","params":{"text":"Q4","at":"D2"}}}
{"id":3,"method":"ui.screenshot","params":{"path":"shot.png"}}
```
- **Authentication is required**: a connection that does not authenticate first is closed, as is one that later sends a malformed line. The first line must arrive within 10 s and be at most 4 KiB; at most 16 connections may wait to authenticate; later lines are capped at 64 MiB. `gridcraft-cli send` reads the token file automatically.
- Run `ui.inspect` first (ribbon tab, editor, dialog, Backstage page, message, grid rect, scroll, perf, windows) and act on what it shows; `ui.screenshot` needs a presented frame. `ui.window.*` and `ui.selectionMode` are the new UI-only commands (desktop).
- Limits: 10,000 queued synthetic pointer events and 8 MiB of synthetic input (pointer, key, text, move share the budget; text alone 1 MiB); the server waits 60 s for the UI, then reports a timeout. A request the client abandoned is dropped unrun; one already started may finish — read the cell/state before retrying.
- The port binds localhost only and is token-authenticated; do not expose it. `ui.dialog.confirm` sends exactly what the dialog's OK sends.

### Document model and save/export flow
- **One native window per workbook window**: `view.newWindow` shares the workbook, `view.arrangeAll` tiles, `window.list`/`window.close` manage windows, `view.switchWindows`/`window.activate` switch workbooks. Sheet tabs at the bottom. File opens the Backstage with **9 pages**: home, new (three samples), open (recents), info, saveAs, print, export, options, account.
- Save (`file.save`, `file.saveAs`, ⌘S, ⇧⌘S): the extension picks the format — `.xlsx` (default), `.csv`, `.tsv`, `.json`, `.html`, `.pdf`; a `.pdf` save exports the sheet and leaves the document dirty. `file.saveBytes {format}` returns base64 without writing.
- Exports: `file.exportPdf`, `file.exportCsv`, `file.exportHtml`, `file.printPreview`, and on the desktop `ui.printSettings` / `ui.printSubmit` (native jobs via `craft-print`).
- Opening a `.xls`/`.xlsb`/`.ods` produces `<name> (imported).xlsx` with no save path; a `.slk` keeps its name and path, so a later Save is refused — **Save As `.xlsx` first**. Opening an already-open path switches to it; a password-decrypted workbook also has no save path.

### Keyboard essentials (verified)
- **72 shortcut bindings on command specs** (F3 Paste Names, Ctrl+8 Show Outline Symbols, Ctrl+Shift+U formula bar, Ctrl+. next corner), plus **5 macOS-only overrides**, plus a wider keymap table for number formats, borders, F-keys and Alt/Option combinations (`crates/ui-egui/src/keymap.rs`). The keymap is layout-aware: digits go by position (Ctrl+Shift+4 = currency) and punctuation by the character typed.
- Essentials: ⌘S save, ⇧⌘S Save As, ⌘O open, ⌘N new, ⌘W close, ⌘Z undo, ⌘Y redo; ⌘B/⌘I/⌘U; ⌘1 Format Cells; ⌘D fill down, ⌘R fill right; ⌃E Flash Fill; ⌘T table; ⌘K link; Ctrl+Shift+L filter; F2 edit; F3 Paste Name; Ctrl+Shift+4 currency; Ctrl+Shift+7 outline border; Ctrl+` show formulas; F9 calculate; Ctrl+[ / Ctrl+] precedents/dependents; Ctrl+6 hide/show objects; Ctrl+8 outline symbols; Ctrl+. next corner; Ctrl+Shift+U formula bar.
- **New:** Ctrl+Q (Control+Q on macOS) Quick Analysis; **F8** extend-selection mode, **Shift+F8** add-to-selection mode.
- Key tips: F10 (or left Alt on Windows/Linux/BSD), then sequence letters; **413 sequences** cover every ribbon tab, including the Excel 2003 menu paths.

## Working with an AI agent

**Prefer headless over GUI.** For read/write/convert/verify jobs use `gridcraft-cli` (or MCP) on files: no window, no preferences (set `GRIDCRAFT_NO_PREFS=1` if you launch the app), deterministic. Drive the GUI over the control channel only when the task is genuinely about the UI. Never drive blind — `ui.inspect`/`ui.screenshot` before and after.

Legitimate agent work:
- **Prepare inputs.** Build `.xlsx` from commands (`gridcraft-cli run --script steps.jsonl`), convert `.xls`/`.xlsb`/`.ods`/`.slk`/CSV/TSV/HTML into `.xlsx`, or generate CSV/TSV/JSON and import. Use `file.open {csvAsText:true}` when leading zeros must survive. An import opens as an unsaved "(imported).xlsx".
- **Interpret/repair files.** XLSX is native and documented in code. "Repair" means: open in GridCraft, inspect (`info`, `check`), fix with commands or formulas, save as `.xlsx`. Do not promise recovery of parts GridCraft does not model. Opening recalculates, so read a file's cached values through `gridcraft-cli check` rather than by opening it in a session.
- **Verify exports honestly.** Run `gridcraft-cli check` on round-tripped files, compare `cat`/`info` output, check PDF page counts/links. A zero exit means GridCraft agrees with itself and with the file's cached values; it does **not** prove Excel opens the file without a repair prompt (the project's COM harness is the closest evidence: 24/25 synthetic files clean, no real corpus).
- **Formatting extras.** Add totals/sparklines with `analysis.addTotal`/`analysis.addSparklines` (or Quick Analysis `ui.quickAnalysis`) instead of writing many formulas; both are one undo step. Insert WordArt with `insert.wordArt`, then change it with `wordArt.set`. Resize a chart's plotted block with `chart.setValuesRange` rather than deleting and re-adding the chart, so series formatting survives.
- **Right-to-left and Arabic work.** Set a cell's direction with `home.formatCells {range, style:{align:{reading_order:"RightToLeft"}}}` (or `Context` to follow the text); `view.rightToLeft` is a sheet-geometry switch and does not change text direction. **PDF Arabic now works** (shaped, embedded, RTL pages mirrored) when the Arabic face is available; Devanagari/Thai still cannot export — verify by rendering, do not promise them.
- **Pivot values.** `GETPIVOTDATA` evaluates in formulas and `gridcraft-cli eval`; clicking a pivot value while typing is still not wired, so write the formula yourself.
- **Scripts.** Recorded scripts are a convenience layer over the same command ids. A workbook received from elsewhere carries its scripts as a hidden name; nothing runs until the workbook is trusted, and script steps cannot touch files, links or windows. Clear a leftover undo group with `automate.stopAction`.
- **Sandbox checks.** Run `gridcraft-cli sandbox-check` (read-only) before relying on confinement; exit 2 means the platform has none. On this Mac it reports `sandbox: available (sandbox-exec …)` and exit 0. Do not claim Python cells run under it — they do not run at all.
- **Two views**: `view.newWindow` shares the workbook — two windows, one document; `list_windows` (MCP) and `window.list` enumerate them.
- **Objects and controls**: select an object with `ui.object.select` before clicking/dragging; use `control.list`/`control.setValue` instead of clicking a slider. `control.press` on a file-loaded workbook asks for approval.
- **Embedded web app**: a page can drive GridCraft through `window.gridcraft`; the same command ids and methods apply.

Must NOT attempt:
- Writing `.xls`/`.xlsb`/`.ods`/`.slk`, or saving password protection; expecting macros or Python to run; expecting slicers/timelines to survive a save; assuming a full HTML document import.
- Promising regional typing/display (German `1.234,56`, localized month names, Hijri via a region) — the region table is not wired; only the `B1`/`B2` format prefixes work.
- Raw XML surgery on `.xlsx` files that contain unmodelled parts: GridCraft's own writer is the supported path and drops parts it does not model once it rewrites them. Prefer read-only analysis.
- Promising PDF output for Devanagari or Thai (no shaping); Arabic is supported but needs the Arabic face — watch for "Some Arabic text could not be drawn in this PDF because no Noto Sans Arabic face was found for it."
- Calling `app.quit` or `file.close {force:true}` while a workbook has unsaved changes: both discard them silently. Save first.
- Connecting to a `--control` port without the token, or to a non-loopback host through `mcp --connect` (refused by design).

## Verification protocol

1. **Throwaway round-trip before real work**: new workbook → the exact edit → save `.xlsx` → reopen (or `gridcraft-cli info`/`cat`) → `gridcraft-cli check file.xlsx`. Add the source file itself to `check` when testing formula fidelity, and include a legacy (pre-dynamic-array) formula file if the task involves one.
2. **Never trust a silent export.** CSV/HTML/PDF are one-shot exports with no diff UI. Re-read or re-import the artifact. PDF export cannot render Devanagari/Thai; Arabic works when the face is present — render and inspect.
3. **Version and back up.** Keep the previous copy of any workbook you edit; autosave covers only workbooks that already have a file. For agent runs, save after each logical step (`--out`) rather than at the end.
4. **Update between projects, not during.** The app auto-updates through the ArtCraft Launcher; update, then re-run your round-trip before a new task. This skill was audited at GridCraft **0.20.0**; if the app prints a newer version, re-check the counts in `evidence.md` against the new tag.
5. **After a control/MCP timeout, re-read state** (`cell.get`, `sheet.read`, `document.inspect`) before retrying: a queued request is dropped, but one already taken may still finish.
6. **Trust deliberately.** Do not call `automate.trustScripts` on a workbook you did not create unless the user asked you to run its scripts.

## Sources & evidence

- Repo: https://github.com/storytold/gridcraft — inspected at tag **v0.20.0**, commit `fc9fd456b70041e7beced6d295085b83349c3ea3` ("Release: GridCraft v0.20.0"). The v0.19.1 tag (`476448d7d9f3a5f8e93fcf7d98b47fd52293fe7f`) was inspected for id and count diffs. The installed bundle `GridCraft.app` matches the tag: `Contents/Info.plist` reads `CFBundleShortVersionString` 0.20.0 / `CFBundleIdentifier` `ai.storyteller.gridcraft`, and its binary prints `GridCraft 0.20.0`. If your installed version differs, verify against it.
- Date of inspection: **2026-12-03**. Repo treated read-only (not built or modified; the app binary was run only with `--version`). The released `gridcraft-cli-0.20.0-macos-universal.zip` was downloaded to a throwaway scratch directory, checksum-verified, and used headlessly for `--version`, `commands`, `functions`, `mcp`, `run`, `check`, `sandbox-check` and PDF/JSON round-trips.
- Key files read: `README.md`, `Cargo.toml`, `ROADMAP.md`, `docs/{cli,mcp,control-protocol,parity-checklist,function-parity,chart-parity,file-format-parity,gaps,target-app-parity,formula-input,sandbox,feature-names,ui-parity,localization-parity,architecture}.md`, `apps/gridcraft-cli/src/{main.rs,sandbox_check.rs,check.rs,check/fidelity.rs,check/package.rs}`, `apps/gridcraft/src/{main.rs,control_server.rs,build_flavor.rs,launch_profile.rs,app_dirs.rs,logging.rs}`, `apps/gridcraft-web/src/{api.rs,host.rs,host_save.rs,web.rs}`, `crates/sandbox/src/{lib,policy,canary,probe,macos,linux}.rs`, `crates/engine/src/{io.rs,io/sylk.rs,lib.rs,sample.rs,catalog.rs,cmd.rs,chart_data.rs,chart_svg.rs}`, `crates/engine/src/cmd/{wordart,quick_analysis,controls,pivot,python,equation}.rs`, `crates/engine/src/cmd/pivot/charts.rs`, `crates/engine/src/cmd/data/validation.rs`, `crates/engine/src/cmd/extra/chart.rs`, `crates/engine/src/cmd/print.rs`, `crates/engine/src/cmd/print/objects.rs`, `crates/xlsx/src/{array_formula.rs,crypto.rs,csv.rs,drawing.rs,extlist.rs,ods.rs,xls.rs,xlsb.rs,package.rs,styles.rs}`, `crates/pdf/src/{lib.rs,arabic.rs}`, `crates/mcp/src/{tools.rs,server.rs,backend.rs,control_auth.rs}`, `crates/ui-egui/src/{control.rs,keymap.rs,quick_analysis.rs,backstage.rs,objects.rs,text_direction.rs,app/commands.rs,keytips/keytips.json}`, `crates/model/src/{features.rs,preserved.rs,paper.rs,style.rs,workbook.rs}`, `crates/calc/src/{eval.rs,pivotdata.rs}`, `crates/numfmt/src/{calendar.rs,decimal.rs}`, `crates/chart/src/resolve.rs`, `crates/math/src/lib.rs`, `crates/functions/src/{lookup.rs,info.rs}`, `packaging/windows/excel-open-check/{README.md,check.ps1}`.
- Counts were re-measured from code at `HEAD` and cross-checked against the released CLI: **391 commands** (`gridcraft-cli commands --json`), **282/296 catalog** (ids ∩ registry, matching generated `docs/parity-checklist.md`), **22 MCP tools / 3 resources / protocol 2025-06-18** (live `tools/list`, `resources/list`), **12 CLI subcommands** (dispatch arms), **35 control names / 30 arms** (`handle` match), **23 advertised UI-only ids** (the `engine.commands` array; `ui.quickAnalysis` is served but unlisted), **72 shortcuts** (live CLI + non-`None` spec argument; 5 `shortcut_mac`), **413 key-tips**, **19 languages**, **28 chart kinds**, **11 shape kinds**, **514/523 functions, 505 working** (live `functions --json` lists 516 including USDOLLAR and ECMA.CEILING), **14 check categories**, **9 Backstage pages**, **3 samples**, **24 paper sizes**, **10 WordArt presets**. `evidence.md` carries the exact recipes and raw output.
- Pinned shared code: craft-libs `8fa4db64a9bb943520259ea95331a303ba788f21` for every shared crate (craft-update, craft-window, craft-pdf, craft-stream-codecs, craft-cfb, craft-offcrypto, craft-ods, craft-opc, craft-csv, craft-math, craft-gridcraft-format, craft-xlsx, craft-xml, craft-xls, craft-drawingml, craft-mcp-server, craft-behavior, craft-host, craft-keymap, craft-theme, craft-print; craft-ui and the web crates in their own manifests); the egui 0.37 fork at `b9770908e0f304896f9658d239a7b29cf8af1564` and winit at `a517b3846ee8457d84ee4975110bfda6797c44dc` (`Cargo.toml`).
- Deeper per-topic reference (repo docs): `docs/target-app-parity.md`, `docs/gaps.md`, `docs/architecture.md`, `docs/parity-checklist.md`, `docs/sandbox.md`, `docs/file-format-parity.md`.

Files in this skill

  • SKILL.md20.4 KB
  • agents/openai.yaml142 B
  • evidence.md6.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.