packages/web-shell/docs/examples/qwencode-viz/SKILL.md
Use this skill to emit chart blocks that a Qwen Code Web Shell host can render.
This skill defines only the model output contract; it does not load or execute
the chart runtime. The host client must already have registered an
echarts-fulldata renderer.
Use this skill only when all of these conditions are true:
echarts-fulldata fenced code block renderer.If any condition is not met, do not emit an echarts-fulldata block. Use normal
Markdown, tables, or prose instead.
Emit one fenced code block whose language tag is exactly echarts-fulldata.
The block body must be one valid JSON object that can be parsed directly with
JSON.parse. Do not emit JavaScript.
Preferred inline payload shape:
{
"version": 1,
"data": {
"kind": "inline",
"dimensions": ["day", "orders"],
"source": [
["Mon", 120],
["Tue", 200],
["Wed", 150],
["Thu", 80],
["Fri", 240]
]
},
"option": {
"title": { "text": "Weekly orders" },
"tooltip": { "trigger": "axis" },
"xAxis": { "type": "category" },
"yAxis": { "type": "value" },
"series": [{ "type": "bar", "encode": { "x": "day", "y": "orders" } }]
}
}
Legacy dataset-backed ECharts option JSON is also accepted when an envelope is not needed:
{
"title": { "text": "Weekly orders" },
"dataset": {
"dimensions": ["day", "orders"],
"source": [
{ "day": "Mon", "orders": 120 },
{ "day": "Tue", "orders": 200 }
]
},
"xAxis": { "type": "category" },
"yAxis": { "type": "value" },
"series": [{ "type": "bar", "encode": { "x": "day", "y": "orders" } }]
}
const option = ..., expressions, comments, trailing commas,
functions, or callbacks.eval, new Function, or script injection.document, window, or the filesystem.data.source, or in dataset.source for
legacy option payloads.xAxis.data, legend.data, or
series.data when dataset plus encode can express it.When a chart is appropriate, respond in this order:
echarts-fulldata fenced code block containing the complete JSON
payload.Do not nest the chart block inside any other Markdown container.
If there is not enough data to draw a chart, or if renderer support is unclear,
explain the reason in normal Markdown first. Do not guess by emitting an
echarts-fulldata block.