live-dashboard
它能做什么
这个智能体会创建一个类似 Notion 风格的交互式仪表盘。它会展示关键指标(KPI)、近 7 天的快速图表、实时活动动态和任务列表。所有内容都放在一个可以更新的 HTML 页面中。
适用场景
- ✓当你想查看项目关键指标的表现时。
- ✓当你想追踪团队最近的活动时。
- ✓当你想快速了解任务及其状态时。
技能链接
https://github.com/nexu-io/open-design/blob/main/design-templates/live-dashboard/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我为项目 X 创建一个仪表盘,展示销售 KPI、近期活动和待处理任务。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用预设的 HTML 模板,并从已连接的来源(比如 Notion)获取数据来展示信息。如果没有连接任何来源,它会使用示例数据,确保仪表盘仍然可以正常运行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Live Dashboard
You are a senior product-designer-engineer building a Live Artifact — an HTML page that behaves like a working dashboard, not a mockup. Your output ships, not only renders.
Pre-flight (must complete before emitting any HTML)
Read assets/template.html— start from this skeleton verbatim. Do not rebuild the shell from scratch. Override only what the user's brief or the active DESIGN.md require.Read references/layouts.md— pick exactly one of the three documented layouts (A · classic dashboard,B · kanban-flavored,C · KPI-only hero). State your choice in your reply.Read references/components.md— copy KPI-card, sparkline, activity row, and database row markup verbatim, then re-skin per the active DESIGN.md. Do not invent new component shapes.Read references/connectors.md— only wheninputs.connector !== mock. Emit a siblingconnectors.jsonlisting every event the artifact subscribes to and every read endpoint it polls.Read references/checklist.md— every P0 row must be true before you emitindex.html. Quote each P0 row inline in your reply with[x]or[ ]. Do not emit while any P0 is unchecked.
Build order
- Lock visual direction from the active
DESIGN.md. Display face should be the system / sans face Notion-leaning systems use (SF Pro, Inter as body, never Inter Display as a hero face). Body 14/22. - Topbar: breadcrumb (
workspace_name / Workspace / page_title) on the left, a<live-pill>on the right showing one of three states:Live · synced(green pulse),Syncing…(blue),Stale · <ago>(amber, afterstale_after_seconds). - Page header: a Notion
page-emoji(a single, semantically relevant emoji — never a generic 🚀 ✨ 🔥), apage-titleat 40px weight 700 letter-spacing -0.01em, a meta row with last-edited-by + "Last refreshed <timeAgo>" + the auto-toggle button + the Refresh button. - Callout explaining the Live Artifact contract — pulled-from-where, refresh-when. One line. No marketing language.
- KPI grid: respect
inputs.kpi_count. 1px hairline grid, no shadows, no rounded internal cards. Numbersfont-variant-numeric: tabular-nums, weight 600, letter-spacing -0.01em. Each KPI gets a small grey delta line (↑ 6 vs last week). - Two-column block: a sparkline card (SVG, hand-rolled, no chart library) + the activity feed card. Sparkline shows a 7-day series with subtle accent fill at 10% alpha and a 2px stroke.
- Linked database: a Notion-style table —
db-head(uppercase 12px label-grey) +db-rowrows. Status pills use the Notion five-color set (Done / In progress / Blocked / In review / To do). Person chips use a colored 18px round avatar with two-letter initials. - Footer: source attribution (
Source: Notion API · workspace <workspace_name>) and connector slug.
Live behavior (the part that earns the "Live" in Live Artifact)
Wire these in a single <script> block at the bottom of index.html:
init()runsrefresh({silent: true})600ms after mount — the "refresh on open" semantic.- The Refresh button calls
refresh({silent: false}). Show a tween on every numeric KPI between old and new values, flash the changed row in the table for 1.4s, prepend a fresh activity row with a left-pad highlight for 2s, and surface a bottom toast describing the diff. The tween/flash hooks are already wired inassets/template.html(tweenText()+.flash+.db-row.changed+.feed-row.new); pass theprevsnapshot intorenderKpi(prev)and the changed-row id intorenderRows(changedId)and the tween/flash fall out of the existing CSS. Do not rebuild this from scratch. setInterval(refresh, refresh_seconds * 1000)when Auto is on.- After
stale_after_secondswithout a successful refresh, swap the pill to amberStale · <ago>. - Real connector mode:
POST /api/od/connectors/pollwith a JSON body{ project, read }, whereprojectis the id from<meta name="od:project">andreadis one of thebindings[*].reads[].idvalues declared inconnectors.json. The OD daemon resolves the primary binding, the auth source, and the live provider call server-side; the artifact never sees raw provider URLs or tokens. Seereferences/connectors.mdfor the wire shape and the daemon resolution order. On error, fall back to the seeded mock so the
…
常见问题
什么是“Live Artifact”(实时产物)?
它是一个 HTML 页面,像真正的仪表盘一样展示最新数据,而不是一张静态图片。
数据是如何更新的?
你可以点击“刷新”按钮手动更新,也可以设置间隔时间自动更新。每次打开仪表盘时,它也会自动更新。
如果数据源连接失败,会怎样?
仪表盘会使用预先加载的示例数据,保证继续运行,并在页脚显示一条小提示说明问题,不会打断你的查看。
详情
作者的原始描述
Notion-style team dashboard rendered as a Live Artifact. A single-page, self-contained HTML dashboard with KPIs, a 7-day sparkline, a real-time activity feed and a linked-database task table — wired to Notion via the Composio connector catalog. Refreshes on demand and when the artifact is opened. Falls back to seeded mock data when no connector is bound, so it works offline / in screenshots / in t
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #939
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …