generative-ui
What it does
This skill explains how an agent can show inline interactive UI in a chat, built from sandboxed Alpine.js and Tailwind. It covers one-off controls and saved mini apps. It is for people who want quick interactive helpers in a conversation.
When to use it
- ✓When you want a quick control such as a slider, a picker or a calculator inside the chat.
- ✓When a temporary chart or preview would help the conversation.
- ✓When a useful widget should be saved so you can reopen it later.
Skill link
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/generative-ui/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you give me a slider in this chat that lets me change the price and see the total update?”
5 new skills a week. 1 minute to read.
How it works
The agent renders a small sandboxed HTML control inline. Its values can be sent back to the agent on the next turn, and a saved version can be reopened later.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Generative UI
Generative UI is sandboxed Alpine.js HTML rendered inline in chat. It is not a source-code change and does not go through Builder.
Pick the Lifetime
- Use
render-inline-extensionfor one-off UI that belongs only in the current chat: knobs, controls, pickers, calculators, temporary charts, and previews. - Use
create-extensionwhen the UI should be saved, reusable, or visible in the Extensions view. It also renders inline after creation. - Use
show-extension-inlineto reopen a saved extension inside chat. - Use
update-extensionto edit an existing saved extension.
Inputs From Chat
Pass initial values through the action context argument. The iframe reads them
from window.slotContext and can subscribe to changes with
window.onSlotContext(fn).
<script>
Alpine.data("controls", () => ({
threshold: 50,
init() {
this.threshold = Number(window.slotContext?.threshold ?? 50);
window.onSlotContext?.((ctx) => {
if (ctx.threshold !== undefined) {
this.threshold = Number(ctx.threshold);
}
});
},
}));
</script>
Outputs To The Agent
Use passive output when a control's current value should be visible to the agent on the next turn without requiring a submit click:
<input
type="range"
min="0"
max="100"
x-model.number="threshold"
@input="agentNative.ui.output({ threshold }, { label: 'Threshold' })"
/>
agentNative.ui.output(value, opts?) writes application state at:
inline-ui:<extensionId>:output
The id is scoped automatically; the HTML author must not pass it. When the user says "use that value", "apply the current setting", or "run it with the current selection", read the value with:
const output = await readAppState("inline-ui:<id>:output");
The stored payload includes value, updatedAt, extensionId, and
source: "inline-ui", plus optional label, context, or meta.
Use agentNative.chat.send(message, opts?) or sendToAgentChat(message, opts?)
for a visible Apply/Submit button that should send a prompt or selected value
into the chat. Pass { submit: true } explicitly for that user-triggered
action; extension messages are draft-only otherwise. Never call these helpers
from polling, refresh, or error handlers.
App Data And State
- Prefer
appAction(name, params)for template data and operations. - Use
appFetch(path, options)only for allowed framework endpoints under/_agent-native/*, including application-state reads and writes. - Do not call template
/api/*routes from generated UI. - Use
dbQuery/dbExeconly for known existing SQL tables when no action fits. - Use
extensionFetchfor external APIs through the sandbox proxy and secrets.
Transient extensionData Boundary
For saved extensions, extensionData uses the authenticated database-backed
extension data API.
For transient inline UIs, extensionData is host localStorage. The agent
cannot read it, it does not sync across devices, it does not migrate when a UI
is promoted to a saved Extension, and the server does not garbage-collect it.
Use it only for throwaway local UI state.
For anything the agent or app must observe, use agentNative.ui.output,
application state through appFetch, an appAction, or
agentNative.chat.send.
Styling
Use semantic Tailwind classes so the iframe inherits the parent app theme:
bg-background,text-foreground,border-borderbg-card,text-card-foregroundbg-primary,text-primary-foregroundtext-muted-foreground,bg-accent
Do not hardcode provider tokens, private data, or internal secrets in generated HTML. Do not call an LLM directly from the iframe; route AI work through the agent chat.
FAQ
Is this a code change to my app?
No. It is inline UI in the chat and does not change the app's source code.
Can the agent see what I set in the control?
Yes. Values can be passed back to the agent as passive output, without a submit click.
What is the difference between one-off and saved UI?
One-off UI lives only in the current chat, while saved UI can be reused and shown in the extensions view.
Details
Original description by the author
Generate transient or saved inline chat UI with Alpine/Tailwind controls, outputs, app state, and extensions. Use for knobs, pickers, calculators, dashboards, widgets, or reusable mini-apps.
repo: BuilderIO/agent-native
Popularity
- GitHub stars
- 7.6k
- Ranking position
- #13162
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
design-exploration
7.6kHelps your agent explore several UI design directions side by side, let you pick one, and then refine the chosen design.
visual-edit
7.6kHelps your agent open a running local app in a visual editor so you can review and edit its real screens together.
turn-into-app
7.6kTurns a workflow, spreadsheet or project into a polished visual app, with populated screens and an agent working behind the controls.
visual-plan
7.6kTurns a plain text plan into an interactive visual plan with diagrams, file maps, code snippets and open questions.
Similar skills
canvas
394kLets your agent show a hosted visual widget on a connected Mac panel, then hide the panel or move it to another page.
control-ui
394kHelps your agent organize and troubleshoot the OpenClaw Control UI, including sessions, dashboards, and connected Gateways.
diagram-maker
394kHelps your agent create clear diagrams as SVG, HTML, or editable Excalidraw files for processes, system architecture, and whiteboard sketches.