dashboard
它能做什么
创建一个单页网页,作为控制面板。它把指标和图表等关键信息集中显示在一个页面里,并配有侧边栏用于导航。
适用场景
- ✓当你需要一个仪表盘来查看重要数据时。
- ✓想创建管理后台或控制界面时。
- ✓如果请求中提到 “dashboard”、“admin” 或 “control panel”。
技能链接
https://github.com/nexu-io/open-design/blob/main/design-templates/dashboard/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个销售仪表盘,包含营收和用户 KPI、每日销售折线图以及最近订单表格。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会这样组织页面:侧边栏放菜单,顶部栏放标题和搜索框,主区域则用卡片展示关键数字和图表。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Dashboard Skill
Produce a single-screen admin / analytics dashboard.
Workflow
- Read the active DESIGN.md (injected above). Colors, typography, spacing, component styling all come from it. Do not invent new tokens.
- Classify what the dashboard monitors (sales, traffic, usage, incidents, ops, etc.) from the brief. Generate specific, plausible metric names and values — no "Metric A / Metric B" placeholders.
- Lay out the required regions:
- Left sidebar (220–260px): brand mark at top, 6–8 nav links with icons, active state uses the DS accent.
- Top bar: page title on the left, search input + user avatar / status on the right.
- Main:
- Row 1: 3–4 KPI cards (label + big number + delta vs. prior period).
- Row 2: one primary chart (full width or 2/3) — render as an inline SVG line / bar / area chart drawn from real-looking numbers.
- Row 3: one secondary chart or table (recent events, top items, etc.).
- Write one self-contained HTML document:
<!doctype html>through</html>, CSS in one inline<style>block.- CSS Grid for the overall layout; Flexbox inside cards.
- Semantic HTML:
<aside>,<header>,<main>,<section>. - Tag each logical region with
data-od-id="slug"for comment mode.
- Charts: inline SVG only, no JS libraries. A line chart is ~10 lines of
<polyline>with a subtle area fill. A bar chart is N<rect>s with DS-accent fill. Label axes lightly (muted text, smaller scale). - Self-check:
- Every color comes from DESIGN.md tokens.
- Accent used at most twice (sidebar active + one chart highlight).
- Sidebar + top bar are sticky; main scrolls independently.
- Density matches the DS mood — airy DSes get more padding, dense DSes (trading, crypto) tighten rows.
Output contract
Emit between <artifact> tags:
<artifact identifier="dashboard-slug" type="text/html" title="Dashboard Title">
<!doctype html>
<html>...</html>
</artifact>
One sentence before the artifact, nothing after.
常见问题
什么是 KPI?
KPI 是 “Key Performance Indicators”(关键绩效指标)的缩写,指用来衡量某件事表现如何的重要数字,比如销售额或访问量。
“inline SVG” 是什么意思?
意思是图表直接写在 HTML 代码里,不需要外部文件,也不需要复杂的编程库。
我能修改颜色和外观吗?
颜色和整体风格由单独的设计文件决定。AI 会使用这些定义,而不会自己发明新的风格。
详情
作者的原始描述
Admin / analytics dashboard in a single HTML file. Fixed left sidebar, top bar with user/search, main grid of KPI cards and one or two charts. Use when the brief asks for a "dashboard", "admin", "analytics", or "control panel" screen.
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #869
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …