live-artifact
它能做什么
这个工具可以创建能够刷新数据的可视化内容。你可以把它理解为一个仪表盘或报告,它展示重要信息,并且无需从头重新制作,就能用新数据更新。
适用场景
- ✓当你需要一个数据会不断变化的实时仪表盘时。
- ✓当你想创建可以随时补充新信息的报告时。
- ✓当你希望得到可重复使用、数据可靠的可视化内容时。
技能链接
https://github.com/nexu-io/open-design/blob/main/design-templates/live-artifact/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“用上个月的销售数据,帮我创建一个可以刷新的仪表盘。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具使用 HTML 模板和独立的数据。数据变化后,它会自动更新可视化内容,同时保持设计不变。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Live Artifact Skill
Create an OpenDesign live artifact: a project-scoped, previewable HTML artifact whose data can later be refreshed without redesigning the presentation.
Resource map
live-artifact/
├── SKILL.md
└── references/
├── artifact-schema.md ← `references/artifact-schema.md`: artifact files, DTO shape, template binding rules
├── connector-policy.md ← `references/connector-policy.md`: connector safety, redaction, credential boundaries
└── refresh-contract.md ← `references/refresh-contract.md`: source metadata, refresh execution, snapshots
Current status
Use the references in this directory as the source of truth for the live artifact file contract. Prefer daemon wrapper commands over raw HTTP when registering or updating live artifacts.
When to use this skill
Use this skill when the user asks for a data-backed view that should remain useful after the first render, for example a live dashboard, refreshable report, synced status page, auditable data view, or artifact that can later be refreshed from local/project data or connectors.
Before creating files, decide whether the user actually wants a live artifact or a normal static artifact:
- Use a live artifact when the user mentions refresh, sync, recurring updates, connector-backed data, source/provenance tracking, dashboards, reports, or reusable data-backed views.
- Use a normal static artifact when the user only wants a one-off HTML/mockup/image/file and does not need refresh, source metadata, or data/provenance panels.
- If the intent is ambiguous, ask one short question: “Should this be refreshable/live, or just a static artifact?”
Workflow
Resolve scope and data source without blocking on connected connectors
- Identify the preview goal, audience, data freshness expectations, and whether refresh should be possible later.
- If the user explicitly names a connector/source such as Notion, GitHub, Slack, or Google Drive, do not ask “where should the data come from?” before checking daemon connector tools.
- Prefer local/project sources or daemon connector tools when available.
- Do not call provider APIs directly when a daemon connector/wrapper exists.
- If connector data is needed, first list connectors with
"$OD_NODE_BIN" "$OD_BIN" tools connectors list --format compact. If the named connector is present withstatus: "connected", choose an appropriate read-onlyautotool from its catalog and execute it through the connector wrapper. - For Notion specifically, a connected
notionconnector plus a user brief that names Notion is enough to start withnotion.notion_searchusing a query derived from the requested artifact/topic. Usenotion.notion_fetch_databaseonly when the user supplied a database id or the search result clearly identifies one. - Ask the user a data-source question only when no matching connected connector exists, multiple connected candidates fit equally well, or the requested artifact has no usable topic/query to search for. If you must ask, be specific: ask for the page/database/topic or permission to search broadly, not “where is the Notion data source?”
Author the source files
- Write
template.htmlas the human-designed HTML template. The daemon hydrates it withdata.jsonusing thehtml_template_v1binding contract — stay inside it or hydration fails and the raw template ships with visible{{…}}tokens:- Scalars:
{{data.path.to.value}}. Paths start withdata, dot-separated; numeric array indexes are allowed ({{data.kpis.0.value}}). Every binding must resolve to a single string/number, not an object or array. - Lists: repeat one element with
data-od-repeat="item in data.items", then bind loop-scoped fields inside it as{{item.label}}(or{{item}}for a scalar array). One level only;data.*still works inside the repeat for globals. - Do NOT hand-loop in a
<script>(scripts are stripped from previews), and do NOT reference a bare loop variable like{{metric.value}}without a matchingdata-od-repeatscope — that binding is unresolvable. Nested repeats, conditionals, filters, helpers, and raw/triple-brace interpolation are unsupported.
- Scalars:
- Write
data.jsonas the canonical preview data used by those bindings — real values, not placeholders. - Write
artifact.jsonwith the live artifact metadata, preview declaration, document declaration, and safe source descriptors.
- Write
…
常见问题
什么是“Live Artifact”(实时产物)?
它是一种可以用新信息更新、无需完全重做的数据可视化内容(比如报告或仪表盘)。它基于模板和可替换的数据。
数据是如何刷新的?
这个工具可以从已连接的来源(比如 Notion 或 GitHub)或本地文件获取数据。当源头的数据更新后,可视化内容就可以刷新,以反映最新数据。
这个工具可以用于任何类型的数据吗?
可以,只要数据能够以可视化的形式呈现就行。它很适合仪表盘、报告,以及任何需要最新、可靠数据的场景。
详情
作者的原始描述
Create refreshable, auditable OpenDesign artifacts backed by connector or local data. Trigger when the user asks for live dashboards, refreshable reports, synced views, or reusable data-backed artifacts.
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #938
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …