microsoft/flint-chart/assets

Claude Code and agent skill by microsoft/flint-chart

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when: the user asks to make or render charts with flint-chart, visualize tabular data, generate a ChartAssemblyInput, validate/render through MCP, or add Flint to a JS/TS project. Author the semantic spec, transform data before Flint when needed, install/import Flint only when executable code is needed, and reserve backend-specific style tweaks for after compiling from Flint.

Install

npx vskill@latest install microsoft/flint-chart/assets

SKILL.md

The same SKILL.md was published earlier as microsoft/flint-chart/assets.

flint-chart: authoring a chart spec

You write a ChartAssemblyInput: the data, the semantic_types of its fields, and a chart_spec naming the chart type and which field goes on which channel. Flint compiles it to Vega-Lite, ECharts, Chart.js or Plotly and decides the rest (scales, formats, layout, colours) from the semantic types.

What you produce (and what you do NOT)

Your output is the spec: the chart_spec and semantic_types of a ChartAssemblyInput. You reference data columns by name. The host passes the resulting input to assembleVegaLite, assembleECharts, or assembleChartjs to get a backend spec.

You write the input spec, not the output spec. And critically:

  • DO emit chart_spec (chart type, channel→field mapping, properties)

and semantic_types (field → semantic type).

  • DO add interaction_spec or updates only for a reason (see

"Interactions and updates").

  • Reference columns by name. How data itself gets bound depends on

the situation — a URL, a host-side variable, or embedded rows (see "How data gets bound"). Embedding is fine for small tables; just don't re-serialize a large dataset by hand, since that risks truncation and silent value corruption and wastes tokens.

  • Transform data before Flint. If the requested chart needs aggregation,

