generative-ui
БесплатноБез исполняемых скриптовНе проверен本机唯一可视化通道(generative-ui 插件)。任何可视化、图表、图示、看板、仪表盘、分析报告、架构图、流程图、对比、模拟器、UI 原型、解释视频的需求,第一动作都是读本 skill,再 route → widget / canvas 渲染到 glimpseui…
от Dwsy★ 26 звёзд на GitHubОб этом скилле
Generative UI — visual render skill
本机唯一可视化渲染通道。 任何视觉产物需求的第一动作都是读本 skill。 不要退回「写静态 HTML 文件,再让用户自己打开」的做法 —— generative-ui 的差别在于 request-first 路由(markdown / widget / canvas)、宿主强制的 grounding 与 provenance、 直接渲染到 glimpseui 原生窗口。
与 GAPP 的分界:GAPP(
.pi/gapp/)是需要交互和域工具的长生命周期小应用,见gappskill;「看一眼的数据可视化」走本 skill,「长期操作的界面」才走 GAPP。终端里的轻量 ASCII / mermaid 图仍可直接输出,不必开窗口。
One job: turn a natural-language goal into the right visual artifact. Everything runs through
bun visual-cli.ts — no visualize_read_me / show_widget / show_canvas /
browse_widgets tools are registered; the system prompt carries none of this.
1. The flow — route first, render second
VISUAL=~/.pi/agent/extensions/generative-ui/visual-cli.ts
bun $VISUAL route '<the user\'s actual goal>' # picks medium/style/content/research
bun $VISUAL widget --title <t> --html-file <f> --grounding '{…}' # or canvas
bun $VISUAL browse list # history / reopen / saved html
routereturns compact JSONdetails(route id, target, style, research, modules, templates,skillRefs) and persists plan state to<widgets>/last-plan.json.- If
details.skillRefsnames a skill, read that skill before rendering — its route registered throughvisual-routes.jsonowns the content contract. - Render with
widgetorcanvasfollowing the route's target. The first render whose target matches the plan is enforced against it and consumes it.
route is compact by default. Add --expand only when you need the full guidance text in one
shot; otherwise read skillRefs skills on demand. Do not preload every guide.
2. Which host for which deliverable
| Deliverable | Use |
|---|---|
| One visual in a native window, host-themed | this skill — route → widget/canvas |
| A full HTML page: explainer, diff review, plan, slide deck, narrated video | visual-explainer |
A standalone .svg file |
pele-mermaid CLI |
| A long-lived app with domain tools | gapp |
The distinction is the deliverable, not the topic. One diagram in a window is this skill; ten
figures in one page with a browser check is visual-explainer.
3. Reference map — read only what the task needs
| Read | When |
|---|---|
references/cli.md |
Before the first render: command surface, widget vs canvas, host bridge, browse. |
references/sdk.md |
Before writing Canvas TSX with unfamiliar SDK props: the closed @gen-ui/canvas export list. |
references/quality.md |
While building an artifact: medium choice, theme, a11y, anti-patterns. |
references/grounding.md |
Before writing --grounding: status, sources, plan interplay. |
references/windows.md |
When a render returns but you expected a message, or the window behaved oddly. |
references/visual-routes.md |
To add or debug a visual-routes.json manifest. |
references/mermaid.md |
When the artifact contains a Mermaid diagram. |
references/visual-explainer.md |
When the deliverable is a full HTML page. |
Each file is standalone — read it, act, move on. Do not read the whole set up front.
4. Hard rules
- Every
widget/canvascall carries--grounding. The host rejects a render that declaresnot_applicableon an evidence-bearing route. Details:references/grounding.md. - Theme with host CSS variables or
@gen-ui/canvastokens. Hardcoded#hexfor UI chrome is a bug. - Canvas TSX supports Tailwind utilities compiled at build time from literal class names; keep
colors on host tokens. Details:
references/cli.md. - Keep data inline, artifacts under 2 MB, no fetch / XHR / WebSocket, no unapproved external resources.
- Give every chart, SVG, canvas, and widget an accessible name.
ok: truemeans the host compiled and validated it. Do not screenshot or reopen the window to confirm — that re-reads a result the CLI already proved.
Установить generative-ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл generative-ui?
本机唯一可视化通道(generative-ui 插件)。任何可视化、图表、图示、看板、仪表盘、分析报告、架构图、流程图、对比、模拟器、UI 原型、解释视频的需求,第一动作都是读本 skill,再 route → widget / canvas 渲染到 glimpseui 原生窗口。同义触发:visualization, chart, diagram, dashboard, widget, canvas, mermaid, grounded report, provenance。不要退回「写静态 HTML 文件再让用户自己打开」的做法 —— 那不开原生窗口,也没有宿主校验的 provenance。
Как установить скилл generative-ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл generative-ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic