claude-dashboard
它能做什么
这项技能根据你已有的数据集构建本地仪表盘或指标页面,以带有清晰来源的图表、关键数字和表格展示。适合希望拥有可定期刷新的报告或 KPI 跟踪器的人。
适用场景
- ✓当你希望基于 CSV、JSON 或电子表格导出文件构建仪表盘、KPI 跟踪器或记分卡时。
- ✓当你希望数字旁边有一个面板,可追溯每个数字的来源的时候。
- ✓当你希望有一份可以用新数据定期刷新的报告的时候。
技能链接
https://github.com/JimLiu/baoyu-design/blob/main/dsh-plugins/dsh-claude-dashboard/skills/claude-dashboard/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用这份销售 CSV 构建一个仪表盘,包含按月的图表和表格,并标出每个数字的来源。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把数据集加载到仪表盘的文档存储中,基于这些数据编写页面,并在实时编辑器中打开。每个数字都链接到其来源。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Dashboard — the shared type
A dashboard is a page you write over datasets the type loads, attributes
and refreshes. Everything is a document in its own store, written with
write-db. SKILL.md, artifact-type/ and scripts/ are the type's own
files: leave them as they are.
What the person asks for is what you build; the defaults apply only to what
they left unsaid. Whatever the page's own code can draw or do is allowed: any
chart, control or interaction. A chart they named is the one you draw, by hand
where d3 has no helper; if you draw another, say which and why.
The calls
A dashboard is a folder, <root>: designs/<slug>/ in the current project
unless the person names another (<slug>: the title in lowercase words joined
by -; a title not in Latin letters, such as a Chinese one, takes a short
English rendering of it: x-account-analytics). The first write-db or
upload creates it. One script, Node 22 or later with nothing to install,
does every call; below, A is <this skill's folder>/scripts/artifact.mjs.
| Command | Does |
|---|---|
node $A write-db <root> <batch.json | -> |
Writes documents: set, update, delete. All or nothing. |
node $A read-db <root> [<collection>[/<doc_id>]] [--text] |
Lists every document, a collection's, or one (--text prints its text raw). |
node $A upload <root> <file> [--name n] |
Attaches a CSV, TSV or JSON file: {"url": "/_blob/<id>", "bytes", "contentType", …}. |
node $A delete-asset <root> <url | id> |
Removes an attached file no document names any more. |
node $A check <root> |
Checks the documents, the page's files, and that each dataset mark's data-where/data-row finds its rows. Exit 1 while problems > 0. |
node $A open <root> [--port n] [--lan] |
Starts the editor at 127.0.0.1:4740 (the next free port up when 4740 is taken; --port n starts from n, --port 0 takes any) in the background and returns {"url", "pid", "stop", …}; url is the dashboard's own page; its path, /dashboard/<id>/, stays the same from one start to the next (/ goes there). Run again, it reuses the one running. --lan: also on the local network (see Sharing). --agent-hook "<command>": see Comments. |
node $A serve <root> [--port n] [--lan] / stop <root> |
The same server in the foreground / stops the background one. |
node $A share <root> |
Opens it to the local network and prints a link per role; --disable / --enable / --reset <role>, --role <guest>=<role>, --off. See Sharing. |
node $A comments <root> [--all] / --wait |
The comments people left on the page / waits for one they send you. See Comments. |
node $A comment-reply <root> <id> <text|-> / comment-resolve <root> <id> |
Answers one (--resolve closes it too) / closes one (--reopen). |
node $A archive <root> [--out file.zip|dir] |
The whole folder, history and comments too, as one zip beside it (--out: another file or folder), to back it up, move it to another computer or send it to someone: {file, files, bytes, open}. Unzipped anywhere, open carries on. The owner's Download folder button in the page does the same; the server's own files and the share links stay out. |
- A batch is a JSON array (or
{"writes": [...]}) of{"op": "set" | "update" | "delete", "path": "<collection>/<doc_id>", "data": {...}}(collectionanddoc_idin place ofpathwork too;file_path, a JSON file, in place ofdata). Up to 50 writes and 1 MB, each document once; every write is checked before any is written.-reads the batch from stdin. From a shell heredoc, quote its word (<<'EOF'): unquoted, the shell expands$fileand any other$or backtick in the batch. Or write the batch to a file and pass its path. - A file's text without escaping:
{"$file": "<path>"}anywhere indatabecomes that file's text, so the page is{"op": "set", "path": "files/index.html", "data": {"text": {"$file": "designs/<slug>/src/index.html"}}}. Paths are relative to the current directory. Keep your working copy in<root>/src/; the store is what the page shows (read-db <root> files/index.html --textprints it). updatemerges fields at any depth;null(or{"__delete__": true}) removes a key; an array or a value replaces.setwrites the whole document;deleteremoves it.- On disk:
<root>/db/<collection>/<doc_id>.json, one JSON file a document (db/dash/meta.json, `db/datasets/<id>.json
常见问题
它可以使用哪些数据?
它可以处理你已有的 CSV、TSV 或 JSON 文件,也可以处理你收集并附加的数据。
之后可以刷新仪表盘吗?
可以。仪表盘的设计就是为了在有新数据时进行刷新。
需要安装什么?
需要 Node 22 或更高版本,除此之外无需安装其他东西。
详情
作者的原始描述
Use this for a local, data-backed dashboard, metrics page, KPI tracker, scorecard, data visualization or recurring report that opens in the bundled live editor: a page or scroll story of charts, numbers and tables over datasets (a CSV/TSV/JSON file the user has, or data you gather and attach), with a Sources panel that shows where every number comes from. Read it when creating, filling, refreshing or revising one. You write the datasets, then the page as plain HTML, into the dashboard's own store with this skill's script. Not for a static HTML mockup or a picture of a dashboard: that is the ba
repo: JimLiu/baoyu-design
热度
- GitHub 星标
- 5.9k
- 排名
- #14531
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
claude-design-system
5.9k帮你的智能体以文件形式创建和编辑品牌设计系统,包含设计令牌、字体、组件和素材,并在本地编辑器中打开。
claude-design
5.9k帮你的智能体制作可编辑的设计画板画布,你可以并排查看,并在本地编辑器中进行调整。
claude-slides
5.9k帮你的智能体制作和修改可编辑的幻灯片,在本地幻灯片编辑器中打开,可演示并导出为 PDF、HTML 或 PowerPoint。
dataviz
5.9k教你的智能体设计清晰的图表、图形和仪表盘,选择合适的图表类型,并使用无障碍且一致的配色。