npx skills add ...
npx skills add himself65/finance-skills --skill 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. This skill provides the complete Anthropic "Imagine" design system so Claude produces high-quality widgets without needing to call read_me first. Use this skill whenever the user asks to visualize data, create an interactive chart, build a dashboard, render a diagram, draw a flowchart, show a mockup, create an interactive explainer, or produce any visual content beyond plain text or markdown. Triggers include: "show me", "visualize", "draw", "chart", "dashboard", "diagram", "flowchart", "widget", "interactive", "mockup", "illustrate", "explain how X works" (with visual), or any request for visual/interactive output. Also triggers when the user wants to display financial data visually, create comparison grids, or build tools with sliders, toggles, or live-updating displays.
npx skills add himself65/finance-skills --skill generative-ui
This skill contains the complete design system for Claude's built-in show_widget tool — the generative UI feature that renders interactive HTML/SVG widgets inline in claude.ai conversations. The guidelines below are the actual Anthropic "Imagine — Visual Creation Suite" design rules, extracted so you can produce high-quality widgets directly without needing the read_me setup call.
How it works: On claude.ai, Claude has access to the show_widget tool which renders raw HTML/SVG fragments inline in the conversation. This skill provides the design system, templates, and patterns to use it well.
Route on the verb, not the noun. Same subject, different visual depending on what was asked:
| User says | Type | Format |
|---|---|---|
| "how does X work" | Illustrative diagram | SVG |
| "X architecture" | Structural diagram | SVG |
| "what are the steps" | Flowchart | SVG |
| "explain compound interest" | Interactive explainer | HTML |
| "compare these options" | Comparison grid | HTML |
| "show revenue chart" | Chart.js chart | HTML |
| "create a contact card" | Data record | HTML |
| "draw a sunset" | Art/illustration | SVG |
Output streams token-by-token. Styles must exist before the elements they target, and scripts must run after the DOM is ready.
<!-- comments --> or /* comments */ (waste tokens, break streaming)code style not bold<!DOCTYPE>, <html>, <head>, or <body> — just content fragmentsposition: fixed — use normal-flow layoutsdisplay: none sections during streamingborder-radius: var(--border-radius-lg) for cards, var(--border-radius-md) for elementsMath.round(), .toFixed(n), or Intl.NumberFormatExternal resources may ONLY load from:
cdnjs.cloudflare.comcdn.jsdelivr.netunpkg.comesm.shAll other origins are blocked — the request silently fails.
Backgrounds: --color-background-primary (white), -secondary (surfaces), -tertiary (page bg), -info, -danger, -success, -warning
Text: --color-text-primary (black), -secondary (muted), -tertiary (hints), -info, -danger, -success, -warning
Borders: --color-border-tertiary (0.15α, default), -secondary (0.3α, hover), -primary (0.4α), semantic -info/-danger/-success/-warning
Typography: --font-sans, --font-serif, --font-mono
Layout: --border-radius-md (8px), --border-radius-lg (12px), --border-radius-xl (16px)
All auto-adapt to light/dark mode.
Dark mode is mandatory — every color must work in both modes:
color: #333c-blue, c-teal, etc.) — they handle light/dark automaticallysendPrompt(text)A global function that sends a message to chat as if the user typed it. Use it when the user's next step benefits from Claude thinking. Handle filtering, sorting, toggling, and calculations in JS instead.
show_widgetThe show_widget tool is built into claude.ai — no activation needed. Pass your widget code directly:
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Snake_case identifier for the widget |
widget_code | string | Yes | HTML or SVG code. For SVG: start with <svg>. For HTML: content fragment |
For SVG output: start widget_code with <svg — it will be auto-detected and wrapped appropriately.
For charts, use onload callback pattern to handle script load ordering:
Chart.js rules:
responsive: true, maintainAspectRatio: false-$5M not $-5M (negative sign before currency symbol)onload="initChart()" on CDN script tag + if (window.Chart) initChart(); as fallbackFor flowcharts and diagrams, use SVG with pre-built classes:
SVG rules:
viewBox="0 0 680 H"). Set H to fit content + 40px paddingt (14px), ts (12px secondary), th (14px medium 500), box, node, arr, c-{color}<text> element must carry a class (t, ts, or th)dominant-baseline="central" for vertical text centering in boxesfill="none" (SVG defaults to fill: black)onclick="sendPrompt('...')"For interactive explainers (sliders, live calculations, inline SVG):
Use sendPrompt() to let users ask follow-ups: sendPrompt('What if I increase the rate to 10%?')
After rendering the widget, briefly explain:
Keep it concise — the widget speaks for itself.
references/design_system.md — Complete color palette (9 ramps × 7 stops), CSS variables, UI component patterns, metric cards, layout rulesreferences/svg_and_diagrams.md — SVG viewBox setup, font calibration, pre-built classes, flowchart/structural/illustrative diagram patterns with examplesreferences/chart_js.md — Chart.js configuration, script load ordering, canvas sizing, legend patterns, dashboard layoutRead the relevant reference file when you need specific design tokens, SVG coordinate math, or Chart.js configuration details.