Generate guardrailed UI from natural language. Emits constrained JSON that a Preact runtime renders. Use when the request is for a dashboard with metrics, charts, or tables; an admin panel; a data visualization interface; or a form-based application.
npx skills add https://github.com/oaustegard/claude-skills --skill json-render-ui
Transform natural language UI requests into working dashboards and applications. Claude acts as the translation layer (prompt → JSON), the skill provides the rendering runtime (JSON → UI).
Architecture:
User prompt → Claude (constrained by catalog) → UITree JSON → Preact renderer → UI
Claude emits a UITree structure:
{
"root": "main",
"elements": {
"main": {
"key": "main",
"type": "Grid",
"props": { "columns": 2, "gap": "md" },
"children": ["metric1", "metric2"]
},
"metric1": {
"key": "metric1",
"type": "Metric",
"props": {
"label": "Revenue",
"valuePath": "/revenue",
"format": "currency"
}
},
"metric2": {
"key": "metric2",
"type": "Metric",
"props": {
"label": "Growth",
"valuePath": "/growth",
"format": "percent"
}
}
},
"data": {
"revenue": 125000,
"growth": 0.15
}
}
Claude can ONLY use these components. This is the guardrail.
| Component | Props | Children | Description |
|-----------|-------|----------|-------------|
| Card | title?, description?, padding?: sm\|md\|lg | Yes | Container with optional header |
| Grid | columns?: 1-4, gap?: sm\|md\|lg | Yes | CSS grid layout |
| Stack | direction?: horizontal\|vertical, gap?: sm\|md\|lg, align?: start\|center\|end\|stretch | Yes | Flexbox stack |
| Component | Props | Children | Description |
|-----------|-------|----------|-------------|
| Metric | label, valuePath, format?: number\|currency\|percent, trend?: up\|down\|neutral, trendValue? | No | Single KPI display |
| Chart | type: bar\|line\|pie\|area, dataPath, title?, height? | No | Data visualization |
| Table | dataPath, columns: [{key, label, format?: text\|currency\|date\|badge}] | No | Tabular data |
| List | dataPath, emptyMessage? | Yes | Rendered list from array |
| Component | Props | Children | Description |
|-----------|-------|----------|-------------|
| Button | label, action, variant?: primary\|secondary\|danger\|ghost, size?: sm\|md\|lg, disabled? | No | Clickable action |
| Select | label?, bindPath, options: [{value, label}], placeholder? | No | Dropdown select |
| DatePicker | label?, bindPath, placeholder? | No | Date input |
| Component | Props | Children | Description |
|-----------|-------|----------|-------------|
| Heading | text, level?: h1\|h2\|h3\|h4 | No | Section heading |
| Text | content, variant?: body\|caption\|label, color?: default\|muted\|success\|warning\|danger | No | Text paragraph |
| Component | Props | Children | Description |
|-----------|-------|----------|-------------|
| Badge | text, variant?: default\|success\|warning\|danger\|info | No | Status indicator |
| Alert | type: info\|success\|warning\|error, title, message?, dismissible? | No | Notification banner |
| Component | Props | Children | Description |
|-----------|-------|----------|-------------|
| Divider | label? | No | Visual separator |
| Empty | title, description?, action?, actionLabel? | No | Empty state |
Props ending in Path (e.g., valuePath, dataPath, bindPath) reference the data model using JSON Pointer syntax:
/revenue → data.revenue/users/0/name → data.users[0].name/filters/dateRange → data.filters.dateRangeAny element can have a visible property:
{
"type": "Alert",
"props": { "type": "error", "title": "Error" },
"visible": { "path": "/hasError" }
}
Visibility expressions:
true / false — Static{ "path": "/some/path" } — Truthy check{ "and": [...] } — All conditions true{ "or": [...] } — Any condition true{ "not": {...} } — Negation{ "eq": [a, b] } — EqualityAnalyze the user's request and emit a UITree structure. Include sample data that matches the schema.
Create an HTML artifact that:
Start from assets/template.html, which already carries the embedded renderer —
there is no separate renderer.js to inline.
DO:
DO NOT:
User: "Create a sales dashboard with revenue, orders, and a chart showing monthly trends"
Claude outputs:
{
"root": "dashboard",
"elements": {
"dashboard": {
"key": "dashboard",
"type": "Stack",
"props": { "direction": "vertical", "gap": "lg" },
"children": ["header", "metrics", "chartCard"]
},
"header": {
"key": "header",
"type": "Heading",
"props": { "text": "Sales Dashboard", "level": "h1" }
},
"metrics": {
"key": "metrics",
"type": "Grid",
"props": { "columns": 3, "gap": "md" },
"children": ["revenue", "orders", "avgOrder"]
},
"revenue": {
"key": "revenue",
"type": "Card",
"props": { "padding": "md" },
"children": ["revenueMetric"]
},
"revenueMetric": {
"key": "revenueMetric",
"type": "Metric",
"props": {
"label": "Total Revenue",
"valuePath": "/revenue",
"format": "currency",
"trend": "up",
"trendValue": "12%"
}
},
"orders": {
"key": "orders",
"type": "Card",
"props": { "padding": "md" },
"children": ["ordersMetric"]
},
"ordersMetric": {
"key": "ordersMetric",
"type": "Metric",
"props": {
"label": "Orders",
"valuePath": "/orders",
"format": "number"
}
},
"avgOrder": {
"key": "avgOrder",
"type": "Card",
"props": { "padding": "md" },
"children": ["avgMetric"]
},
"avgMetric": {
"key": "avgMetric",
"type": "Metric",
"props": {
"label": "Avg Order Value",
"valuePath": "/avgOrderValue",
"format": "currency"
}
},
"chartCard": {
"key": "chartCard",
"type": "Card",
"props": { "title": "Monthly Trends", "padding": "md" },
"children": ["chart"]
},
"chart": {
"key": "chart",
"type": "Chart",
"props": {
"type": "line",
"dataPath": "/monthlyData",
"height": 300
}
}
},
"data": {
"revenue": 284500,
"orders": 1247,
"avgOrderValue": 228,
"monthlyData": [
{ "month": "Jan", "value": 18000 },
{ "month": "Feb", "value": 22000 },
{ "month": "Mar", "value": 28000 },
{ "month": "Apr", "value": 24000 },
{ "month": "May", "value": 32000 }
]
}
}
Then wrap in the artifact template from assets/template.html.
assets/template.html — Complete artifact template with embedded rendererassets/catalog.json — Machine-readable component schemasreferences/uitree-format.md — Detailed UITree specificationComprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
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 .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.
Take oaustegard/json-render-ui from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.