Skip to content

How The Skills Work

m4bwav edited this page Oct 4, 2026 · 1 revision

A skill is a set of written instructions the agent loads when a request matches its description. chartwright has two. This page follows each one through a request, from the text of the SKILL.md files and their reference files in version 0.8.4. Nothing here is hidden behaviour: you can read the same files in skills/chartwright/ and skills/chartwright-curate/.

Which skill loads

You ask for Skill
A chart or graph from data: "bar chart of sales by region", "visualize this CSV", "add charts to this report", a histogram, heatmap, sankey, treemap, sparkline or dashboard, or which chart fits a question chartwright
A change to the knowledge base: a new chart type or render target, a note or correction on an entry ("never suggest gauges to me"), research on a type it lacks ("what is a raincloud plot"), an audit for gaps and stale entries chartwright-curate
A graph of a codebase, or a flowchart or sequence diagram with no data neither (the descriptions send these elsewhere)

The two descriptions name each other in their "Not for" clauses, so a request goes to one of them, not both.

chartwright, step by step

Step 0, freshness. The agent reads evergreen.json beside the skill. If the skill's research is past its due date (2026-10-13 for 0.8.4), it says so in one line and does your task with what it has. Then, when the evergreen plugin is installed, it refreshes the research in the same session. It never holds up your chart for a refresh unless the chart depends on the stale fact.

Step 1, what kind of request.

  • A named chart with its fields ("line chart of price by date"): it checks the chart is not a misuse for your data (cw.py show <slug> --section not), then builds.
  • A question with no chart named ("how do I show signup drop-off?"): it picks one (step 2).
  • A document ("add charts to this report"): it reads the document once and lists every claim that carries a number or a comparison. It keeps the ones a reader would want to see, and plans one chart per claim with the claim as its title. With more than three charts it shows you the plan before building. Numbers that are only in the prose go into a small CSV beside the document first, so the build reads a file and the numbers can be checked.

With no data at all, it says so and offers a labelled sketch.

Step 2, pick. The agent reads kb/INDEX.md, a one-table summary of all 83 chart types, once per session, and never the whole kb/charts/ folder. Then it runs:

  1. cw.py data file.csv, for the kinds of the columns and a guess at the data's shape;
  2. cw.py pick --question "<your words>" --shape <shape> --json, for the top three chart types with reasons and warnings;
  3. cw.py show <slug> --section when not substitutes for the top pick. If a "when not to use" line matches your data, it takes the substitute that line names.

It then applies the judgment rules in kb/rules/selection.md: the message first, position over area over colour, series limits, no dual axes, no 3D. If you name a chart that is a poor fit, it builds what you asked with a one-line note. If the chart would mislead (a bar chart with a cut axis, a pie with 15 slices), it says so first. How pick scores is on How charts are picked and built.

Steps 3 to 5, target, build, check. The target follows where the chart will be read. A Markdown file gets Mermaid, a web page Vega-Lite or ECharts, and slides, Slack or email a PNG. An editable PowerPoint chart comes from pptx, and a chat reply gets the terminal target. If the destination is not clear, it asks in one line.

Before building, it compares the target's tested: record with your operating system. If the target has never been tested, has no entry for your system, or the output was never opened in the program that reads it, it tells you and asks whether to go on. It does not switch to another target on its own. If you go on and it works (or fails), it offers to record that with cw.py tested. See Render targets.

Then cw.py build, cw.py render, and a look at the image itself: overlapping labels, an empty plot, wrong axis types, dates off by a day. A chart that does not render is not done. The spec or script is saved beside the chart so it can be rebuilt. For colours and marks it follows the dataviz skill when that skill is installed, and otherwise the Okabe-Ito palette and the chart file's accessibility notes.

If you already run Microsoft's Flint MCP server and want its themes, the skill still picks the chart type, then hands Flint the spec.

Step 6, report. One to three lines: the chart type and the rule that chose it, the target, the file or block written, and how it was checked. A request that needed research, a new type or a correction is handed to chartwright-curate afterwards. A general preference you state ("never pies") is written to the skill's LEARNINGS.md, and a lesson about one chart type goes into that chart's notes with cw.py note.

chartwright-curate, step by step

Its job ends with a knowledge base that passes cw.py --strict validate, a regenerated kb/INDEX.md, and a changelog entry giving the reason.

It first checks the chart is not already there under another name, with cw.py list and a search of kb/charts/*.md for the name and its aliases. A chart that exists under another name gets an alias, not a new file. Then:

Request What it does What shows it was done
A chart type or question the index lacks Researches it from primary sources, then adds kb/charts/<slug>.md (cw.py new-chart) A research entry with sources, and a chart file that validates
A note or correction on a chart cw.py note <slug> "<text>", or an edited section A dated line in the chart file, or a changelog entry
A new place to render charts Adds kb/targets/<slug>.md (cw.py new-target), a support line in every chart file, and a builder and tests when the work is mechanical The target file, 83 updated chart files, passing tests
"Audit", "gaps", "what is stale" Runs validate, re-checks entries and updates their last_verified date The validate output and a report

Every path ends with cw.py --strict validate exiting 0 and cw.py index. A change to cw.py also runs the unit tests. The commands are on Commands.

Evergreen upkeep

Both skills are "evergreen" units. Each carries its research with dates, a changelog, a learnings file and an eval suite. Each is also due for a research refresh on a schedule: chartwright about every nine days, chartwright-curate every 30 days in 0.8.4. The refresh, test and tune steps come from the separate evergreen plugin. Without it, the skills still work. They tell you when they are past due, and nothing refreshes them.

Clone this wiki locally