/sigma-skills:sigma-reportsfrom Sigma Skills
Build, validate, retrieve, and update Sigma report code representations via /v2/reports. For fixed-layout reports, invoices, statements, regulatory documents, and PDF delivery. Not for responsive dashboards.
Ships in Sigma Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill for Sigma reports, the fixed-page authoring surface exposed
by /v2/reports. Reports are a private-beta resource. They share common
element shapes with workbooks but have a different resource lifecycle and a
different layout language.
Deprecated endpoints.
POST /v2/reports/spec,POST /v2/reports/spec/verifyandGET/PUT /v2/reports/{reportId}/spec(and the/v2/workbooks/.../specequivalents) are deprecated as of OpenAPI 2.0.0+20261030. UsePOST /v2/reports(dryRun: truevalidates without saving),GET /v2/reports/{reportId}?includeContents=trueandPUT /v2/reports/{reportId}/contents. The document moves from thedocumentkey tocontents(otherwise byte-identical). The data-model/v2/dataModels/specendpoints are not deprecated. The local authoring file in this skill ({name, folderId, document}) keeps itsdocumentkey; the validator accepts either, and the jq commands below re-key it for the wire.
Use a report for invoices, statements, regulatory packets, printable forms,
branded documents, and other outputs whose physical page size matters. Use
sigma-workbooks for responsive dashboards, exploratory analysis, application
workflows, containers, tabs, modals, drawers, or workbook navigation.
Never create a report by sending kind: report to a workbook endpoint. The
resource families are separate:
/v2/reports, /v2/reports/{reportId}, /v2/reports/{reportId}/contents/v2/workbooks, /v2/workbooks/{workbookId}, /v2/workbooks/{workbookId}/contents/v2/workbooks/{workbookId}/convertToReportUse the current compiled OpenAPI for endpoint envelopes and published shapes:
https://assets.sigmacomputing.com/openapi/public-rest-api/sigma-computing-public-rest-api.json
The report endpoints currently declare application/json only. Author JSON
unless a live request proves another media type works. The schema is broader
than the documented report contract, so a published element kind is not proof
that reports can safely author it. Read
reference/specification/support-matrix.md before selecting elements.
Live baseline, verified 2026-08-11: a JSON report with a warehouse-table
source, text, KPI, combo-chart, bar-chart, grouped presentation table, data
bars, a hidden dependency page, and header/footer panels passed /verify,
created successfully, survived GET readback, updated as a new document version,
and exported as a one-page landscape PDF with populated data. The support
matrix records which findings this proves and which schema-published features
remain gated.
Expanded baseline, verified from a populated five-page PDF on 2026-09-19:
custom-SQL sources on a hidden data page, comparative KPI scorecards, inline
SVG hero/band images, themed multi-page output, conditional tables, and a
column-backed waterfall-chart all rendered successfully. This evidence
supersedes the earlier policy that rejected waterfall charts and treated
report settings as unproven.
Shared-shape refresh, verified 2026-09-15 against the compiled OpenAPI and
non-persistent report /verify: common element pointers now use
{columnId: ...}, pivot shelves use {columnId: ...}, and
seriesLineAreaStyle is a list of {columnId, style} objects. Text/KPI
alignment uses directional values (left/center/right and
top/center/bottom), not start/middle/end. The old pointer, map, and
alignment forms returned HTTP 400 while the replacement forms verified
valid:true. Report PUT also publishes optional documentVersion for
optimistic concurrency.
Bursting baseline, verified 2026-10-16 from populated two-page PDFs: a
single-select list control filtering nine custom-SQL sources, per-value
exports through parameters, formula-driven conditional formats,
backgroundScale tints, scale-colored bars, theme-driven combo series colors,
and per-page footer panels. See reference/workflows/burst.md and
examples/store-operating-report/.
When documentation, this skill, and a live verify/readback disagree, prefer the live result and preserve the evidence. Run the bundled OpenAPI contract test against a fresh download when the API reports a shape error:
curl -sfL \
https://assets.sigmacomputing.com/openapi/public-rest-api/sigma-computing-public-rest-api.json \
-o /tmp/sigma-openapi.json
ruby scripts/test-openapi-contract.rb /tmp/sigma-openapi.json
sigma-api skill. Set SIGMA_BASE_URL and
SIGMA_API_TOKEN.documentVersion, and read back.curl -sf -H "Authorization: Bearer $SIGMA_API_TOKEN" \
"$SIGMA_BASE_URL/v2/whoami" > /tmp/whoami.json
Do not browse arbitrary reports. If the OpenAPI, scaffolds, and references do
not answer a specific shape question, list reports once, choose one relevant
reference, cache its spec, and use it only for that question. Obtain the
current schemaVersion from a relevant report GET or a user-provided target;
do not hardcode the value shown in examples.
Load reference/workflows/discover.md and resolve the report's source,
all paginated columns, grain, period rules, and page-slice counts before
drafting. The raw table-columns endpoint returns only 50 entries by default.
Load reference/workflows/generate.md. Classify the request as an executive/
board report, wide operational table, or statement. Generate a complete local
starting point instead of drafting raw JSON from nothing:
ruby scripts/scaffold-report.rb \
--template board \
--name "Quarterly Business Review" \
--folder-id "<folder-id>" \
--connection-id "<connection-id>" \
--company "ACME" \
--output /tmp/report-spec.json
Use --template wide-table for multi-page tabloid-landscape tables. Replace
the synthetic SQL/data labels while retaining the proven geometry, panels,
hidden data page, and explicit column contracts.
Always read:
reference/specification/schema.mdreference/specification/layout.mdreference/specification/support-matrix.mdreference/workflows/discover.mdreference/workflows/validate.mdAlso read reference/workflows/crud.md before an API write and
reference/workflows/convert.md before converting a workbook.
Common element internals, source formulas, and column shapes are published in
the same OpenAPI union used by workbooks. If sigma-workbooks is installed,
its table, chart, map, KPI, control, source, formula, and formatting references
are useful shape recipes. Apply only kinds allowed by the report support
matrix, and never copy workbook grid layout or workbook-only elements.
For shared shapes changed by the released code contract:
columnId, never id, in map channels and pivot
rowsBy/columnsBy shelf entries;seriesLineAreaStyle and theme colorOverrides as lists, not
ID/name-keyed maps;verticalAlign: top|center|bottom;layout.anchor: left|center|right and
layout.verticalAnchor: top|center|bottom;backgroundImage, backgroundColor, or pageWidth on a report
page: the released page schema is id/name/type/visibility only and the
API returns HTTP 400 for those keys (live-verified 2026-11-03); set size with
contents.config.pageWidth/pageHeight/margin;settings.theme.{name,overrides}, not the removed document-level
themeName/themeOverrides.Start with reference/specification/example-minimal.json. The create and
verify envelope is:
{
"name": "Monthly Statement",
"folderId": "<folder-id>",
"document": {
"schemaVersion": 1,
"kind": "report",
"config": {"pageWidth": 816, "pageHeight": 1056, "margin": 48},
"elements": [],
"pages": [{"id": "page-1", "name": "Page 1"}],
"layout": "<Page id=\"page-1\"></Page>"
}
}
Rules:
document.elements.elements inside them.document.layout XML.x, y, width, and height pixel values.header and footer regions.gridColumn, gridRow, container, tab, overlay, or
sidebar syntax.[Custom SQL/<alias>].ruby scripts/validate-spec.rb --mode create /tmp/report-spec.json
Fix every error. The validator catches pointer casing/targets, grouped-table mistakes, SQL contracts, overlaps, geometry, and representation shape. Warnings identify schema-only/unknown capabilities or visible detail columns that need a deliberate decision.
jq -c '{name, folderId, description, contents: .document, dryRun: true}
| with_entries(select(.value != null))' \
/tmp/report-spec.json > /tmp/report-dryrun-body.json
curl -s -X POST \
-H "Authorization: Bearer $SIGMA_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @/tmp/report-dryrun-body.json \
"$SIGMA_BASE_URL/v2/reports" \
> /tmp/report-verify.json
A dryRun: true POST checks server-side representation and dependencies without
creating a report (replaces /v2/reports/spec/verify). HTTP 200 means valid
({dryRun: true, reportId: null, warnings: [...]}, no valid key); HTTP 400
returns {dryRun: true, valid: false, errors: [{summary}]} with
contents.-prefixed paths — so do not use curl -f, which would hide the error
body. It does not prove the PDF layout is correct or that GET will
round-trip every UI feature.
After the user approves the persistent write and destination folder:
jq -c '{name, folderId, description, contents: .document}
| with_entries(select(.value != null))' \
/tmp/report-spec.json > /tmp/report-create-body.json
curl -sf -X POST \
-H "Authorization: Bearer $SIGMA_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @/tmp/report-create-body.json \
"$SIGMA_BASE_URL/v2/reports" \
> /tmp/report-create.json
The response is the report envelope (reportId, reportUrlId, url, path,
latestVersion, ...); there is no success key.
Save the submitted representation under a report-ID-specific path. Report the report URL, ID, and saved path.
Send create and update bodies as compact JSON (jq -c .). A pretty-printed
~96 KB PUT body was answered with a Cloudflare challenge page (HTML, not JSON)
while the same document compacted to ~66 KB was accepted; the dry-run (then
/verify) accepted both. Treat an HTML "Just a moment..." response as a transport block, not a
Sigma validation error.
Immediately GET the representation and compare normalized documents. Confirm that optional fields survived and that no element, panel, page, or setting was silently dropped. Then export the affected pages to PDF and inspect the actual page breaks, clipping, typography, header/footer repetition, and margins.
ruby scripts/verify-report.rb "<report-id>"
ruby scripts/render-report.rb "<report-id>" /tmp/report-render --layout portrait
Read every generated page-N.png. For dense tables, verify the final visible
row and each subtotal; for board reports, verify the narrative hierarchy,
KPI labels/deltas, chart axes, bridge start/end totals, and negative colors.
Do not claim parity from a successful POST or PUT alone.
Follow reference/workflows/crud.md. The short version is:
contents (the document key in a local authoring file).--mode update and run a POST /v2/reports dry-run
(dryRun: true) with a create envelope assembled from the current
name/folder and edited document./v2/reports/{reportId}/contents with
{"contents": {...}, "documentVersion": <version-from-GET>}. The
version is optional in OpenAPI but strongly recommended so a concurrent edit
fails (HTTP 400 stale_document_settings) instead of being overwritten.| File | Load when |
|---|---|
reference/specification/schema.md | Always. Wrapped envelope, document fields, pages, panels, response metadata. |
reference/specification/layout.md | Always. Pixel XML, bounds, page and panel placement. |
reference/specification/support-matrix.md | Always. Safe, gated, unsupported, and workbook-only kinds. |
reference/specification/example-minimal.json | Starting a new report representation. |
reference/workflows/discover.md | Finding sources/columns, proving grain, resolving periods, and sizing page slices. |
reference/workflows/generate.md | Generating executive/board reports, statements, or wide multi-page operational tables. |
reference/workflows/burst.md | One copy per store/account/recipient: report-level list control, per-value exports, schedule drafting. |
examples/store-operating-report/ | Worked, live-proven bursted statement: builder script, SQL contracts, recipient fallback, schedule drafter, demo prompt. |
reference/workflows/crud.md | Creating, retrieving, or replacing a report document. |
reference/workflows/validate.md | Before every verify, POST, or PUT and after readback. |
reference/workflows/convert.md | Converting an existing workbook into a report. |
| Symptom | Action |
|---|---|
unknown field, unexpected property, or missing field | Compare the endpoint against the compiled OpenAPI and rerun the contract test. |
Invalid kind after adding a channel or shelf | Replace legacy {id: ...} with {columnId: ...} and check list-vs-map fields. |
| A field or element disappears on GET | Re-send it with a non-default value before concluding anything — a field set to the server default is normalized out of the readback (KPI layout.verticalAnchor: center does this; top/bottom persist). If it disappears for every value, treat the representation as lossy and do not PUT until the omitted feature is removed intentionally or preserved another way. |
| Content overlaps or clips | Check pixel bounds, page dimensions, margins, and repeated panel height; inspect a PDF export. |
| A wide table clips or loses its final rows | Split it into explicit page-filtered table clones, budget row height, and inspect every rendered page. |
columnID, {id: ...}, or an unknown column pointer appears | Use exact columnId and a column ID declared on the owning element; run the local validator before verify. |
| A custom-SQL source renders unknown columns | Quote aliases in SQL and declare each with [Custom SQL/<exact alias>]. |
| A workbook grid attribute appears in report XML | Replace it with absolute x, y, width, and height. |
progress or synced control is requested | Stop or redesign; the published schema is not a safe report-authoring guarantee. waterfall-chart is supported using the proven shape in the board scaffold. |
| Conversion succeeds with warnings | Review every warning and its element IDs before accepting the generated report. |
| PUT/POST returns an HTML "Just a moment..." page | Cloudflare challenge triggered by body size. Re-send the same document as compact JSON (jq -c .); do not change the document. |
Combo chart color: {by: category, scheme} returns Invalid kind: "combo-chart" | A category color needs a column. To color measure series, set settings.theme.overrides.categoricalScheme (series take colors in yAxis order) and omit color. |
a column can only be on one channel at a time | Scale-coloring a chart by its own measure: add a duplicate column with the same formula for color.column. |
| KPI delta reads "vs vs …" | Sigma prefixes "vs" to the comparison column name. Name it for the period (PM, LY). |
A list control reads back as controlType: synced | Expected for report controls. Rebuild PUTs from the authored document, never the readback; confirm with GET /v2/reports/{id}/controls. |
Unknown column or Circular column reference in a rendered cell | Qualify the formula with the source element name ([Order Fact View/Net Revenue]). Bare [Column] against a data-model source passes verify, create, and readback, then renders as error text. |
Reports are private beta. Prefer explicit evidence and reversible local edits over speculative API writes.
examples/store-operating-report/README.md (opens in a new tab)examples/store-operating-report/build.rb (opens in a new tab)examples/store-operating-report/draft-burst-schedules.rb (opens in a new tab)examples/store-operating-report/recipients.sql (opens in a new tab)examples/store-operating-report/sql.rb (opens in a new tab)generated/cline/sigma-reports.md (opens in a new tab)generated/codex/AGENTS.md (opens in a new tab)generated/continue/sigma-reports.md (opens in a new tab)generated/cursor/rules/sigma-reports.mdc (opens in a new tab)reference/specification/example-minimal.json (opens in a new tab)reference/specification/layout.md (opens in a new tab)reference/specification/schema.md (opens in a new tab)reference/specification/support-matrix.md (opens in a new tab)reference/workflows/burst.md (opens in a new tab)reference/workflows/convert.md (opens in a new tab)reference/workflows/crud.md (opens in a new tab)reference/workflows/discover.md (opens in a new tab)reference/workflows/generate.md (opens in a new tab)reference/workflows/validate.md (opens in a new tab)scripts/extract-openapi-contract.rb (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sigma-reports, fixed-layout, pdf-generation, report-bursting
6 skills in this plugin
/custom-sql-to-data-modelScan Sigma workbooks for custom SQL elements, dedupe across workbooks, build or reuse Sigma data models, then repoint the workbooks via the v3alpha `:swapSources` endpoint. Use when you want to find ad-hoc SQL in workbooks and promote it to one reusable data model per unique query./sigma-apiAuthenticate against the Sigma Computing REST API and obtain a bearer token. Use whenever the user wants to call the Sigma API directly with curl/HTTP, exchange OAuth client credentials for an access token, sign in interactively via a browser OAuth login (authorization-code + PKCE), configure SIGMA_BASE_URL / SIGMA_CLIENT_ID / SIGMA_CLIENT_SECRET, troubleshoot 401/403 responses, or pick the right Sigma API hostname for their cloud. Use as a prerequisite when another Sigma skill needs an SIGMA_API_TOKEN./npx claudepluginhub twells89/sigma-skills --plugin sigma-skillsOther plugins' skills for the same job