agentleFS
probabl-aiprobabl-ai/skore-skills/skills/plot-ml-figure/SKILL.md

plot-ml-figure

Skill144 starsChanged 17 days agoBSD-3-ClauseView on GitHub

Pick pandas, seaborn, plotly, or matplotlib before writing figure code. Trigger when explore-ml-data, evaluate-ml-pipeline, or audit-ml-pipeline is about to save or display a chart, or when the user asks for a plot. Not a session owner. Not for skore/sklearn Display plots that already exist on a report.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a skore report or sklearn Display already plots this, use it.

    line 28
  2. Very specific:

    If interactivity (hover, zoom, pan) is the requirement: Plotly Express.

    line 30
  3. Very specific:

    If the plot is statistical on a tidy DataFrame (distribution, categorical compare, relationship, heatmap, pairplot, facet): seaborn …

    line 39
  4. Very specific:

    If it is a simple Series/DataFrame bar / line / hist / area from the index or a few columns, no statistical overlay: df.plot(...).

    line 48
  5. Distinctive:

    Do not write a long matplotlib script for a hist, box, or bar of a Series.

    line 68
  6. Very specific:

    Do not load choose-python-library for matplotlib vs seaborn vs plotly.

    line 70
  7. Very specific:

    Do not pixi add / uv add / env add.

    line 72
  8. Distinctive:

    Do not install plotly on the default EDA path.

    line 73
  9. Very specific:

    Do not plt.close a figure that should appear in a notebook.

    line 74

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Plot ML Figure

Worker. Callers own the file and the turn. Do not git end-turn.

Details: references/when.md.

Sequence

  1. If a skore report or sklearn Display already plots this, use it. Stop.
  2. If interactivity (hover, zoom, pan) is the requirement: Plotly Express. Write <caller-figure-dir>/<slug>.html with include_plotlyjs=True (inline, offline). explore-ml-data uses data_analysis/. Do not overwrite that caller’s owned HTML (e.g. data_analysis_<slug>.html). The caller embeds <iframe src="<slug>.html" width="100%" height="640"></iframe> in its markdown beside the implication. Do not add kaleido unless the user asked to export a static image. No Dash. Do not use a CDN.
  3. If the plot is statistical on a tidy DataFrame (distribution, categorical compare, relationship, heatmap, pairplot, facet): seaborn figure-level when a notebook will display it ( displot, relplot, catplot, pairplot, heatmap via FacetGrid / axes only if already on a grid). Not a plt.subplots loop and not a for over columns with a trailing g. One figure-level call as the last expression; facet with col= / col_wrap. Save PNG, leave the figure/grid as the last expression. Never plt.close.
  4. If it is a simple Series/DataFrame bar / line / hist / area from the index or a few columns, no statistical overlay: df.plot(...). Save the figure (ax.figure.savefig(...)), leave ax.figure (or the axes) visible. Never plt.close.
  5. Else matplotlib. Last resort. In a notebook still save and display; do not plt.close.

Notebook cells: save for the caller markdown and show the figure in the notebook. plt.close is for non-notebook scripts only (evaluate/audit scratch probes if they are not notebooks).

Polars → pandas at the plot boundary. Missing import → add-python-package if installed; else name the package and return. api get before new symbols.

Missing this skill from a caller → that caller one-line skips and still follows this tree.

Stop conditions

  • Do not write a long matplotlib script for a hist, box, or bar of a Series.
  • Do not load choose-python-library for matplotlib vs seaborn vs plotly.
  • Do not pixi add / uv add / env add.
  • Do not install plotly on the default EDA path.
  • Do not plt.close a figure that should appear in a notebook.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.