跳到正文
Skillpedia
界面(UI/UX)394k · #88

visualize

它能做什么

它指导 AI 智能体使用展示小组件工具,在有助于你理解结果时呈现图表、示意图或交互式视图。它适合比起长文字更容易通过图片学习的人。

适用场景

  • ✓代码结构或流程的示意图能让解释更清楚的时候。
  • ✓对比或测量结果以图表或表格呈现更易读的时候。
  • ✓你希望在看板上将多个视图汇集为一个长期仪表板的时候。

技能链接

https://github.com/openclaw/openclaw/blob/main/skills/visualize/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/openclaw/openclaw/blob/main/skills/visualize/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请给我看一张可视化图,展示登录流程如何在这三项服务之间流转。”

每周 5 个新技能,1 分钟读完。

工作原理

技能判断图片是否有帮助,然后在同一对话中或以仪表板小组件的形式构建可视化内容。它会清楚地标注设计方案和示例数据,以免被误认为是实际观察到的行为。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Visualize

Use show_widget when seeing or interacting with a result helps the user reason about it. This includes code architecture, execution traces, performance, comparisons, simulations, UI mockups, and session dashboards. Use prose, a normal Markdown table, or a supported Mermaid block when that already explains the answer. A request to implement an application still needs changes in its project; a widget can illustrate the design but does not complete the implementation.

Choose the surface

  • Code work and one-off explanations: prefer inline when available this turn. Show the actual owners, relationships, measured values, or states relevant to the question. Distinguish proposed designs and illustrative data from observed behavior. Several diagrams for a code task do not by themselves call for a dashboard.
  • Persistent dashboards: use pin: true for an explicit dashboard request or multiple non-code visualizations that belong together. Read the current board first and reuse its names and tabs. Use the control-ui skill when organizing sessions, tabs, placement, or dashboard presentation.
  • Native reports: prefer the tool's report input with pin: true for dashboard text, metrics, tables, simple charts, and links. Omit widget_code, kind, capabilities, and presentation.target. Reports do not render inline.
  • Custom widgets: use widget_code for interactive HTML/SVG. Reuse an explicit name with pin: true to replace a pinned widget's content. A same-name update cannot change its content owner; inspect before converting HTML to a report.

Use only tools, source kinds, and presentation targets advertised in this turn. On a pinned-only surface, set pin: true and omit presentation.target. If the tool is unavailable, explain the limitation instead of inventing a render call. Restart recovery can be pinned-only even when the original turn supported inline widgets; follow the current tool schema instead of earlier delivery instructions.

Author the content

Send the markup itself in widget_code. Use an HTML or SVG fragment, optionally including <style> and <script>; OpenClaw supplies the document shell, theme, and host bridges. Do not send a file path, Markdown fence, full HTML document, or another application's visualization directive. title is host metadata: start with useful content rather than repeating the title or drawing dashboard chrome.

Keep a useful initial state in the markup. Use local JavaScript for selections, filters, parameter changes, and animation. Give the root a unique ID and scope styles and selectors to it. Insert labels and external data with textContent instead of interpolating untrusted strings into markup or executable code.

Keep source compact: widget_code is limited to 262,144 characters, pinned HTML to 256 KiB after wrapping, and Discord source to 48 KiB. Aggregate large datasets and load a suitable library instead of embedding its distribution in the call.

Libraries and fonts

Scripts, ES modules, stylesheets, and fonts can load from these HTTPS origins:

  • https://cdnjs.cloudflare.com
  • https://cdn.jsdelivr.net
  • https://esm.sh
  • https://unpkg.com
  • https://fonts.googleapis.com
  • https://fonts.gstatic.com
  • https://fonts.bunny.net

Use version-pinned library URLs. For example, load D3 with <script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js" crossorigin="anonymous"></script> before the inline script that uses d3. Use a module script for ESM imports. Transitive imports, font files, and redirects must also stay on allowed origins. No library, icon set, or font is preloaded. Choose native SVG/CSS for simple visuals; load a library when its scales, layout, or interaction justify it.

Provide readable fallback content and a visible failure state if an asset fails to load. Avoid eval-based libraries; unsafe-eval, remote frames, and arbitrary resource hosts remain unavailable. Images must be embedded as data URLs or drawn locally. CDN URLs are for public assets, never private data or credentials.

CDN loading does not grant fetch, WebSocket, or host API access. Retrieve data with the agent's available tools and embed the needed observations for inline visuals. Use dashboard capabilities for refreshable data, as described below.

Composition and theme

For code explanations, emphasize the relationship being discussed: aligned lanes for concurrent work, labeled edges for ownersh

常见问题

什么时候会跳过可视化?

如果纯文字、普通表格或 Mermaid 代码块已经能解释清楚,就会使用它们。

可视化能完成应用的构建吗?

不能。可视化可以说明设计,但项目本身仍然需要修改。

什么是仪表板小组件?

它是会话看板上的一个长期视图,可以置顶并重复使用。

详情

作者的原始描述

Create inline visuals for code and explanations, or author persistent OpenClaw dashboard widgets with show_widget.

repo: openclaw/openclaw

热度

GitHub 星标
394k
排名
#88
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能