generative-ui
하는 일
이 스킬은 에이전트가 샌드박스 Alpine.js와 Tailwind로 만든 대화형 UI를 채팅 안에 보여 주는 방법을 설명합니다. 일회성 컨트롤과 저장된 미니 앱을 다룹니다. 대화 중에 빠른 대화형 도우미를 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓채팅 안에서 슬라이더, 선택기, 계산기 같은 빠른 컨트롤이 필요할 때.
- ✓대화에 도움이 되는 임시 차트나 미리보기가 필요할 때.
- ✓나중에 다시 열 수 있도록 유용한 위젯을 저장하고 싶을 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/generative-ui/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 채팅에 가격을 바꾸면 합계가 바로 바뀌는 슬라이더를 만들어 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 작은 샌드박스 HTML 컨트롤을 채팅 안에 인라인으로 렌더링합니다. 그 값은 다음 턴에 에이전트에게 다시 전달될 수 있고, 저장된 버전은 나중에 다시 열 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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.
자주 묻는 질문
앱의 코드를 바꾸는 작업인가요?
아니요. 채팅 안의 인라인 UI이며, 앱의 소스 코드는 바뀌지 않습니다.
에이전트가 제가 컨트롤에서 설정한 값을 볼 수 있나요?
네. 제출 클릭 없이 수동 출력으로 값을 에이전트에게 돌려줄 수 있습니다.
일회성 UI와 저장된 UI의 차이는 무엇인가요?
일회성 UI는 현재 채팅에만 존재하고, 저장된 UI는 재사용할 수 있으며 확장 보기에도 표시됩니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 7.6k
- 순위
- #13162
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.
비슷한 스킬
canvas
394k에이전트가 연결된 Mac 패널에 호스팅된 시각적 위젯을 띄우고, 패널을 숨기거나 다른 페이지로 옮기도록 돕습니다.
control-ui
394k에이전트가 세션, 대시보드, 연결된 Gateway를 포함해 OpenClaw Control UI를 정리하고 문제를 해결하도록 돕습니다.
diagram-maker
394k에이전트가 프로세스, 시스템 구조, 화이트보드 스케치를 위해 SVG, HTML, 편집 가능한 Excalidraw 파일로 명확한 다이어그램을 만들도록 돕습니다.