Agent Skills
› mereyabdenbekuly-ctrl/clodex-ide
› Preview
Preview
GitHub该技能用于在浏览器标签页中创建交互式设计预览。通过脚手架生成迷你应用,利用响应式布局适配内部预览页面,并调用API打开标签页展示结果,支持迭代修改与调试。
Trigger Scenarios
需要快速查看UI组件或页面的实时效果
构建轻量级前端原型进行可视化验证
Install
npx skills add mereyabdenbekuly-ctrl/clodex-ide --skill Preview -g -y
SKILL.md
Frontmatter
{
"name": "Preview",
"description": "Create an interactive design-preview in a browser tab",
"user-invocable": true,
"agent-invocable": false
}
Build a mini-app to fulfill the request. Use the apps/ directory and API.openApp(appId, { target: 'tab', title: 'Readable preview title' }) as documented in the Application Environment section.
Workflow
- Scaffold — create
apps/{appId}/index.html(+ optionalstyles.css,script.js). - Design for a full browser tab — the preview opens on an internal
clodex://internal/preview/{appId}page, so use responsive layouts that work from narrow to full-width viewports. - Open in tab — call
await API.openApp(appId, { target: 'tab', title: 'Readable preview title' }). The title is shown in the tab breadcrumbs. The returned{ tabId }can be used withAPI.sendCDP()if the preview needs inspection. - Iterate — use file tools (
multiEdit,overwriteFile) for edits, then callAPI.openApp(appId, { target: 'tab', title: 'Readable preview title' })again to open the refreshed preview.
Rules
- One
index.htmlper app. Sibling assets resolve via relative paths (./styles.css). - Prefer self-contained HTML (inline or sibling files) — no external build step.
- Do not open preview apps in the chat. Use
target: 'tab'. - Use
API.sendMessage/API.onMessageonly when bidirectional communication is needed.
Version History
- 0f01f5b Current 2026-07-19 09:03


