/writing-vizro-yaml
Use this skill when writing or debugging Vizro YAML dashboard configurations — component syntax, data_manager registration, custom function wiring, filter/parameter setup, or AG Grid tables. Activate when the user is building a Vizro app, encountering YAML or runtime errors, or
$ npx -y skills add mckinsey/vizro --skill writing-vizro-yaml --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/writing-vizro-yaml
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when writing or debugging Vizro YAML dashboard configurations — component syntax, data_manager registration, custom function wiring, filter/parameter setup, or AG Grid tables. Activate when the user is building a Vizro app, encountering YAML or runtime errors, or
SKILL.md
writing-vizro-yaml.SKILL.mdname: writing-vizro-yaml
description: Use this skill when writing or debugging Vizro YAML dashboard configurations — component syntax, data_manager registration, custom function wiring, filter/parameter setup, or AG Grid tables. Activate when the user is building a Vizro app, encountering YAML or runtime errors, or asking about Vizro component patterns.
Vizro YAML & Component Reference
Critical Mistakes to Avoid
Each mistake below is expanded with code examples and fixes in [yaml-reference.md](references/yaml-reference.md).
1. **`@capture("graph")` receives a DataFrame** — use `data_frame` directly; never re-lookup via `data_manager[data_frame]` (causes blank charts). 1. **`data_manager` is not subscriptable** — pre-process on raw DataFrame, then register. 1. **Custom `_target_` needs module prefix** — `_target_: custom_charts.my_chart`, not `_target_: my_chart`. 1. **`type: figure` has no `title` field** — KPI titles go in `_target_: kpi_card` args. 1. **`type: ag_grid` requires `_target_: dash_ag_grid`**. 1. **Parameter targets** — format: `"component_id.argument_name"`, not `"component_id.figure"`. 1. **Quote YAML special chars in column names** — `column: "Version #"` (unquoted `#` starts a comment). 1. **Filter `targets:`** — omit when you want to apply it to all components on the page whose data source includes defined filter `column`. 1. **Grid must be rectangular** — same component index must span same columns in every row. 1. **Column type consistency** — filter column must have same dtype across all targeted datasets.
Quick Patterns
# Standard chart (scatter — no aggregation needed, each row is one point)
- figure:
_target_: scatter
data_frame: sales_data
x: units
y: revenue
type: graph
title: Revenue vs Units
# KPI card (title inside figure args, NOT on component)
- figure:
_target_: kpi_card
data_frame: kpi_data
value_column: Revenue
title: Total Revenue
value_format: "${value:,.0f}"
type: figure
# AG Grid table
- figure:
_target_: dash_ag_grid
data_frame: sales_data
type: ag_grid
title: Sales Data
# Filter with targets
controls:
- column: region
targets: [chart_1, chart_2]
type: filterKey Imports
import vizro.models as vm
from vizro import Vizro
import vizro.plotly.express as px
from vizro.tables import dash_ag_grid
from vizro.figures import kpi_card, kpi_card_reference
from vizro.models.types import capture
from vizro.managers import data_manager
from vizro.themes import palettes, colors
Deep Dive
Load [yaml-reference.md](references/yaml-reference.md) when you need expanded guidance. Key sections to search for:
| Need | Search for | | ------------------------------ | ---------------------------- | | App structure | `## End-to-End Data Flow` | | Data registration | `## Data Registration` | | Custom charts | `## Custom Charts` | | AG Grid (heatmap, inline bars) | `## AG Grid Tables` | | Containers / Tabs | `## Containers` or `## Tabs` | | Expanded mistake fixes | `## Critical Mistakes` |
Read more
name: writing-vizro-yaml description: Use this skill when writing or debugging Vizro YAML dashboard configurations — component syntax, data_manager registration, custom function wiring, filter/parameter setup, or AG Grid tables. Activate when the user is building a Vizro app, encountering YAML or runtime errors, or asking about Vizro component patterns.
Vizro YAML & Component Reference
Critical Mistakes to Avoid
Each mistake below is expanded with code examples and fixes in [yaml-reference.md](references/yaml-reference.md).
1. **`@capture("graph")` receives a DataFrame** — use `data_frame` directly; never re-lookup via `data_manager[data_frame]` (causes blank charts). 1. **`data_manager` is not subscriptable** — pre-process on raw DataFrame, then register. 1. **Custom `_target_` needs module prefix** — `_target_: custom_charts.my_chart`, not `_target_: my_chart`. 1. **`type: figure` has no `title` field** — KPI titles go in `_target_: kpi_card` args. 1. **`type: ag_grid` requires `_target_: dash_ag_grid`**. 1. **Parameter targets** — format: `"component_id.argument_name"`, not `"component_id.figure"`. 1. **Quote YAML special chars in column names** — `column: "Version #"` (unquoted `#` starts a comment). 1. **Filter `targets:`** — omit when you want to apply it to all components on the page whose data source includes defined filter `column`. 1. **Grid must be rectangular** — same component index must span same columns in every row. 1. **Column type consistency** — filter column must have same dtype across all targeted datasets.
Quick Patterns
# Standard chart (scatter — no aggregation needed, each row is one point)
- figure:
_target_: scatter
data_frame: sales_data
x: units
y: revenue
type: graph
title: Revenue vs Units
# KPI card (title inside figure args, NOT on component)
- figure:
_target_: kpi_card
data_frame: kpi_data
value_column: Revenue
title: Total Revenue
value_format: "${value:,.0f}"
type: figure
# AG Grid table
- figure:
_target_: dash_ag_grid
data_frame: sales_data
type: ag_grid
title: Sales Data
# Filter with targets
controls:
- column: region
targets: [chart_1, chart_2]
type: filterKey Imports
import vizro.models as vm from vizro import Vizro import vizro.plotly.express as px from vizro.tables import dash_ag_grid from vizro.figures import kpi_card, kpi_card_reference from vizro.models.types import capture from vizro.managers import data_manager from vizro.themes import palettes, colors
Deep Dive
Load [yaml-reference.md](references/yaml-reference.md) when you need expanded guidance. Key sections to search for:
| Need | Search for | | ------------------------------ | ---------------------------- | | App structure | `## End-to-End Data Flow` | | Data registration | `## Data Registration` | | Custom charts | `## Custom Charts` | | AG Grid (heatmap, inline bars) | `## AG Grid Tables` | | Containers / Tabs | `## Containers` or `## Tabs` | | Expanded mistake fixes | `## Critical Mistakes` |
Vizro is a low-code toolkit for building high-quality data visualization apps.
Repo: mckinsey/vizro
Other skills on vizro.
- /dashboard-build
Use this skill to build, implement, and test Vizro dashboards (Phase 2). Activate when the user wants to create a working app, says "just build it", or has data ready for implementation. Requires spec files from the dashboard-design skill (Phase 1), or user confirmation to skip
Open skill - /dashboard-design
Use this skill first when the user wants to design or plan a dashboard, especially Vizro dashboards. Enforces a 3-step workflow (requirements, layout, visualization) before implementation. Activate when the user asks to create, design, or plan a dashboard. For implementation,
Open skill - /designing-vizro-layouts
Use this skill when designing or building Vizro dashboard layouts — grid configuration, component sizing, filter/parameter placement, selector types, or container patterns. Activate when the user is creating wireframes, defining page structure, placing controls, or sizing charts.
Open skill - /selecting-vizro-charts
Use this skill when choosing chart types, applying Plotly Express conventions, configuring colors, building KPI cards, or adding tables (AG Grid) to Vizro dashboards. Activate when the user asks which chart fits their data, needs custom chart functions, wants to set colors or
Open skill - /wiring-vizro-actions
Use this skill when adding cross-filter, cross-highlight, drill-through, or data export interactions to a Vizro dashboard — both for choosing the right interaction pattern during design and for implementing actions in code. Activate when the user wants clicks on a chart or table
Open skill

