scistudio-write-plot
Use when the user wants a quick figure of a block's output: a matplotlib, seaborn, or ggplot2 chart drawn from one output port and shown in the Plots tab…
от jiazhenz026★ 30 звёзд на GitHub
Установить scistudio-write-plot в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
scistudio-write-plot
1. What a plot is
A plot is a small script that draws a figure from one output port of one
workflow node. It lives in plots/<plot_id>/ as two files: plot.yaml, which
records the port the plot is bound to and how it renders, and a render script
(render.py or render.R) that defines render(collection). The figure shows in
the Plots tab of the GUI.
A plot is only for looking. It never becomes a workflow node, never edits the
workflow, and never produces data or lineage for another step. Use it for a quick
look while the user works. When the figure must be a saved, reproducible output
of the pipeline, write a block that produces an Artifact instead
(scistudio-write-block). When the user wants to change settings and watch the
figure respond, offer a MiniApp (scistudio-write-miniapp).
scaffold_plot writes plot.yaml for you; you normally edit only the render
script. The plot binds to the node id and output port, never to the node's
display label, so two nodes with the same label stay distinct.
2. Steps to write a plot
- Find the target. Call
list_plot_targetsand pick the target whose node and output port hold the data to plot. Checklatest_output_available; when it is false, the workflow has to run before the plot can draw. When the figure needs data from two or more ports, first combine them into one output (see "When a figure needs several outputs" in §4). - Pick a starting point (optional). Call
list_plot_examples(language=..., library=...)for a render body in matplotlib, seaborn, or ggplot2. - Scaffold. Call
scaffold_plot(plot_id=..., target_id=..., language=...)with thetarget_idfrom step 1, and read itswarningsandnext_step. - Write
render. Edit the render script: open the data fromcollection, draw the figure, and return it. - Validate. Call
validate_plot(plot_id=...)and fix every error. - Run. Call
run_plot_job(plot_id=...)and checkstatus. On failure, readerrorsandstderr, fix the script, and run again. - Look at the figure. A plot that ran can still be unreadable. Look at the rendered image and fix every visual problem listed in "Check the figure" (§4), then run again.
- Report. Tell the user the figure is in the Plots tab, and what it shows.
3. Anti-patterns
- Binding a plot by a node's display label instead of a
target_idfromlist_plot_targets. - Hand-writing
plot.yamlinstead of callingscaffold_plot. - Writing
render(collection, context); the entrypoint takes onlycollection. - Importing from SciStudio in the render script;
collectionis the whole interface. - Returning
Nonefromrender. - Reading a second port's output from files inside
renderbecause a plot binds to one port; combine the outputs into aCompositeDatatype instead. - Treating a plot as a workflow step: editing
workflows/*.yamlfrom a plot task, or expecting a plot to feed another block or appear in lineage. - Running a plot without
validate_plot, or reporting success without checkingstatus. - Reporting a plot as done without looking at the rendered figure.
- Treating the rendered file as a kept result; the next run overwrites it.
4. Defaults, tool sequence, and failure handling
What collection gives you. Python: collection.types, collection.items
(len, iterate, index, slice), collection.items.open_one() for the first item,
collection.items.open(max_items=n) for a list of items, and per item item.type,
item.metadata, and item.open(). R uses the same names with $
(collection$items$open_one(), collection$itemsi$open()).
open() returns plain objects:
| Item type | Python | R |
|---|---|---|
Array |
numpy.ndarray |
matrix (2-D) or array |
DataFrame |
pandas.DataFrame |
data.frame |
Series |
pandas.Series; a DataFrame when stored with two or more columns (a spectrum's lambda and intensity) |
vector |
Text |
str |
character |
Artifact |
pathlib.Path |
character path |
CompositeData |
dict of opened parts |
named list |
Package types reach the script as their core base type; an Image opens as an
Array. open() loads the data into memory under a size limit (64 MiB per input
by default), so for a large input open fewer items or read only what the figure
needs.
What render returns. Python: a matplotlib figure, a path to an image the
script wrote in its working directory, or a list of either. R: a ggplot object, a
path, or a list of either; base graphics drawn inside render are captured
without a return value.
Figure size and style. Both languages default to 6.4 × 4.8 inches. Python
plots also get a house style before render runs: large text (20 pt labels,
18 pt ticks and legend, 24 pt titles) and constrained layout, so they stay
readable in the Plots tab. Keep the default size unless the figure needs more
room: many categories, seve
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл scistudio-write-plot?
Use when the user wants a quick figure of a block's output: a matplotlib, seaborn, or ggplot2 chart drawn from one output port and shown in the Plots tab (e.g. "scatter the measurements from my segment-cells node", "show me a histogram of that output"). A plot lives in `plots/<plot_id>/` and is preview-only. Not for a figure that must be a saved pipeline output (write a block that produces an `Artifact` with scistudio-write-block) or for exploring a result interactively (scistudio-write-miniapp).
Как установить скилл scistudio-write-plot?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scistudio-write-plot запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…