skills/update-chart/SKILL.md
Create or modify charts using update_chart_block. Covers chart type selection, structured query and chart_details parameters, and verification with render_chart.
npx skillsauth add motleyai/agent-skills update-chartInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create or modify chart blocks using the update_chart_block MCP tool. You provide a structured query and chart configuration directly — no LLM intermediary.
update_chart_block with a query (what data to fetch) and chart_details (how to render it)render_chart to see the rendered PNG (this also triggers resolution)Returns: Confirmation that the chart was updated with a data preview. Does NOT return a rendered image — use render_chart for that.
| Type | Best For | Example | |------|----------|---------| | BAR | Categorical comparisons, rankings, time series with few points | Revenue by region | | LINE | Trends over time, continuous data, multiple series comparison | Monthly active users over 12 months | | PIE | Part-to-whole relationships, distribution (use sparingly, max 5-7 segments) | Revenue distribution by category | | FUNNEL | Conversion stages, sequential process drop-off | Sales funnel from lead to close |
y_axis: "right" on the secondary series.x_axis dimension with multiple measures, all as BAR type.update_chart_block(
location={doc_id: 42, slide_name: "Revenue Trends", block_name: "revenue_chart"},
query={
measures: [{name: "total_revenue", cube_name: "revenue"}],
time_dimension: {
dimension: {name: "created_at", cube_name: "revenue"},
granularity: "month"
},
limit: 12,
order: [{column: {name: "created_at", cube_name: "revenue"}, order: "ASC"}]
},
chart_details={
series_default: {type: "LINE", y_axis: "left", number_format: {style: "currency"}, show_values: false},
x_axis: {lines: false, label: false},
y_axis: {lines: true, label: "Revenue"},
y_right_axis: {lines: false},
title: "Monthly Revenue"
}
)
update_chart_block(
location={doc_id: 42, slide_name: "Regional Performance", block_name: "region_chart"},
query={
measures: [{name: "total_revenue", cube_name: "sales"}],
dimensions: [{name: "region", cube_name: "sales"}],
limit: 10,
order: [{column: {name: "total_revenue", cube_name: "sales"}, order: "DESC"}]
},
chart_details={
series_default: {type: "BAR", y_axis: "left", number_format: {style: "currency"}, show_values: true},
x_axis: {lines: false, label: "Region"},
y_axis: {lines: true, label: "Revenue"},
y_right_axis: {lines: false},
title: "Top 10 Regions by Revenue"
}
)
update_chart_block(
location={doc_id: 42, slide_name: "Overview", block_name: "dual_chart"},
query={
measures: [
{name: "total_revenue", cube_name: "orders"},
{name: "order_count", cube_name: "orders"}
],
time_dimension: {
dimension: {name: "created_at", cube_name: "orders"},
granularity: "month"
},
limit: 12
},
chart_details={
series: {
"total_revenue": {type: "BAR", y_axis: "left", number_format: {style: "currency"}, show_values: false},
"order_count": {type: "LINE", y_axis: "right", number_format: {style: "decimal"}, show_values: false}
},
series_default: {type: "BAR", y_axis: "left"},
x_axis: {lines: false, label: false},
y_axis: {lines: true, label: "Revenue"},
y_right_axis: {lines: true, label: "Orders"},
title: "Revenue vs Order Count"
}
)
update_chart_block(
location={doc_id: 42, slide_name: "Breakdown", block_name: "pie_chart"},
query={
measures: [{name: "total_revenue", cube_name: "products"}],
dimensions: [{name: "category", cube_name: "products"}],
limit: 5,
order: [{column: {name: "total_revenue", cube_name: "products"}, order: "DESC"}]
},
chart_details={
series_default: {type: "PIE", y_axis: "left", number_format: {style: "currency"}, show_values: true},
x_axis: {lines: false},
y_axis: {lines: false},
y_right_axis: {lines: false},
title: "Revenue by Category",
legend: {enabled: true, location: "auto", orientation: "VERTICAL"}
}
)
Charts are NOT resolved immediately after update_chart_block. The chart config is saved, but no data is fetched or rendered yet.
To see the chart:
render_chart(location={doc_id: ..., slide_name: ..., block_name: ...}) — this triggers resolution and returns a PNG imageAlways call render_chart after update_chart_block to visually verify the result.
render_chart(
location={doc_id: 42, slide_name: "Revenue Trends", block_name: "revenue_chart"},
width=800,
height=600
)
Check the returned image for:
If the chart doesn't look right, call update_chart_block again with adjusted query or chart_details.
| Issue | Solution |
|-------|----------|
| Wrong chart type | Set series_default.type explicitly (BAR, LINE, PIE, FUNNEL) |
| Missing data points | Check that the model has data for the requested time range. Use inspect_model to verify. |
| Too many categories | Add limit to the query |
| Wrong time granularity | Set time_dimension.granularity explicitly |
| Axis scale issues | Set scale: "LOG" on the axis, or use dual axis with y_axis: "right" |
| Unknown measure/dimension | Use inspect_model to see exact names |
| Wrong cube | Set cube_name on each measure/dimension explicitly |
explore-model skilldevelopment
Create branded HTML presentations using structured slide specs. Outputs JSON DeckSpec instead of raw HTML — the server handles all rendering, styling, and viewport fitting.
data-ai
Create or modify text blocks using update_text_block. Covers template syntax with variable references, LLM generation, and constrained outputs.
data-ai
Create or modify table blocks using update_table_block. Covers template syntax, target_shape constraints, and table generation patterns.
data-ai
Create or modify numerical query blocks within text or table blocks using update_query_block. Queries provide data values referenced as {query_name} in parent templates.