跳到正文
cccskills
免费在 GitHub 公开中文介绍

generative_ui

制作交互式 HTML 小组件或独立页面,用图解、数据可视化、交互控件和教学步骤呈现信息。可根据内容选择嵌入聊天窗口,或在更大的侧边栏页面中展示。

原文查看原文说明

How to render rich interactive HTML widgets inline in the chat or as standalone artifacts. Use this skill when you want to show the user diagrams, data visualizations, interactive controls, educational walkthroughs, or any rich visual content beyond plain text and markdown.

asgeirtj/system_prompts_leaks星标 70,411(GitHub 70,411 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 为说明内容制作图解
  • 用交互图表查看数据
  • 在聊天中展示简短课程
  • 制作仪表盘或原型

中文介绍

功能

此技能可以制作嵌入聊天窗口的小组件,或在侧边栏打开的 HTML 页面,用视觉方式呈现单靠文字难以说明的信息。它适用于图解、数据可视化、交互控件和分步骤的学习材料。生成的 HTML 文件是自包含的,也可以按需嵌入聊天内容。技能会根据内容选择展示位置:简短紧凑的内容适合放在聊天中,较大的仪表盘、模拟演示和应用原型则适合独立页面。还可以使用主题变量,使设计配合显示环境的配色。

适用场景

需要通过图示或交互内容辅助讲解,或想直观查看数据和关系时,可以使用此技能。它既适合配合简短说明的小型学习组件,也适合占用更大页面的可视化内容和原型。

使用示例

  • “请为这段说明制作一张图解。”
  • “请把这些数据做成交互式图表。”
  • “请制作一个能在聊天中查看的简短学习组件。”

注意事项

创建 HTML 时使用 write_to_file。内容安全策略会限制外部 CDN;Tailwind CSS 仅可使用指定的 gstatic 脚本。聊天内嵌组件的可视高度为 500px,应避免依赖整个屏幕高度的设置。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
B部分不足会创建 HTML 并加载脚本,资料说明了内容安全策略限制。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足依赖 `write_to_file` 和成果物展示环境,但未说明配置步骤。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月30日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md5.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Generative UI

You can render custom, rich, interactive user interfaces (inline widgets or larger artifacts) directly in the chat. This is a great way to communicate complex information to the user, generate rich visualizations, and even create small interactive experiences for the user.

Workflow

  1. Create the HTML Artifact: Use write_to_file to save a self-contained .html file (using Tailwind CSS and inline JavaScript) to the artifact directory. Set UserFacing: true in ArtifactMetadata.

  2. Embed Inline (optional): Include the <agent-embed> tag in your chat response, if you decide this html artifact should be rendered inline in the
    conversation:

    <agent-embed src="file:///<artifact_path>/widget.html"></agent-embed>
    

Constraints & Theming

  • External Assets & Tailwind CSS: All external CDNs are blocked by CSP, except for one allowlisted gstatic Tailwind dependency that you CAN and SHOULD use to style your artifacts. Include the following script tag in your <head> to enable Tailwind:

    <script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
    
  • Use Provided Theme Variables: The iframe injects the app's semantic design-system tokens, so widgets automatically match the host theme and the user's custom colors. Surfaces (--background, --content, --card, --sidebar), borders (--border), text (--foreground, --muted-foreground, --placeholder), and accents (--primary/--primary-foreground, --secondary/--secondary-foreground, --accent) are all available. Typography is applied for you on the document body — you do not need to set a font, and never use sub-12px micro-text (text-[10px], text-[11px], or CSS font-size below 12px; keep text-xs / 12px as the minimum floor unless the user asks).

  • Text & Surface Colors: Use semantic variables (bg-[var(--card)], text-[var(--foreground)], text-[var(--muted-foreground)]) instead of hardcoded dark/light utility classes (e.g., bg-slate-900, text-white) to ensure high contrast across both light and dark themes.

  • Do Not Declare Local Fallbacks on :root: Never define local color fallbacks on :root in a <style> block; the host environment manages theme variables dynamically.

  • HTML Boilerplate Template: Recommended base template:

    <!DOCTYPE html>
    <html>
    <head>
      <script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
    </head>
    <body class="bg-transparent text-[var(--foreground)] antialiased p-5">
      <div class="bg-[var(--card)] text-[var(--foreground)] border border-[var(--border)] rounded-xl p-5 shadow-sm">
        <h2 class="text-[var(--foreground)] font-semibold text-lg">Title</h2>
        <p class="text-[var(--muted-foreground)] text-sm">Description</p>
        <!-- Interactive content goes here -->
      </div>
    </body>
    </html>
    
  • General styling: Aim for a clean, premium aesthetic. For <canvas>, check document.documentElement.classList.contains('light') to adapt colors.

Deciding on Placement (Inline vs. Standalone)

Default to artifact only — reference the HTML artifact in your response and let the user open it in the side pane. Consider inlining when the widget is compact (comfortably under 500px tall) and directly illustrates the surrounding explanation (e.g., a small educational widget, plot, or diagram). Larger, more complex content (data dashboards, simulations, app prototypes) should stay artifact-only. Always follow the user's explicit preference if stated.

Designing Inline Widgets (Cards & Transparency)

When embedding inline in chat (<agent-embed>), style widgets as native chat
components:

  • Transparent Root Background: Always set <body class="bg-transparent ..."> so the widget blends seamlessly into the chat container.
  • Card-Based Layouts: Wrap inline content and controls in a card container (as shown in the Boilerplate Template above) to provide elevation and prevent loose text in light mode.
  • Standalone Artifacts: For full-page side-pane artifacts (like dashboards), use a solid background (e.g., bg-[var(--background)]).

Sizing Inline Embeds

For inline embeds, it is important to think small and compact.

Inline embeds only have a 500px height viewport. Past that the widget scrolls inside a small box and the user sees only a fragment of what you built, so don't build inlined widgets that are too tall.

  • Do not set a height attribute on <agent-embed>. It is ignored.
  • Think compact Think carefully about designing something that is compact and fits nicely inline in the chat height budget.
  • If the idea genuinely needs more room, make it a standalone artifact. A scrolling inline widget is usually wrong — full-height in the side pane beats cropped in the chat.

After generating the artifact, consider whether it is sufficiently compact to be useful inline and adjust if needed.

[!IMPORTANT] Never size an inline widget relative to the viewport: no
h-screen, min-h-screen, 100vh, or height: 100% on a top-level
container. The frame's viewport is derived from your content, so these feed
themselves and the widget collapses to a sliver. Use padding for breathing
room instead.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

3d-object

免费有简介

使用three.js创建立体模型,在交互式查看器中从各个角度检查形状和材质,并以OBJ + MTL或GLB格式保存,供其他三维制作软件使用。

  • 创建立体模型并从各个角度检查
  • 制作可在Blender中继续编辑的模型
  • 检查模型轮廓和材质效果
asgeirtj/system_prompts_leaks7万2026年10月29日 更新

Audit web accessibility with Chrome DevTools MCP and Lighthouse. Inspect semantic structure, labels, keyboard focus, tap target size, and color contrast, then identify page elements that may need changes based on web.dev guidance.

中文简介正在准备中。当前显示英语简介。

  • Finding missing labels or image alternatives
  • Checking heading structure and reading order
  • Testing keyboard navigation and modal focus
asgeirtj/system_prompts_leaks7万2026年10月29日 更新

action-items

免费有简介

在个人任务清单中记录待办事项、承诺、期限、下一步、待回复对象和阻碍原因,更新进度与依赖关系,合并重复项并归档已结束的任务。

  • 记录有期限的任务与承诺
  • 整理待回复事项及阻碍原因
  • 前置任务完成后更新依赖关系
asgeirtj/system_prompts_leaks7万2026年10月29日 更新

agents

免费

Coordinate a task from a verifiable goal through completion. Handle work directly or split independent tasks across separate agent sessions, track progress, verify results, and arrange pull request merging when included in the goal.

中文简介正在准备中。当前显示英语简介。

  • Split independent tasks across agents
  • Check progress across ongoing tasks
  • Resume a previously started project
asgeirtj/system_prompts_leaks7万2026年10月29日 更新

agy-customizations

免费有简介

了解 Antigravity 如何发现和加载自定义配置,包括配置位置与优先级。借助本指南选择并创建技能、规则、插件、钩子或 MCP 服务器,用于智能体工作流程和外部工具连接。

  • 选择合适的自定义配置类型
  • 查看配置的发现位置和加载顺序
  • 创建技能或规则
asgeirtj/system_prompts_leaks7万2026年10月29日 更新

animated-video

免费有简介

将动画制作成可播放、暂停和定位时间的HTML页面,通过时间轴调整场景时长与速度,并为横屏或竖屏视频导出做好准备。

  • 制作产品操作演示动画
  • 用文字和图形解释内容
  • 制作竖屏动画
asgeirtj/system_prompts_leaks7万2026年10月29日 更新

查看 asgeirtj 的全部技能

报告此技能的问题