Command Palette

Search for a command to run...

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

penguiflow-rich-output

Add structured UI components (charts, tables, reports, grids, tabs, accordions, forms) to a PenguiFlow ReactPlanner — enable rich output via…

БесплатноБез исполняемых скриптов
hurtenerот hurtener★ 27 звёзд на GitHub

Установить penguiflow-rich-output в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

PenguiFlow Rich Output

When to use

  • The agent needs to render charts, tables, reports, grids, tabs, accordions — not just markdown.
  • You need interactive UI tools (ui_form, ui_confirm, ui_select_option) for structured user input.
  • You want typed planner-side validation against a component registry.
  • You want builder tools that compose reusable payloads referenced by artifact_ref.

When NOT to use

Hard boundaries

This skill is the rich-output tool surface and component contract. The frontend renderer is your app's responsibility — this skill specifies what the backend emits and the wire shape, not how to draw it. The penguiflow-reactplanner-config skill no longer enumerates rich-output bullets; this skill owns them.

Workflow

1) Enable rich output

from penguiflow import ModelRegistry
from penguiflow.catalog import build_catalog
from penguiflow.rich_output.runtime import RichOutputConfig, attach_rich_output_nodes

registry = ModelRegistry()
rich_nodes = attach_rich_output_nodes(
    registry,
    config=RichOutputConfig(
        enabled=True,                              # default is False — must opt in
        allowlist=["markdown", "echarts", "datagrid", "report", "grid", "tabs", "accordion"],
        # include_prompt_catalog=True,             # library default
        # max_payload_bytes=250_000,               # library default
        # max_total_bytes=2_000_000,               # library default
    ),
)
catalog = build_catalog(list(rich_nodes), registry)

RichOutputConfig.enabled=False is the library default — nothing renders until you flip it. allowlist defaults to the entire DEFAULT_ALLOWLIST (markdown, json, echarts, mermaid, plotly, datagrid, metric, report, grid, tabs, accordion, code, latex, callout, image, video, form, confirm, select_option) — override it explicitly with the subset your frontend implements.

2) Always-visible set for tool discovery

Keep these visible regardless of deferral (see penguiflow-reactplanner-config): render_component, describe_component, list_artifacts, the interactive ui_form/ui_confirm/ui_select_option if enabled, plus any typed render_*/build_* you wired in.

3) Pick the right tool family

Family Tools Visible? Use for
Generic renderer render_component(component, props, id?, title?, metadata?) Yes Any allowlisted component; escape hatch. Required for markdown, json, mermaid, plotly, metric, code, latex, callout, image, video (no typed wrappers).
Typed wrappers render_chart_echarts, render_report, render_table, render_grid, render_tabs, render_accordion Yes Common components with stricter schemas.
Builders build_chart_echarts, build_table, build_grid, build_tabs, build_accordion (no build_report/build_markdown) No Compose reusable payloads; returns artifact_ref for later inclusion.
Interactive (HITL) ui_form, ui_confirm, ui_select_option Yes (pauses planner) Structured user input — pairs with penguiflow-hitl-pause-resume.
Introspection describe_component(name), list_artifacts(...) Yes (no UI emit) Discover what's renderable; list prior artifacts in this run.

Prefer typed render_* over generic render_component when a wrapper exists — better validation, smaller LLM mistakes. Use build_* to assemble a complex child once and reference it from multiple parents.

4) Understand the wire contract

Every visible rich-output emission produces a planner event of shape:

event_type = "artifact_chunk"
artifact_type = "ui_component"
payload = {
    "id": "<artifact id, optional>",
    "component": "echarts",
    "props": {...},                # component-specific schema
    "title": "<optional>",
}

This is what the frontend consumes. AG-UI maps it to a CUSTOM event (see penguiflow-agui-events). The bare planner event is identical regardless of the frontend protocol.

Builders don't emit artifact_chunk. They register the payload in the in-run artifact registry and return:

{"artifact_ref": "art_abc123"}

You then pass artifact_ref as a child slot in a parent renderer (e.g., a tabs panel referencing pre-built chart refs).

5) Handle interactive HITL tools

ui_form, ui_confirm, ui_select_option are pause tools. Calling one:

  1. Emits the UI component as artifact_chunk (so the frontend renders it).
  2. Pauses the planner with reason="await_input" and payload referencing the component.
  3. Resumes when the user submits; user_input and tool_context carry the response
Полный SKILL.md на GitHub

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

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

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

Вложенные файлы

  • agents/openai.yaml
  • references/builders-and-artifact-refs.md
  • references/components-and-render-tools.md
  • references/interactive-hitl.md

FAQ

Что делает скилл penguiflow-rich-output?

Add structured UI components (charts, tables, reports, grids, tabs, accordions, forms) to a PenguiFlow ReactPlanner — enable rich output via `attach_rich_output_nodes(registry, config=RichOutputConfig(enabled=True, allowlist=[...]))`, pick the right tool family (generic `render_component`, typed `render_*` wrappers like `render_chart_echarts`/`render_table`/`render_report`/`render_grid`/`render_tabs`/`render_accordion`, non-emitting `build_*` builders that return `artifact_ref`, interactive `ui_form`/`ui_confirm`/`ui_select_option`), describe schemas with `describe_component`, list artifacts with `list_artifacts`, and consume `artifact_chunk(artifact_type="ui_component")` on the frontend. Use when a user says "render a chart", "show a table", "rich output", "UI components", "interactive form", or names `render_component`, `RichOutputConfig`, `attach_rich_output_nodes`.

Как установить скилл penguiflow-rich-output?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл penguiflow-rich-output запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить penguiflow-rich-output с