visualize
它能做什么
这个工具会生成一个完整的 HTML 页面,里面包含图表、表格或示意图,并直接显示在聊天窗口中。当视觉化信息比文字更清楚时,它特别有用。
适用场景
- ✓当你想展示月度销售图表时。
- ✓当你想展示研究结果表格时。
- ✓当你想呈现一个流程图时。
技能链接
https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/visualize/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请创建一个柱状图,展示巴西 5 个最大城市的人口。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会先让一位数据专家计算所需信息并选择最合适的图表类型,然后由一位设计专家负责页面排版,最后组装成完整的 HTML 页面。它会确保页面在没有网络的情况下也能正常运行,并且颜色会自动适应聊天窗口的主题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Visualize
A page shown inline sits beside a reply, in the reader's theme, and is read in a few seconds. It earns its place only by being clearer than the paragraph it replaces. This skill owns what is particular to such a page. The data work belongs to data-scientist and the design work to frontend: load those skills for their parts instead of improvising them here.
The loop
Do these in order. Never show a page you have not looked at.
- Data: load
data-scientist. Compute every figure with its engines (DuckDB or Polars), at the grain the reader needs, and follow itsreferences/visualization.mdfor which chart answers which question. Keep the query: every number on the page must trace back to it. - Design: load
frontend. Use it for hierarchy, type, spacing and states. This page's constraints replace its design-system gate: the page brings no palette or fonts of its own and uses the theme the host injects (below). - Build one self-contained page under the constraints below.
- Preview and look. Render with
html_previewin dark and in light, at the reply's width and at 390 px. Read the screenshot and the console, fix what you see, and preview again. Wherehtml_previewis not offered, open the page file in a browser through thebrowserskill and capture the same four views. - Show it with
show_html_page(OmO) orhtml_render(other hosts), with the height the preview measured. Then write only what the page does not already say.
Constraints of an inline page
- No network. Inline every script, style, font and image (
data:URIs); the sandbox blocks every request, so a CDN library leaves a blank chart. Draw with hand-written SVG when a library cannot be inlined. - Theme from the host. Color only through the injected custom properties:
--background,--foreground,--muted,--muted-foreground,--card,--border,--primary,--accent,--destructive,--warning,--success, the series colors--chart-1to--chart-6, and--font-sans,--font-mono,--radius. They hold in both themes and change live; a literal color does neither. A page opened outside the app gets only a few of them, so give each a fallback for both themes:var(--chart-2, light-dark(#0d9488, #2dd4bf)). - Part of the reply, not a card. Fluid width, no outer padding, border or banner. Give charts fixed pixel heights, not heights that scale with the width. A fluid SVG stretched with
preserveAspectRatio="none"stretches its text too, so put axis labels in HTML beside it, positioned by percentage. - Readable without scripts. On the web a page first renders with scripts off, until the reader presses Run page. Put the figure itself in markup or SVG, and use scripts only for interaction.
- Traceable. Show how the numbers were computed in a small, muted "How this was computed" block (the query or aggregation), and state caveats near the figure when they change how a number reads: dropped rows, a partial window, a small sample.
- Designed empty and error states. No data, or a failed query, is stated in the same visual language, never as a blank frame.
- Links. A link opens only after the reader confirms it in the app, which shows its full address. Keep data out of link addresses.
Before you show it
- The title states the finding, not the dataset name.
- Axis labels carry units, numbers use tabular figures and a sensible precision, and nothing clips at 390 px.
- The series colors separate in both themes, and the console is clean.
常见问题
生成的页面需要联网才能使用吗?
不需要。页面是独立的,所有元素(代码、样式、字体)都包含在页面内部,即使离线也能正常工作。
我可以自定义颜色吗?
页面会在显示时使用聊天窗口的主题色,但你也可以设定备用颜色,确保它在任何主题下都显示得很好看。
我怎么知道这些数字是从哪里来的?
工具会附上一段说明,解释数字是如何计算的,以及一些重要的注意事项,比如数据缺失的情况。
详情
作者的原始描述
Builds a self-contained HTML page (chart, table, diagram, dashboard) to show inline in a thread. Use before calling show_html_page, html_preview or html_render, or whenever an answer reads better as a page than as prose.
热度
- GitHub 星标
- 70k
- 排名
- #3126
- 许可证
- NOASSERTION
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
comment-checker
70k帮你的智能体理解并回应自动代码检查工具的反馈。适用于处理自动化代码或内容审查的结果。
lcx-contribute-bug-fix
70k帮你的智能体为 LazyCodex 相关项目贡献错误修复。它会创建 issue 或 pull request,保障代码质量。
lcx-doctor
70k让你的智能体检查 LazyCodex 和 Codex CLI 安装的健康状况。当系统在更新或改动后表现异常时很有用。
lcx-report-bug
70k帮你的智能体为 LazyCodex 项目详细报告 bug。它会创建包含有用信息的 issue,方便开发者定位并修复问题。