
Generative Ui
Produce Claude.ai `show_widget` charts, diagrams, and dashboards that follow Anthropic’s Imagine design system instead of one-off HTML.
Overview
generative-ui is an agent skill most often used in Build (also Grow, Launch) that applies the Imagine design system so Claude.ai `show_widget` output stays on-brand, accessible in dark mode, and compact.
Install
npx skills add https://github.com/himself65/finance-skills --skill generative-uiWhat is this skill?
- Full Imagine design system: CSS variables, light/dark palette, typography, spacing
- Chart.js line, bar, and area charts with interactive controls
- SVG flowcharts, structural diagrams, and illustrative diagrams
- Dashboard patterns: metric cards, comparison grids, data displays
- Interactive explainers with sliders, toggles, and live-updating calculations
- Chart types documented: line, bar, area (Chart.js)
- Four principle pillars: seamless, flat, compact, dark mode mandatory
Adoption & trust: 914 installs on skills.sh; 2.7k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want charts or dashboards in chat but default widget HTML ignores design tokens, breaks dark mode, or looks noisy next to Claude’s UI.
Who is it for?
Solo builders using claude.ai who need polished inline visuals for data, flows, or interactive explanations.
Skip if: Production React/Vue app UI implemented outside Claude’s `show_widget` tool or teams that only need plain markdown answers.
When should I use this skill?
User says show me, visualize, draw, chart, dashboard, diagram, flowchart, widget, interactive, mockup, illustrate, or wants visual/interactive output beyond markdown.
What do I get? / Deliverables
Inline widgets follow Imagine tokens and component patterns—charts, diagrams, and explainers that read as native to the conversation surface.
- On-brand widget markup using Imagine tokens
- Charts, diagrams, or interactive explainers suitable for inline render
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Widget design lands first when building conversational or agent-facing experiences, but the same patterns recur when explaining metrics in Grow. Generative UI is presentation-layer work—tokens, layout, and Chart.js/SVG output map to frontend craft even on claude.ai.
Where it fits
Sketch a metric-card dashboard in chat while designing an agent workflow before you code the production app.
Turn funnel or cohort numbers into an interactive bar chart the founder can tweak in-conversation.
Illustrate onboarding or referral flow with a flat SVG diagram for a launch thread or investor update.
How it compares
Design-system skill for Claude’s hosted widget tool—not a Chart.js npm scaffold or Figma handoff kit.
Common Questions / FAQ
Who is generative-ui for?
Claude.ai users and indie builders who want consistent generative UI for finance, product, or growth storytelling without reinventing CSS each time.
When should I use generative-ui?
In Build when prototyping agent-facing dashboards; in Grow when visualizing metrics or funnels in chat; in Launch when illustrating flows or positioning with diagrams instead of static slides.
Is generative-ui safe to install?
It documents UI patterns only; check the Security Audits panel on this Prism page for the hosting repo before you install.
SKILL.md
READMESKILL.md - Generative Ui
# generative-ui Design system and guidelines for Claude's built-in generative UI — the `show_widget` tool that renders interactive HTML/SVG widgets inline in claude.ai conversations. ## What it does Provides the complete Anthropic "Imagine" design system so Claude produces high-quality widgets without needing to call `read_me` first. Covers: - **Charts** — Chart.js line, bar, area charts with interactive controls - **Diagrams** — SVG flowcharts, structural diagrams, illustrative diagrams - **Dashboards** — metric cards, comparison grids, data displays - **Interactive explainers** — sliders, toggles, live-updating calculations - **Design tokens** — CSS variables, color palette (light/dark), typography, spacing ## Key design principles - **Seamless** — widgets blend with the host UI - **Flat** — no gradients, shadows, or decorative effects - **Compact** — show the essential inline, explain in text - **Dark mode mandatory** — all colors work in both light and dark mode via CSS variables ## Triggers - "show me", "visualize", "draw", "chart", "dashboard" - "diagram", "flowchart", "widget", "interactive", "mockup" - "explain how X works" (with visual), "illustrate" - Any request for visual/interactive output beyond plain text or markdown ## Platform Works on **Claude.ai** (built-in `show_widget` tool). ## Setup ```bash # As a plugin (recommended — installs all skills) npx plugins add himself65/finance-skills --plugin finance-ui-tools # Or install just this skill npx skills add himself65/finance-skills --skill generative-ui ``` See the [main README](../../../../README.md) for more installation options. ## Reference files - `references/design_system.md` — Complete color palette, CSS variables, UI component patterns, metric cards, layout rules - `references/svg_and_diagrams.md` — SVG viewBox setup, font calibration, pre-built classes, diagram patterns with examples - `references/chart_js.md` — Chart.js configuration, script load ordering, canvas sizing, legend patterns, dashboard layout # Chart.js Reference Extracted from Claude's actual `visualize:read_me` guidelines. --- ## Basic Setup ```html <div style="position: relative; width: 100%; height: 300px;"> <canvas id="myChart"></canvas> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js" onload="initChart()"></script> <script> function initChart() { new Chart(document.getElementById('myChart'), { type: 'bar', data: { labels: ['Q1','Q2','Q3','Q4'], datasets: [{ label: 'Revenue', data: [12,19,8,15] }] }, options: { responsive: true, maintainAspectRatio: false } }); } if (window.Chart) initChart(); </script> ``` --- ## Rules ### Canvas Sizing - Set height ONLY on the wrapper div, never on the canvas element itself - Use `position: relative` on the wrapper - Use `responsive: true, maintainAspectRatio: false` in Chart.js options - Never set CSS height directly on canvas — causes wrong dimensions, especially for horizontal bar charts - For horizontal bar charts: wrapper div height = at least `(number_of_bars × 40) + 80` pixels ### Script Load Ordering - Load UMD build via `<script src="https://cdnjs.cloudflare.com/ajax/libs/...">` — sets `window.Chart` global - Follow with plain `<script>` (no `type="module"`) - CDN scripts may not be loaded when the next `<script>` runs (especially during streaming) - **Always use `onload="initChart()"` on the CDN script tag** - Define your chart init in a named function - Add `if (window.Chart) initChart();` as fallback at end of inline script - This guarantees charts render regardless of load order ### Canvas and CSS Variables - Canvas cannot resolve CSS variables. Use hardcoded hex or Chart.js defaults - Multiple charts: use unique IDs (`myChart1`, `myChart2`). Each gets its own canvas+div pair ### Scale Padding - For bubble and scatter charts: bubble radii extend past center points, so points near axis boundaries get clipped - Pad the scale range — set `sca