make-chart
Skill22 starsChanged 10 days agoMITView on GitHub
Render a Vega-Lite JSON specification to a PNG chart image using the vl2png command from the vega-cli package. Write the spec to <slug>-spec.json in the working directory, install vega-cli and vega-lite if missing, then run vl2png at 2x scale. Supports bar, line, point, area, and other Vega-Lite v5 mark types.
- Installs packages
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dependency-analyzerSkill
- docsSkill
- handoffSkill
- openai-reviewerSkill
- plugin-homeSkill
- schema-validatorSkill
- security-auditSkill
- session-auditSkill
- test-validatorSkill
- claude-codeSkill
- codexSkill
- opencodeSkill
- chartsSkill
- export-csvSkill
- export-excelSkill
- make-html-reportSkill
- make-pdfSkill
- a2a-communicateSkill
- a2a-handle-inboundSkill
- codebase-inspectionSkill
- ethos-skill-authoringSkill
- native-mcpSkill
- github-authSkill
- github-code-reviewSkill
- github-issuesSkill
- github-pr-workflowSkill
- github-repo-managementSkill
- birth-ritualSkill
- get-to-know-youSkill
- xurlSkill
- arxivSkill
- grounded-citationsSkill
- research-paper-writingSkill
- reddit-researchSkill
- code-reviewSkill
- coding-agentSkill
- planSkill
- requesting-code-reviewSkill
- spikeSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tddSkill
- writing-plansSkill
- no-ai-slopSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 105
Always set "width" and "height" explicitly.
- Distinctive: line 121
If the install fails (no npm, no network, permission denied), stop and tell the user:
- Distinctive: line 126
Do not proceed further.
- Distinctive: line 154
All generated files go to the working directory.
- Distinctive: line 155
Always tell the user the exact output path after completion.
- Very specific: line 156
If vl2png install fails, show the fallback message verbatim — do not proceed.
- Very specific: line 157
Always use data.values (inline data) in the spec — never data.url.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Make Chart
Render a Vega-Lite JSON specification to a PNG chart image. Write the spec to <slug>-spec.json, then run vl2png to produce a PNG at <slug>.png — both relative paths, resolved inside the working directory. Supports bar, line, point, area, and any other Vega-Lite v5 mark type.
When to use this skill
- User asks to create a chart, plot data, generate a bar chart / line chart / scatter plot / area chart, or visualise data as an image.
- User wants a PNG or image of a chart to embed in a document or share.
- User says "visualise this", "chart this", "make a graph of this data".
When NOT to use this skill
- User wants an interactive chart (use an HTML file with Vega-Embed instead).
- User wants a PDF or HTML report — use
make-pdformake-html-report. - The data doesn't have a clear chart type — ask the user which type they want before proceeding.
- User wants a pie chart: Vega-Lite uses
"mark": "arc"withthetaencoding for pie/donut charts — still valid, but confirm the user is aware it's a donut by default.
Vega-Lite spec format
Vega-Lite v5 specs are JSON objects. The minimal structure:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 600,
"height": 400,
"data": {
"values": [
{ "category": "A", "value": 42 },
{ "category": "B", "value": 28 },
{ "category": "C", "value": 61 }
]
},
"mark": "bar",
"encoding": {
"x": { "field": "category", "type": "nominal", "axis": { "labelAngle": 0 } },
"y": { "field": "value", "type": "quantitative" },
"color": { "field": "category", "type": "nominal" }
}
}Common mark types: "bar", "line", "point", "area", "arc" (pie/donut), "rule", "text".
Field types: "quantitative" (numbers), "nominal" (categories), "ordinal" (ordered categories), "temporal" (dates).
For a line chart, use "mark": "line" and set "x" to a temporal or ordinal field:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 600,
"height": 400,
"data": {
"values": [
{ "month": "2026-01", "revenue": 12000 },
{ "month": "2026-02", "revenue": 15400 },
{ "month": "2026-03", "revenue": 11800 }
]
},
"mark": { "type": "line", "point": true },
"encoding": {
"x": { "field": "month", "type": "ordinal" },
"y": { "field": "revenue", "type": "quantitative", "title": "Revenue ($)" }
}
}Workflow
Step 1: Write the Vega-Lite spec
Construct the spec from the user's data and chart request. Use write_file to write it to a relative path, which resolves inside the working directory:
<slug>-spec.jsonWhere <slug> is a lowercase-hyphenated identifier derived from the user's request (e.g. monthly-revenue, category-breakdown).
Always set "width" and "height" explicitly. A good default is 600 x 400. For wide charts (many categories), use 800 x 400.
Step 2: Check if vl2png is installed
which vl2png 2>/dev/null || echo "not found"Step 3a: If found — proceed to Step 4.
Step 3b: If not found — attempt install
npm install -g vega-cli vega-liteIf the install fails (no npm, no network, permission denied), stop and tell the user:
"This skill requires vega-cli. Run:
npm install -g vega-cli vega-liteIf npm is unavailable, ask your system administrator to install it."
Do not proceed further.
Step 4: Render the PNG
vl2png <slug>-spec.json <slug>.png --scale 2The command runs with the working directory as its cwd, so both relative paths resolve there.
--scale 2 doubles the resolution for crisp rendering on high-DPI displays.
Step 5: Confirm to the user
Tell the user:
"Chart created at:
<slug>.pngin the working directory — visible in the Documents tab."
Anti-patterns
- Do not omit
$schema—vl2pngmay default to an older schema version and produce incorrect output. - Do not pass URLs as
data.url—vl2pngruns locally and cannot fetch remote data. Always usedata.valueswith inline data. - Do not omit
widthandheight— default sizes are small and produce low-quality PNGs. - Do not use
--scale 1— the output will look blurry on most screens;--scale 2is the minimum for quality output. - Do not use mark types not in Vega-Lite v5 — check the spec before writing it.
Hard rules
- All generated files go to the working directory. Always write a relative path — never write outside the working directory.
- Always tell the user the exact output path after completion.
- If
vl2pnginstall fails, show the fallback message verbatim — do not proceed. - Always use
data.values(inline data) in the spec — neverdata.url. - The slug must be lowercase, hyphen-separated, and contain no spaces or special characters.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

