plugins/data-and-visualization/skills/json-render-ui/SKILL.md
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 skillsauth add oaustegard/claude-skills json-render-uiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 specificationdevelopment
Write effective instructions for Claude: project instructions, standalone prompts, and skill content. Use when users need help writing prompts, setting up project instructions, choosing between instruction formats, or improving how they communicate with Claude. Covers writing principles, model-aware calibration, and format selection. For building and testing complete skills, use skill-creator instead.
data-ai
Discover and load skills on demand from /mnt/skills/user/. Use when you need a capability but don't know which skill provides it, when the boot-emitted skill list is names-only and you need a full description, or when you want to list the catalog. Verbs are list (names only), search (rank by name/description match against a query), and show (emit the full SKILL.md for a named skill).
documentation
Reads the visual content of slides, pages, and images the way a human would, not just their embedded text. Use when a PPTX or PDF has image slides, screenshots, charts, scanned figures, or flattened-to-image layouts that the built-in pptx/pdf skills read as empty; when asked to transcribe, describe, OCR, or extract what is shown in an image, slide deck, or document page; or when embedded-text extraction returned little or nothing from a visually rich file. Triggers on 'read this deck', 'what's on these slides', 'transcribe', 'OCR', 'extract text from image', 'describe this chart/diagram', .pptx/.pdf/.png/.jpg with visual content.
development
Portrait Mode for SVGs — foveated vectorization with 4-zone selective detail. Combines vision annotations, MediaPipe segmentation/landmarks, and optional saliency. Like phone portrait mode, but vectorized. Use when vectorizing a portrait or photo where subject detail should outrank background detail.