agent-routing
Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe…
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 -y skills add oaustegard/claude-skills --skill json-render-ui --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/json-render-uiContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: json-render-ui description: "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." metadata: version: 0.0.2
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:
Any element can have a `visible` property:
{
"type": "Alert",
"props": { "type": "error", "title": "Error" },
"visible": { "path": "/hasError" }
}Visibility expressions:
Analyze the user's request and emit a UITree structure. Include sample data that matches the schema.
Create an HTML artifact that: 1. Embeds the UITree JSON 2. Renders the UI
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",A collection of Claude skills distributed as a Claude Code plugin marketplace. Skills are primarily designed for the Claude.ai PaaS skill compute environment; mileage will vary if used as Claude Code Agent Skills.
Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe…
Cross-context adversarial review for deliverables before shipping. Use when producing blog posts, technical recommendations,…
Convenes expert panels for problem-solving. Use when user mentions panel, experts, multiple perspectives, MECE, DMAIC, RAPID, Six…
Routes, triages, flags and rates a piece of text with a probability for every option: which department or queue a ticket goes to,…
Delegates work to a subagent or spawned session by writing only the task, while a PreToolUse hook pages the parent transcript…
Chooses how to launch subagents from Claude Code (the Agent tool, a Workflow script, or headless claude -p children) and runs a…