/tableau-dashboard-plugin:tableau-mockfrom Tableau Dashboard Plugin
Renders an interactive HTML dashboard mock from DASHBOARD-PLAN.md and sample CSVs, with a coverage checklist proving every KPI, chart, filter, and interaction was rendered. Step 6 of 8 in the tableau-dashboard-plugin workflow.
Ships in Tableau Dashboard Plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Step 6 of 8, and non-skippable. It turns the strict DASHBOARD-PLAN.md into an
interactive mock.html demo — rendered at the plan's screen size and populated from the
real sample CSVs — that the analyst shares so the stakeholder can validate the
dashboard direction before any Tableau work begins. The mock ends with a coverage
checklist proving every plan element was rendered, so nothing is silently dropped
before the demo goes out.
| Reads | Required: DASHBOARD-PLAN.md (from plan) — the blueprint, including the screen size and every element/filter/interaction id; and the sample CSVs (data/*.csv, demo fallback scaffold/sample-data/*.csv) — the real rows the demo shows. Optional (enrich, never block): DESIGN-TOKENS.md (from brand; absent ⇒ neutral styling). |
| Writes | mock-version/<v_N>/mock.html — a full standalone deliverable copy (CONTRACT.md §4.3). |
| STATE.md update | Sets mock = approved and current_version to the target v_N; flips every downstream approved step (spec/build) to stale on a re-run (CONTRACT.md §4.2). |
| Entry gate | Refuses to run until plan is resolved and DASHBOARD-PLAN.md exists, and data is resolved and a sample CSV exists (CONTRACT.md §4.1). |
| Next step | tableau-spec (or tableau-route to confirm). |
The mechanical guarantees — the entry gate, the coverage checklist (every plan
element rendered), the slot-sizing guard (no compressed / out-of-bounds /
empty-space-heavy layouts), the version bump, and the STATE.md transition — live in
mock.py (CLI) and coverage.py (the checklist + guard core). Your job is the judgment
part: designing a faithful, attractive demo that renders the plan at its screen size with
real data. Run the script at the points below; do not hand-edit STATE.md.
coverage.py decides "rendered" mechanically, so the mock must carry two machine-readable
markers (see references/MOCK-SKELETON.html for a working example):
data-plan-id="<id>" on every rendered KPI, chart, filter control, and interaction
trigger. The <id> must match the plan's Elements / Filters / Interactions tables
exactly. A plan id with no matching data-plan-id is a coverage gap that blocks
approval — this is what makes "every element rendered" a guarantee, not a hope.<script type="application/json" id="mock-layout">
block giving the canvas size and a pixel box {id, x, y, width, height} for every
element id (KPIs/charts; filters and interactions need no box). The slot-sizing guard
reads it; the canvas width/height must equal the plan's Screen Size dimensions.Precheck. From the project directory, run:
python "${CLAUDE_PLUGIN_ROOT}/skills/tableau-mock/scripts/mock.py" precheck "<project-dir>"
(Use python3 if python is unavailable.) If it prints [BLOCKED], relay the reason
and stop — the analyst must resolve the named upstream step (tableau-plan for the
blueprint, tableau-data for the samples) first. Otherwise note its signals: the
canvas size to render at, the coverage targets (element/filter/interaction
counts), the target version path to write mock.html into (and whether this run
bumps the version because the mock was already approved), and whether
DESIGN-TOKENS.md is present.
Read the inputs. Read DASHBOARD-PLAN.md in full — its Screen Size, Layout Grid,
Elements, Filters, and Interactions tables are your build list; use the ids verbatim.
Read the sample CSVs (data/*.csv, or scaffold/sample-data/*.csv — if you fall
back to the demo samples, say so) and populate every chart/KPI from the real rows —
do not invent numbers. If DESIGN-TOKENS.md is present, apply its colors/typography;
if absent, use neutral styling.
Author mock.html at the precheck's target version path
(mock-version/<v_N>/mock.html). Render at the plan's screen size, lay out every
element in its planned slot, wire the filters and interactions, and tag everything with
data-plan-id + embed the mock-layout manifest (see the two conventions above and
references/MOCK-SKELETON.html). When refining an existing mock at this version,
Edit it in place. Keep the file self-contained (inline CSS/JS; no external fetches)
so the analyst can open and share it directly.
Slot sizing. Give each element a readable box inside the canvas — not so small it compresses (the guard rejects boxes under ~80×56px), not overflowing the canvas (out-of-bounds), and collectively filling the canvas (the guard rejects layouts that leave it mostly empty). Make the manifest boxes match what you actually render.
Self-check, then present. Validate the draft before showing it:
python "${CLAUDE_PLUGIN_ROOT}/skills/tableau-mock/scripts/mock.py" validate "<project-dir>"
It prints the coverage checklist (one line per screen size / element / filter /
interaction, each [x] rendered or [ ] <- MISSING) and the slot-sizing guard
result. If it prints [INVALID], fix the flagged gaps/violations and re-run. When it
prints [OK], show the checklist to the analyst (it's the proof nothing was
dropped) and present the mock for approval.
Commit — only after the analyst approves:
python "${CLAUDE_PLUGIN_ROOT}/skills/tableau-mock/scripts/mock.py" commit "<project-dir>"
Commit re-runs the full coverage + guard check (mock is non-skippable, so it only ever
sets approved). If it prints [REFUSED], fix what the checklist names and re-run. On
success it records mock = approved, sets current_version to the target v_N, and
reports any downstream steps it marked stale. Relay the summary and tell the analyst
to open a fresh conversation and run the next step (tableau-spec, or tableau-route
to confirm).
The plan's Filters table names a control type per filter. Render each as the Tableau
control it stands for, not as a bare browser widget. Never use a native <select multiple>
list box: it needs Ctrl+click and applies on every change.
| control type | render in the mock as |
|---|---|
dropdown (multi) / multi-select | a button showing the selection summary ("All", "2 of 5") that opens a checkbox list with an (All) row and an Apply button; the filter applies on Apply, not on each tick. |
dropdown (single) / single-select | a native <select> (one value, applies on change). |
date range | two <input type="month"> (or date) pickers, from and to. |
slider | a native <input type="range"> with the current value shown. |
When the plan puts filters in a sidebar slot, render it as a collapsible panel with a
Show/Hide control (see references/MOCK-SKELETON.html), unless the plan says otherwise.
The plan's interactions use these intent-level terms; render each so its intent is
demonstrable in the demo (the Tableau construct is chosen later, in spec):
| term | render in the mock as |
|---|---|
toggle panel | a control that shows/hides a region. |
swap view | a control that replaces one chart with an alternative in the same slot. |
drill | click-through between hierarchy levels (year → quarter → month) in place. |
cross-filter | clicking marks in one chart filters the others. |
highlight | clicking/hovering marks highlights related marks elsewhere (no filtering). |
parameter swap | a control that changes a measure/dimension/threshold across views. |
When DASHBOARD-PLAN.md declares more than one view, author one mock.html with a
tab strip and one .view-canvas per view (see references/MOCK-SKELETON.html). Each canvas
carries data-view="<name>" matching the plan; every element keeps its data-plan-id.
mock.validate checks coverage per view ? an id planned for view B missing from B's
canvas is a gap that names the view. A single-view plan (no view column) omits the strip
and renders exactly as today.
commit only ever sets
approved.mock.html lives under mock-version/<v_N>/ (CONTRACT.md
§4.3): re-running after approval bumps current_version to a fresh v_N and writes
a full standalone copy there, preserving prior versions; re-running before approval
overwrites the current v_N. The target path is reported by precheck.The full
STATE.mdschema and the ordering / staleness / versioning rules live inCONTRACT.mdat the repo root. This skill restates only its own slice;mock.py/coverage.pyare the executable mirror of the contract it enforces.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lavidrori0702/tableau-dashboard-creator-skill --plugin tableau-dashboard-plugin9 skills in this plugin
/tableau-brandExtracts design tokens (palette, type, spacing) into DESIGN-TOKENS.md for the tableau-dashboard-plugin workflow, so the mock and the Tableau workbook match the brand. Reads the analyst's branding/ (a branding.md spec and/or an org template .twb, plus logo/icons), or runs a short brand interview when none exists. Every value guessed from a Tableau default is flagged. Skippable only once branding/branding.md exists. Use when the user wants to set up branding/design tokens, or when tableau-route reports brand is next. Step 4 of 8 in the workflow./tableau-buildBuilds the Tableau workbook for the tableau-dashboard-plugin workflow from the approved IMPLEMENTATION-SPEC.md and DATA-MODEL.md, producing a Replace-Data-Source-ready dashboard.twbx beside the mock it was specced from. Derives a machine-readable build manifest (datasources, worksheets with chart type and shelves/encodings, the spec's layout container tree, actions, parameters, and the project's target Tableau version) and schema-validates it fail-fast, so an unknown chart type, an element id missing from the layout, or a field that is not in the data model is caught with the offending entry named before any XML is generated. Reads the approved IMPLEMENTATION-SPEC.md at the current version, DATA-MODEL.md, and the CSVs under data/. Use when the user wants to build the workbook, generate the twbx, or when tableau-route reports build is next. Step 8 of 8 in the workflow./tableau-dataAcquires the data for a tableau-dashboard-plugin project and writes the DATA-MODEL.md handoff artifact. CSV mode (the default, zero-credential path) profiles the analyst's data/*.csv into documented field names + types and validates that headers match exactly; the scaffold/sample-data/ demo CSVs are the fallback. The published-ds route (datasources.json + .env) samples published sources through the VizQL Data Service into data/*.csv. Use when the user wants to acquire or model dashboard data, build DATA-MODEL.md, or when tableau-route reports data is next. Step 3 of 8 in the workflow./tableau-initScaffolds a new tableau-dashboard-plugin project. Creates a scaffold/ folder of demo examples (EXAMPLE-DASHBOARD-REQUEST.md, EXAMPLE-datasources.json, .env.example, branding/EXAMPLE-branding.md, starter sample-data/) and initializes the STATE.md manifest, recording the target Tableau Desktop version so the build step never has to re-ask. Use when the user wants to start a new Tableau dashboard project, scaffold the workflow, or when tableau-route reports a fresh project. Step 1 of 8 in the workflow./tableau-intakeTurns a free-form dashboard request into a structured PRD.md for the tableau-dashboard-plugin workflow. Reads the analyst's DASHBOARD-REQUEST.md (or text pasted into the terminal, or the scaffold/ demo example) and authors a schema-complete PRD.md. Optional and idempotent — if a PRD.md already exists it offers to refine rather than overwrite. Use when the user wants to structure a dashboard request, write a PRD, or when tableau-route reports intake is next. Step 2 of 8 in the workflow./tableau-planProduces the strict DASHBOARD-PLAN.md for the tableau-dashboard-plugin workflow — the complete blueprint tableau-mock and tableau-build build against. Decides screen size here (so slot sizing is correct downstream), lays out a grid of named slots, and assigns every KPI, chart, filter, and interaction a stable id that later steps reference. Reads DATA-MODEL.md (field names) and, if present, PRD.md and DESIGN-TOKENS.md; proposes extra KPIs and patterns beyond the literal request. Use when the user wants to plan the dashboard, lay out KPIs/charts/filters, or when tableau-route reports plan is next. Step 5 of 8 in the workflow.Other plugins' skills for the same job