Command Palette

Search for a command to run...

Назад к скиллам
скилл № 01265

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от 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

  1. Look at the real data. Pick a representative output of the type with get_block_output, then inspect_data and preview_data, to learn its shape, axes, units, and metadata.
  2. 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.
  3. Create the folder. Write panels/<panel_id>/panel.json with "contexts": ["preview"] and types naming the registered types it shows, plus index.html.
  4. Build the view from SDK reads. Await scistudio.ready(), read the bound reference with bounded read(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.
  5. Add a sample. Write panel.sample.json with the reads the page makes, so the page can be checked without a host.
  6. Validate. Call validate_panel(path="panels/<panel_id>") and fix every error.
  7. 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

  1. Check the existing panels first. Call list_panels(kind="interactive"). For routing items from inputs to outputs use core.interactive.data_router; for fixing pairs use core.interactive.pair_editor. Write a panel only when no listed panel fits.
  2. Agree the two payloads with the block. Decide the plain JSON the block's prepare_prompt sends (the view) and the plain JSON decision the panel sends back, which the block reads as config["interactive_response"]. Write or update the block with scistudio-write-block.
  3. Create the folder. Write panels/<panel_id>/panel.json with "contexts": ["interactive"] (no types needed), plus index.html, and point the block's PanelManifest(panel_id="<panel_id>") at it.
  4. Build the page from the view. Await scistudio.ready() and render scistudio.input, the prepared view; an interactive panel has no read. Put each control next to its visible effect.
  5. Submit one decision. Validate the user's choice, then call writeBack(decision) once and disable confirmation; use cancel() only to withdraw.
  6. Add a sample and validate. Write panel.sample.json with a representative view, call validate_panel(path="panels/<panel_id>"), fix every error, and reload_blocks after changing the block.
  7. 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_router or core.interactive.pair_editor already 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 / complete in 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
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

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), без исполняемых скриптов.

Похожие скиллы

Сравнить scistudio-write-panel с