microsoft/flint-chart/assets
Claude Code and agent skill by microsoft/flint-chart
- vendor
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/assetsSKILL.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_specorupdatesonly for a reason (see
"Interactions and updates").
- Reference columns by name. How
dataitself 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"onshowopens 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.
Percentageaccepts 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.
- 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.
- 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.
- 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_typesread 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:
Map fields to channels
Each channel maps to an encoding object { field, ... } (or a bare string shorthand, expanded to { field: "<string>" }):
Encoding object fields (all optional except field):
| Field | Values | Purpose | |
|---|---|---|---|
field | column name | Bind the channel to a data column | |
type | quantitative, nominal, ordinal, temporal | Override the inferred encoding type (rarely needed) | |
aggregate | count, sum, average, mean | Force 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 | |
sortOrder | ascending, descending | Sort direction; in Vega-Lite, direction alone preserves/reverses the semantic sequence | |
sortBy | mapped "x", "y", "color"; Vega-Lite also accepts a data field or JSON-array string | Explicit category ordering; see the Vega-Lite contract below | |
scheme | Vega 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 | |
reverse | true / false | color only: run the color scale the other way round | |
mid | number | color 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 | |
bins | integer ≥ 2, or 0 | color 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) | |
title | a string, or null | The 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
- SKILL.md in the repositoryCheckingpackages/flint-mcp/assets/flint-chart-author.SKILL.md
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
[](https://verified-skill.com/skills/microsoft/flint-chart/assets)