scistudio-write-panel
Create or improve a SciStudio HTML preview panel or an interactive workflow decision panel. Use scistudio-write-miniapp for a standalone data app…
от jiazhenz026★ 30 звёзд на GitHub
Установить scistudio-write-panel в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
scistudio-write-panel
1. What a panel is
A panel is an HTML page that SciStudio shows inside a sandboxed iframe. It reads data and acts only through the panel SDK, and its context decides what data and operations it receives. Choose the context from the user's intended outcome before writing frontend code.
| User needs | Route and runtime contract |
|---|---|
| A reusable view of a data type in previews | Preview panel: a bound data reference, bounded SDK reads, and optional child navigation. |
| A decision during a workflow run | Interactive panel: the block's prepared JSON view, followed by one JSON decision. Pair with scistudio-write-block. |
| A standalone app with repeated computation and exploration | Use scistudio-write-miniapp: its own tab, data reads, and optional resident Python. |
| A static figure or workflow computation | Use scistudio-write-plot or scistudio-write-block; those tasks do not automatically need GUI checks. |
For an existing panel, preserve its identity and reuse working code.
2. Steps to write a panel
Write a preview panel
- Look at the real data. Pick a representative output of the type with
get_block_output, theninspect_dataandpreview_data, to learn its shape, axes, units, and metadata. - Check what already exists. Call
list_panels(kind="preview", data_type="<type>"). When the user wants to change an existing panel, improve that one; when the user wants a different view, write a new panel beside it. - Create the folder. Write
panels/<panel_id>/panel.jsonwith"contexts": ["preview"]andtypesnaming the registered types it shows, plusindex.html. - Build the view from SDK reads. Await
scistudio.ready(), read the bound reference with boundedread(op, params)calls, and page or slice large data, never sampling or downsampling it. Give the data most of the space and keep its dimensions and aspect ratio. Add loading, empty, and error states. - Add a sample. Write
panel.sample.jsonwith the reads the page makes, so the page can be checked without a host. - Validate. Call
validate_panel(path="panels/<panel_id>")and fix every error. - Check it on real data. Preview a real output in the GUI, select your panel in the preview column's panel list, look at the first render, and try its main control (see "Check the result" in §4).
Write an interactive panel
- Check the existing panels first. Call
list_panels(kind="interactive"). For routing items from inputs to outputs usecore.interactive.data_router; for fixing pairs usecore.interactive.pair_editor. Write a panel only when no listed panel fits. - Agree the two payloads with the block. Decide the plain JSON the block's
prepare_promptsends (the view) and the plain JSON decision the panel sends back, which the block reads asconfig["interactive_response"]. Write or update the block withscistudio-write-block. - Create the folder. Write
panels/<panel_id>/panel.jsonwith"contexts": ["interactive"](notypesneeded), plusindex.html, and point the block'sPanelManifest(panel_id="<panel_id>")at it. - Build the page from the view. Await
scistudio.ready()and renderscistudio.input, the prepared view; an interactive panel has noread. Put each control next to its visible effect. - Submit one decision. Validate the user's choice, then call
writeBack(decision)once and disable confirmation; usecancel()only to withdraw. - Add a sample and validate. Write
panel.sample.jsonwith a representative view, callvalidate_panel(path="panels/<panel_id>"), fix every error, andreload_blocksafter changing the block. - Check it in a run. Run the workflow on representative input, open the paused block's window, make a decision, and confirm the block receives it and produces its outputs (see "Check the result" in §4).
Ask only for missing information that changes the purpose or scientific interpretation. Choose reasonable UI defaults for routine implementation details.
3. Anti-patterns
- An interactive panel with no button to submit the decision.
- Replacing the data with a summary the user did not ask for, such as a histogram of an image, which loses its spatial layout.
- Hand-writing tables, pagers, loading states, or heatmaps that the prebuilt components already provide.
- Writing an interactive panel when
core.interactive.data_routerorcore.interactive.pair_editoralready fits. - Sampling, downsampling, or decimating data to show it, instead of paging or scrolling through all of it.
- Reading unbounded data in one request, or ignoring
truncated/completein a read result. - Hardcoding a port, server root, mount token, or deployment prefix instead of relative SDK paths.
- Relying on
fetch, cookies,localStorage, project files, or the parent page; the ifram
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл scistudio-write-panel?
Create or improve a SciStudio HTML preview panel or an interactive workflow decision panel. Use scistudio-write-miniapp for a standalone data app, scistudio-write-plot for a static figure, and scistudio-write-block for the associated workflow computation.
Как установить скилл scistudio-write-panel?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scistudio-write-panel запускает скрипты?
Нет, скилл состоит только из инструкций (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…