/custom-visuals:deneb-pbirfrom custom-visuals
Extracts/embeds Vega/Vega-Lite specs from PBIR visual.json, renders offline to PNG/SVG, audits Deneb version stamps, and migrates container signal names. Use when editing Deneb visual specs or rendering without Power BI.
Ships in custom-visuals. 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.
Deneb stores its spec inside visual.json at visual.objects.vega[0].properties.jsonSpec.expr.Literal.Value, a single-quote-wrapped PBIR string literal with embedded ' doubled. Never hand-edit that string; use the scripts.
The general guidance to prefer the Edit tool for PBIR files exists because editor checkpoint/rewind can only revert Edit/Write changes, not script writes. This skill's scripted spec-embedding is a safe exception:
embedscript-patches visual.json but writes a.bakbeside it, which substitutes for checkpoint protection. Restore from the.bakinstead of relying on rewind.
Deneb 2.0 renamed the container signals (pbiContainerWidth / pbiContainerHeight became denebContainer.width / .height) and changed what a first open writes into visual.json, while reports in the wild stay on 1.9.1 until AppSource pushes 2.0 (GitHub release 2026-09-08, AppSource rollout expected around 2026-09-24; Verified 2026-09-08). So, before touching a spec, run the audit and read developer.version:
S="${CLAUDE_PLUGIN_ROOT}/skills/deneb-pbir/scripts/deneb_spec.py"
python "$S" audit "<...>/visuals/myDeneb/visual.json"
Then apply the rule in deneb-2-migration.md, Authoring rules during the transition: a visual stamped 2.0.0.0 or later uses denebContainer.*; a 1.x stamp, an unstamped file, or a target environment not confirmed on 2.0 keeps the legacy names (2.0 rewrites them at parse time; 1.9 cannot parse denebContainer, which is inferred from Vega's parser rather than observed in a 1.9.1 Desktop: see the --deneb 1.9 bullet under the renderer). Flip either way with migrate --signals (below).
gh release list -R deneb-viz/deneb --limit 3 for the current stable tag, and the Deneb blog for the AppSource date.1.9.1.0 and re-stamped it 2.0.0.0 (with denebMetaVersion, supportFieldConfiguration and consolidateFieldParameters) on the first save (Verified 2026-10-09). Re-run the audit after any Desktop save before choosing signal names.S="${CLAUDE_PLUGIN_ROOT}/skills/deneb-pbir/scripts/deneb_spec.py"
# 0. audit: which Deneb saved it, which signal names it may use (see above)
python "$S" audit "<...>/visuals/myDeneb/visual.json"
# 1. extract to a real JSON file (also validates it parses; adds a v6 $schema for the provider if the spec has none)
python "$S" extract "<...>/visuals/myDeneb/visual.json" -o spec.json --config config.json
# 2. edit spec.json normally (Edit tool, full JSON, no escaping)
# 3. verify offline BEFORE touching the report (see renderer below)
# 4. embed back (re-validates, strips the root $schema, writes visual.json + .bak)
python "$S" embed "<...>/visuals/myDeneb/visual.json" --spec spec.json
# 5. pbir validate, then the pbi-verify-loop skill if Desktop is open
provider in the same properties block says which grammar (vega / vegaLite); don't mix schema URLs.
Embed with embed, not pbir visuals deneb: pbir 0.9.32 and 0.9.33 write the literal without doubling the spec's ' characters, and Desktop then draws nothing at all for the visual while pbir validate passes (reports:pbir-cli references/cli-traps.md). embed leaves visual.json.bak inside the visual's folder; move it out of the .Report tree once the visual renders.
$schema never goes inside jsonSpec: Deneb 2.0 flags a root $schema in the Specification editor with a warning and a Quick Fix (the certified visual cannot fetch it and it disables autocomplete), and it does nothing for rendering. extract adds https://vega.github.io/schema/vega/v6.json or .../vega-lite/v6.json (matching provider) to the standalone file so editors and the renderer can use it; embed strips a root $schema again unless you pass --keep-schema.
Comments: Deneb's editors accept JSONC and blank the // and /* */ comments before JSON.parse (packages/utils/src/lib/jsonc.ts), so a saved jsonSpec may carry them (the upstream bullet-chart example does). Every command here, and the renderer, strips them the same way when strict JSON fails; extract and embed then write plain JSON, so comments do not survive an extract-edit-embed round trip, and embed re-serialises with indent 2, so a compact one-line literal comes back multi-line (same content). migrate rewrites the text in place and keeps both comments and layout.
npm install, then reuse)First use only: install the renderer deps once (they're gitignored, not shipped in the repo):
( cd "${CLAUDE_PLUGIN_ROOT}/skills/deneb-pbir/renderer" && npm install )
Then render (deps resolve from renderer/node_modules; do NOT reinstall per session):
node "${CLAUDE_PLUGIN_ROOT}/skills/deneb-pbir/renderer/render.mjs" spec.json out.png \
[--data rows.json] [--data-name dataset] [--scale 2] [--provider vega|vegaLite] \
[--width 600] [--height 400] [--deneb 1.9|2.0] [--strict]
# --strict is a 2.0-only gate; it is refused with --deneb 1.9
renderer/node_modules (gitignored) and resolve from anywhere once installed. package.json pins vega and vega-lite exactly to the Deneb 2.0.0.0 bundle (vega 6.4.0, vega-lite 6.4.3; 1.9.x shipped 6.2.0 / 6.4.1), so a spec that renders here parses under 2.0 (Verified 2026-09-08 against Deneb's package.json at tag 2.0.0.0).node -e "import('vega').then(v=>console.log(v.version));import('vega-lite').then(v=>console.log(v.version))" from the renderer folder, compared with vega and vega-lite in https://github.com/deneb-viz/deneb/blob/<tag>/package.json.--data with a JSON array of sample rows shaped like the visual's field mapping (dataset name defaults to dataset, Deneb's convention).$schema (fallback: mark/encoding heuristic). If the spec has no $schema, pass --provider with the value from the visual's provider property. JSONC comments are blanked before parsing, as Deneb does (the result line's notes says when that happened).--width / --height simulate the Deneb container (default 600 x 400). They seed the container signals the spec references and does not define itself (denebContainer, pbiContainer, pbiContainerWidth, pbiContainerHeight; Vega gets them prepended to signals, Vega-Lite to top-level params) and, like Deneb, size a spec that has no width / height: Vega gets denebContainer.width / .height, a standard-layout Vega-Lite spec gets "container" pinned to those values. Consequence: an unsized Vega-Lite spec renders at 600 x 400 rather than Vega-Lite's 200 px default (the kpi-card example PNG is 1200 x 800 at scale 2, it used to be 400 x 400), which is what Deneb shows in a 600 x 400 container.denebContainer value carries all six properties. scrollWidth / scrollHeight are seeded with the container size: Deneb seeds them 0 at compile time and its container observer overwrites them after the first render, and there is no observer offline, so a spec that positions against scrollHeight draws inside the container instead of at 0. scrollTop / scrollLeft stay 0 like Deneb.pbiColor (Power BI default palette, Deneb's shade algorithm, the named sentiment and divergent colours), pbiFormat and pbiFormatAutoUnit (a best-effort approximation of a Power BI format string: named formats, prefix/suffix, %, decimals, grouping and scaling commas; no locale, no date formats, first ; section only; never throws), pbiPatternSVG (returns the foreground colour, there are no pattern defs offline), pbiCrossFilterApply / pbiCrossFilterClear (no-ops, what Deneb does without a host), and the pbiColorNominal / pbiColorOrdinal / pbiColorLinear / pbiColorDivergent schemes. customFormatTypes: true is merged into the Vega-Lite config like Deneb does, so formatType: "pbiFormat" is honoured. Rendered text from pbiFormat is NOT Power BI's formatter output; check number formatting in Desktop.--deneb 1.9 exits 2 when the spec references denebContainer, which 1.9.x does not define (offline, vega throws Unrecognized signal name: "denebContainer"; that failure mode is inferred from Vega's parser and not yet reproduced in a 1.9.1 Desktop, Verified 2026-09-08 offline only). --deneb 2.0 prints Deneb's deprecation warning for legacy names, rewrites them over the raw text exactly as Deneb 2.0 does at parse time, and exits 0. --strict is a 2.0-readiness gate for CI: any legacy reference exits 2, and because a 1.9 target needs exactly those names, --deneb 1.9 --strict is refused with a usage error (exit 1) rather than a misleading "legacy signals found" failure. Detection runs on the raw text before parsing, so a legacy name inside a plain string (a title, a tooltip) is counted and rewritten too, as in Deneb.{"signal": "denebContainer.width"} as width into a Vega visual in a Desktop running Deneb 1.9.1.0 and read the log pane.compiled, vega, vegaLite, container, deneb, strict, injectedSignals, responsiveSizing, legacySignalReferences and denebContainerReferences (counts as found in the file, before any --deneb 2.0 rewrite) and notes, so an agent can read the verdict without parsing stderr.--scale alone controls PNG size (spec pixels × scale). .svg output extension skips sharp entirely.vega.textMetrics.width = (item, text) => ... from a per-character width table before the spec parses (Vega honours a user-defined width function); the widths can come from the installed font with Pillow, ImageFont.truetype("segoeui.ttf", 1000).getlength(ch) / 1000. Run it as a wrapper module that imports node_modules/vega/build/vega.module.js by file URL, patches it, then imports render.mjs: both resolve to the same module instance.import(), never require().audit <visual.json | spec.json> exits 0 whenever the file parses (it reports, it never fails a spec; a non-JSON file or a malformed jsonSpec literal exits 1 with an ERROR: line and no verdict) and ends with a verdict: line; --json prints the same report as JSON. A file with visual.objects.vega is treated as a PBIR visual, anything else as a bare spec or template. It reports:
What it reports, and the traps it flags (half-stamped visuals, consolidation defaulting on, frozen
__highlight, supporting fields that arrive undefined, enableContextMenu false, field-parameter
blocks, legacy signal names, usermeta v1 keys) with their retests, plus validating a template's
usermeta against the v2 schema, are in references/audit-report.md.
Read it before acting on a verdict.
migrate <visual.json | spec.json> [--signals modern|legacy] [--strip-schema] [--dry-run] writes a .bak first and refuses when nothing would change. --signals modern rewrites pbiContainerWidth to denebContainer.width, pbiContainerHeight to denebContainer.height, then bare pbiContainer to denebContainer (Deneb 2.0's order); --signals legacy is the exact reverse, so modern then legacy returns the original literal byte for byte. On a visual.json the rewrite is applied to the jsonSpec literal text and the rest of the file stays byte-identical. --strip-schema cuts the root $schema member out of the text and only re-serialises the spec (indent 2) when a textual cut is not possible.
Spec authoring rules (theme pbiColor, escaping, interactivity, responsive sizing) and the hard-won Deneb gotchas (cross-filter-out, per-point tooltips, validate-not-sufficient) live in the custom-visuals:deneb-visuals skill; the 1.9 to 2.0 compatibility matrix, what 2.0 writes on first open and the stamping rules are in its deneb-2-migration.md. This skill is the round-trip tooling only (audit / extract / embed / migrate / offline-render).
jsonConfig: {"background":"transparent","view":{"stroke":"transparent"},"font":"Segoe UI"}. Whatever config you settle on, keep jsonConfig consistent across the report's existing Deneb visuals.performant-matrix -- diagnose a slow matrix before assuming Deneb; the bridge/native/Deneb decisionWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub insightfulanalytics/pbi_agentic_dev --plugin custom-visuals7 skills in this plugin
/deneb-visualsDeneb visual creation, Vega/Vega-Lite spec authoring, and Deneb best practices for PBIR reports. Automatically invoke whenever the user mentions "Deneb" in any context, or asks about Vega/Vega-Lite specs in Power BI, Deneb cross-filtering, Deneb interactivity, pbiColor theme integration, Deneb field name escaping, or Deneb rendering issues./performant-matrixDiagnose a slow financial matrix before fixing it: separate row-dispatch cost from the per-cell format-string and conditional-formatting tax, then choose with the user between a bridge table, a native restructure or a Deneb grid. Use when a P&L or financial matrix is slow or will not render (SWITCH dispatch, a calculation group on rows, Performance Analyzer far above the DAX time)./powerbi-custom-visualsPower BI custom visual (.pbiviz) development with the pbiviz toolchain and its MCP server. Automatically invoke when the user mentions "custom visual", "pbiviz", "develop a Power BI visual", "powerbi-visuals-tools", "IVisual", "capabilities.json", "visual formatting model", "visual certification", "publish a visual to AppSource", or asks to scaffold, build, debug, package, certify, or publish a .pbiviz developer visual./python-visualsPython visual creation and matplotlib/seaborn patterns for PBIR reports. Automatically invoke when the user mentions "Python visual", "matplotlib in Power BI", "seaborn in Power BI", "pythonVisual", or asks to "create a Python visual", "add a matplotlib chart", "write a Python visual script"./r-visualsR visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to "create an R visual", "add an R chart", "write an R visual script", "inject an R script into Power BI"./svg-visualsSVG generation via DAX measures and extension measures with ImageUrl data category for inline visualizations in PBIR reports, including ready templates for matrix and table cells, new card images and per-button images on the new button slicer. Automatically invoke when the user mentions "SVG visual", "DAX sparkline", "SVG measure", "inline graphics with DAX", "ImageUrl data category", "extension measure", or asks to create any DAX-generated chart (progress bars, bullet charts, KPI indicators, data bars, gauges, donut charts, lollipop charts, dumbbell charts, status pills, overlapping bars, boxplots, IBCS bars, jitter plots, box-and-whisker charts).Other plugins' skills for the same job