microsoft/awesome-rayfin/visuals
Claude Code and agent skill by microsoft/awesome-rayfin
- vendor
Checking that the SKILL.md file is still in the repository.
Use when adding charts, KPIs, tables, slicers, or any visual to a dashboard. Charts are authored as Graphein chart specs — one chart = one JSON `ChartSpec` (type + tidy `data` + `encoding`) dropped into `<ChartCard spec={…} />`, which owns loading / empty / error and the app theme. Covers the spec model and the per-type recipes (line/area/bar/scatter/pie/heatmap/funnel/combo/histogram/ treemap/gauge/bullet/waterfall/calendarHeatmap/slope/dumbbell/table/matrix), declarative features (transform/annotations/insights/trendline/facet), the validate→repair→report self-check (graphein 0.16), headless preview against live data, the DAX→rows helpers (toChartData / toTable / topN / deriveKpi), `KpiCard`, `DataTableCard` (Graphein table/matrix), slicers (dropdown/list/search/date-range/range + FilterBar) with shared filter state, interactivity, layout, value formatting, and color tokens.
Install
npx vskill@latest install microsoft/awesome-rayfin/visualsSKILL.md
The same SKILL.md was published earlier as microsoft/awesome-rayfin/visuals.
Visuals — author a Graphein spec, drop it in a tile
One chart = one JSON spec. You don't hand-write SVG or wire a charting library. You (1) map your DAX result into plain rows, (2) author a single Graphein `ChartSpec` — a type, a tidy data array, and an encoding that names the columns — and (3) drop it into <ChartCard spec={…} />. The card owns the loading / empty / error states and bridges the app theme, so a spec never needs a color or a size.
Charts are `graphein` 0.16. That means a broad chart catalog (combo/dual-axis,histogram, treemap, gauge, bullet, waterfall, calendar-heatmap, slope, dumbbellon top of the classics), in-spec transforms and annotations (referencelines), and a self-correcting loop —validateSpec→repairSpec→summarizeplus a render report. Render each visual spec **headlesslyagainst live data to a PNG + report before ship: see the headless-preview**skill. This is the agent validation loop; KPI/table/matrix/slicers/dashboardrasterize to PNG too, so preview-validate every visual before shipping.
Three things are React surfaces around Graphein specs or state:
- KPIs →
<KpiCard>(big value + delta pill + sparkline). - Tabular data →
<DataTableCard spec={tableOrMatrixSpec}>(Graphein
table / matrix — virtualized, sortable, conditional formatting, totals).
- Filters → the slicers (
FilterBar+DropdownSlicer/…) over shared
filter state; chart selections can bridge into the same state.
Everything is exported from one barrel: `@/components/dashboard`.
Fast path
Optimize time to wow: ship one real tile, preview, user review, iterate.
Phase 1 — Hero slice: render ONE real visual the simplest way — map the hero query with toChartData(...), author a spec, pass it to a ChartCard. Pass loading / error straight from the query hook. That's enough to ship.
Phase 2 — Breadth: add the rest (metric band, more charts, a DataTableCard), wrapped in PageShell + StatStrip + DashboardGrid/Tile. Preview each visual as you add it before automatic ship.
Phase 3 — Polish: slicers, interactivity, multi-series, formatting, dark-mode review.
The data flow (map → author → drop in)
Every tile follows the same shape:
- Fetch with
useSemanticModelQuery({ connection, query })→
{ data, isLoading, error } (see the dax + fabric-data skills).
- Map the DAX result into the shape the visual wants. Helpers accept the
query result, a raw QueryTable, or undefined — no status check:
- Charts want tidy/long rows →
toChartData(result, options?). - Tables want a Graphein
tablespec →toTable(result, { columns }).
Hand-author a matrix spec over toChartData(result) rows for pivots.
- Author + pass. Put rows in a spec's
dataand hand the spec to the card
with loading + error. Don't pre-render skeletons/empty states — the cards do it.
Keep data tidy — split with series, don't pre-pivot
Graphein wants long/tidy data: one row per observation. To show multiple series (multi-line, grouped/stacked bars, stacked areas), add a series channel that points at the category column — do not widen the table into one column per category.
toChartData already returns long rows, so a normal DAX result drops straight in. (pivotChartData still exists for the rare case you truly need wide rows, but with Graphein you almost never do.)
Authoring a spec
A spec is a plain JSON object — no functions, no colors, no sizes:
- `encoding` is required for
line/area/bar/scatter(x+y),pie
(theta+color), heatmap (x+y+color), funnel/waterfall (stage/value), treemap (category+value), calendarHeatmap (date+color), dumbbell (category+value+group), and combo (x + per-layer y). gauge/bullet take a value (not encoding). FieldDef.type is quantitative | temporal | ordinal | nominal (inferred when omitted).
- Validate → repair → render.
validateSpec(spec)→{ valid, errors, warnings }
catches field-name typos and bad shapes; repairSpec(spec) auto-fixes many of them (returns the patched spec). Both are re-exported from the barrel. See Self-check below and the headless-preview skill. When a spec still renders wrong, set debug: true on it to swap the chart for a diagnostic view (live preview + resolved spec + data sample + validation + render report); clear the flag to render normally.
- Don't author `theme`.
ChartCardinjects the app's CSS-token theme (brand
color + dark mode) automatically. Recolor via src/global.css tokens, never per-spec hex.
Pick a type
| Goal | type | Key channels / options | ||
|---|---|---|---|---|
| Trend over time | line (area to emphasize volume) | x temporal, y, optional series; points, curve | ||
| Part-to-whole over time | area + stack: true | x, y, series | ||
| Compare categories | bar | x category, y, optional series; stack or grouped | ||
| Two measures, different scales | combo (dual-axis) | encoding.x + layers[] each `{ mark, encoding.y, axis: "left"\ | "right" }` | |
| Stage conversion | funnel | stage, value, optional `percent: "first" \ | "previous"` | |
| Running total / bridge | waterfall | stage, value (signed); totals for absolute bars | ||
| Composition of a total | bar + stack, or pie/donut | bar: series; pie: theta + color, donut, labels | ||
| Nested part-to-whole | treemap | category, value, optional group, color | ||
| Correlation / 3rd dim | scatter | x, y, optional size, series; trendline | ||
| Distribution of one measure | histogram | x (binned); bin controls | ||
| Density across two categories | heatmap | x, y, color, scheme | ||
| Value over a calendar | calendarHeatmap | date, color, scheme | ||
| Single value vs target/range | gauge / bullet | value (+ min/max; bullet adds target) | ||
| Before/after, two points per row | dumbbell | category, value, group (2 levels) | ||
| Rank change between two periods | slope | x (2 values), y, series | ||
| Headline metric | `KpiCard` (React) | not a Graphein chart spec — see Cards | ||
| Raw / detail records | `DataTableCard` with table spec | toTable(result, { columns }); see Cards | ||
| Pivot / cross-tab | `DataTableCard` with matrix spec | rows, columns, values, totals, conditional formatting |
Rules of thumb: prefer bar over pie beyond ~6 slices; stack for part-to-whole, grouped bars for direct comparison; combo only when two measures genuinely share an x but need different y-scales (don't reach for it by default).
Recipes (mirror the gallery)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 19 Sep 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/universal-app/.agents/skills/visuals/SKILL.md
Popularity
- Repository stars
- 95
- Repository forks
- 24
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/awesome-rayfin/visuals)