filtering, joins, pivots, derived columns, or long/wide reshaping beyond Flint's built-in static-series fold, use a coding, notebook, SQL, or data tool first. Then author the Flint spec against the transformed table.

  • Style after Flint, only when needed (see "Post-Flint style

customization"). Notes, shaded regions, emphasis and reference lines are Flint updates, not style edits.

On the Flint MCP server

  • Show it. When the user asks to see a chart, pass the whole spec to

show({ "chart": … }): a live card with an editing panel. There is no need to validate first: show checks the spec, and one with errors draws nothing and returns them, so fix and call show again. What it notes (warnings, update ops that will not apply) is drawn with; change nothing now unless the user asks, and fix it the next time the spec changes. validate_chart gives the same report without a card, for a host with no card UI.

  • The lightest view that answers. One question is one chart. An open

question ("how did X do", "what does this data say", "tell me something interesting") gets the one chart that answers it best, or two side by side only when it has two halves; name in your reply what else you could show, and draw it when the user asks. One view split by a category (a panel per region, same measure) is still one chart: put the category on column or row. A board is for when the user asks for one (a dashboard, an overview, KPI tiles, linked views, or several charts named in one turn): load the flint-board-author skill (get_flint_skill with board).

  • Nothing is kept. The spec in the conversation is the chart. To change

it, change the spec and call show again: a new card opens and earlier ones stay. A card's context gives the chart_spec with the reader's panel edits; pass it on unless the user asked for something else.

  • Numbers. view: "table" on show opens the card on the rows the chart

draws. Records with no chart are chartType: "Table".

  • Other tools. render_chart (PNG/SVG) only when the host has no app UI or

the user wants a static image; compile_chart for backend JSON.

  • Code. Adding Flint to an app, a notebook or a script is the

flint-app-author skill.

Data transformation before charting

Flint is a chart compiler, not a data-wrangling layer. If the chart needs grouped totals, time buckets, filters, joins, pivots, derived ratios, or a long-form table, transform the data first with a host tool, then bind the prepared table (see "How data gets bound"). Pick semantic types and channels for the transformed columns, not for columns that no longer exist.

Sanity-read the values first — don't chart blind. Inspect the actual data with your data tool (distinct values per category column, min/max per measure), not just the column names, and watch for:

  • Embedded totals. A category column may mix an aggregate level with its

parts (e.g. all alongside cage-free/caged, or a Total region). Charting the total with its parts double-counts and flattens the parts — keep one or the other on a stacked/grouped/colored channel, not both.

  • Units. Percentage accepts either a fraction (0–1) or a percent (0–100):

Flint reads which from the values and formats both as %. Don't rescale a column for Flint, and don't scale it twice.

  • One real entity. If your breakdown column has a single distinct value, the

per-group chart collapses to one mark — the intended breakdown is likely a different column.

How data gets bound

Use the binding mode that matches the runtime. Do not mix them.

  1. Direct MCP rendering: embed rows. When calling render_chart,

compile_chart, or validate_chart, the tool arguments are JSON. If the data is small or already transformed by another tool, pass it as data: { values: [...] }. Do not pass runtime variable names in MCP tool calls — the MCP server cannot see your local variables.

  1. Direct MCP rendering: reference a local file.

The flint-chart-mcp server can load data: { url: "..." } from local .json, .csv, or .tsv files. By default any local file the agent can name is readable (relative paths resolve against the working directory); a hardened deployment may reject local file references entirely via --disable-file-reference (or FLINT_MCP_DISABLE_FILE_REFERENCE), in which case pass rows inline with data.values. Remote URL fetching is disabled. If the data must be transformed first, use a coding/data tool to write a small prepared file, then reference that file.

  1. Generated application or notebook code: bind runtime variables. If the

user asks you to add Flint to code, write normal data-loading code first and pass a real runtime value, e.g. data: { values: rows }, to assembleVegaLite, assembleECharts, or assembleChartjs. This variable pattern is for generated code, not for MCP tool calls.

  • Parse CSV with a real parser (d3.csvParse, Papa Parse, pandas), never

line.split(','): quoted values such as "Korea, Rep." shift every later column, and a shifted measure silently changes the chart (a wrong domain, an unwanted log scale).

  • Keep values as the data has them and let semantic_types read them: a

number column year typed Year, and a YearMonth column as 202501, "202501" or "2025-01", are labelled as years and months; don't convert them to date strings first.

For spec-only answers, return the semantic_types and chart_spec pieces and state how the host should bind data. In the worked examples below, data is shown as { values: [] } to signal "host binds this" — focus on chart_spec and semantic_types.

Choose the chart type

list_chart_types lists every chart type with its channels and a one-line note on what it is for. Pick the type that answers the question, then call list_chart_types with that chartType before writing its encodings: it returns the type's guidance (what a map's id accepts, which bar chart takes a second category, a waterfall's Type column), its chartProperties with values and defaults, and the interaction presets it supports. Use names exactly as listed. Vega-Lite draws every type; the other backends draw a subset.

Without the tool, these are the Vega-Lite types and their channels; each type's properties and guidance are in the chart reference, https://microsoft.github.io/flint-chart/#/documentation/reference-vegalite:

"Area Chart": x, y, color, opacity, column, row
"Bar Chart": x, y, color, detail, opacity, column, row
"Bar Table": y, x, color, column, row
"Boxplot": x, y, color, opacity, column, row
"Bullet Chart": y, x, goal, color, column, row
"Bump Chart": x, y, color, detail, column, row
"Calendar Heatmap": x, color
"Candlestick Chart": x, open, high, low, close, column, row
"Choropleth": id, color, detail, text
"Connected Scatter Plot": x, y, order, color, detail, column, row
"Density Plot": x, color, column, row
"Donut Chart": size, color, column, row
"ECDF Plot": x, color, detail, column, row
"Gantt Chart": y, x, x2, color, detail, column, row
"Grouped Bar Chart": x, y, group, color, detail, column, row
"Heatmap": x, y, color, column, row
"Histogram": x, color, column, row
"KPI Card": metric, value, goal
"Line Chart": x, y, color, strokeDash, detail, opacity, column, row
"Lollipop Chart": x, y, color, column, row
"Map": longitude, latitude, color, size, shape, opacity, order, detail, strokeWidth, text
"Marginal Plot": x, y, color, size, shape, opacity
"Pie Chart": size, color, column, row
"Pyramid Chart": x, y, color
"Radar Chart": x, y, color, column, row
"Range Area Chart": x, y, y2, color, column, row
"Ranged Dot Plot": x, y, color
"Regression": x, y, size, color, column, row
"Ridgeline Plot": x, y, color
"Rose Chart": x, y, color, column, row
"Scatter Plot": x, y, color, size, shape, detail, opacity, column, row
"Slope Chart": x, y, color, detail, column, row
"Sparkline": x, y, color, detail, row, column
"Stacked Bar Chart": x, y, color, detail, column, row
"Streamgraph": x, y, color, column, row
"Strip Plot": x, y, color, size, column, row
"Table": none (`encodings: {}`)
"Violin Plot": x, y, color, row
"Waterfall Chart": x, y, color, column, row

Map fields to channels

Each channel maps to an encoding object { field, ... } (or a bare string shorthand, expanded to { field: "<string>" }):

json
"encodings": {
"x": { "field": "weight" },
"y": "mpg",
"color": { "field": "origin" }
}

Encoding object fields (all optional except field):

FieldValuesPurpose
fieldcolumn nameBind the channel to a data column
typequantitative, nominal, ordinal, temporalOverride the inferred encoding type (rarely needed)
aggregatecount, sum, average, meanForce an aggregation on a measure channel. A heatmap that gets several rows per cell aggregates its colour on its own (sum for additive types such as Quantity or Profit, average otherwise) and warns; set aggregate to choose
sortOrderascending, descendingSort direction; in Vega-Lite, direction alone preserves/reverses the semantic sequence
sortBymapped "x", "y", "color"; Vega-Lite also accepts a data field or JSON-array stringExplicit category ordering; see the Vega-Lite contract below
schemeVega scheme name (e.g. viridis, redblue), or a list of stops low end first (["#c0392b", "#f2f2f2", "#2e75b6"])Color scheme for the color channel; wins over the theme's ramp
reversetrue / falsecolor only: run the color scale the other way round
midnumbercolor only: where a diverging scale pivots, for this chart (the field's divergingMidpoint)
domain[low, high]color only: the measure extent the ramp spans, in place of the data's
binsinteger ≥ 2, or 0color only: quantize a continuous measure into that many steps; 0 keeps the ramp continuous
colors{ value: color }color only: colors bound to category values, for this chart (the field's colors)
titlea string, or nullThe name the channel's axis or key prints in place of the field's; null prints none

You usually don't need type, aggregate, or sortOrder — they're inferred from the semantic type. Set them only with specific intent.

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 30 Sep 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4,321
Repository forks
245
7-day trend score
42

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
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/microsoft/flint-chart/assets/badge)](https://verified-skill.com/skills/microsoft/flint-chart/assets)

Something wrong with this skill or its page? Tell us.