跳到主要内容

dataviz 精选

Use this skill whenever you are about to create ANY chart, graph, plot, dashboard, or data visualization, in ANY output medium — an HTML or React artifact, inline SVG, plotting code in any library (matplotlib, plotly, d3, Recharts, …), an image/PNG you will render and upload, or a chart shared into Slack. Read it BEFORE writing the first line of chart code, choosing chart colors, building a stat tile / meter / KPI row, or laying out a dashboard. When the destination is a first-party document connector (host-designated, never self-described) that renders live charts, hand it the rows (inline, or as an uploaded data file the chart cites) rather than a rendered PNG/SVG — a picture of a chart loses hover, data inspection and per-value comments. Produces visualizations that read as one system — elegant, accessible, consistent in light and dark — using a brand-neutral placeholder palette you swap for your own. Teaches a design-system-agnostic method: a form heuristic, a color formula with a runnable validator, mark specs, and interaction rules. A validated default palette is documented in `references/palette.md` — swap that file's values for your brand's. Triggers on: "chart", "graph", "plot", "data viz", "visualization", "dashboard", "analytics", "visualize data", "categorical colors", "sequential / diverging palette", "stat tile", "sparkline", "heatmap", "legend", "axis", "tooltip", "chart colors", "color by series".

在 GitHub 打开

安装方式

cp -r Anthropic/claude-code/skills/dataviz ~/.claude/skills/dataviz

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git

依赖与权限

  • 无需 API Key
  • 无需联网
  • 依赖外部命令:node make
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。
触发场景
graphplotdashboarddata visualizationin

SKILL.md 正文

来源 asgeirtj/system_prompts_leaks@a09e0e7 · 许可 CC0-1.0 · 内容未修改

Data Visualization

A chart is read by people and executed by you. This skill turns "make it look

good" into a procedure with checks, so the result is right by construction rather

than by taste.

The method here is design-system-agnostic. Nothing in the procedure, the form

heuristic, the six checks, or the mark specs is specific to one product. A design

system supplies a small set of parameters (its ramps, a categorical order, a

diverging pair, a status palette, a texture, its surfaces, its filter components);

the method consumes them unchanged. A validated default palette is the

reference instance, fully specified in references/palette.md. To target your

brand, read that file's structure and substitute its values - touch nothing else.

The single most important habit: the color part is computable, so compute it.
Never eyeball whether a palette is colorblind-safe - run scripts/validate_palette.js.

The procedure - do these in order

Color comes LAST. Most bad charts pick colors first.

  1. Pick the form. What is the data's job - magnitude, identity, polarity, a

single headline, change-over-time? The job picks the chart type, and sometimes

the answer is not a chart (a stat tile or hero number). -> references/choosing-a-form.md

  1. Assign color by the job it does. Categorical (identity), sequential

(magnitude), diverging (polarity), or status (state) - each has one rule.

Assign categorical hues in fixed order, never cycled. -> references/color-formula.md

  1. VALIDATE the palette - run the script, don't reason about Delta E.

node scripts/validate_palette.js "<hex,hex,...>" --mode light (relative to

this skill's base directory - or load it as <script type="module"> in the

chart's own page, where it reads

data-palette off <body> and logs a console.table report). It returns

pass/fail on the lightness band, chroma floor, adjacent-pair CVD separation,

the normal-vision floor, and contrast. Fix anything that FAILs before continuing. Re-run for

--mode dark with that mode's surface.

  1. Apply mark specs & spacers. Thin marks, 4px rounded data-ends anchored to

the baseline, 2px lines, >=8px markers, a 2px surface gap between fills (stacked

segments and adjacent bars alike) and a 2px surface ring on overlapping marks,

selective direct labels. -> references/marks-and-anatomy.md

  1. Add the hover layer - by default. An HTML/SVG chart is interactive; ship

a crosshair+tooltip on line/area and a per-mark hover tooltip on bar/dot/cell.

The only form that skips it is a bare stat tile with no plot. Hit targets bigger

than the mark; filters in one row above the charts. -> references/interaction.md

  1. Final accessibility pass. For >= 2 series a legend is always present and <= 4

are also direct-labeled (a single series needs no legend box - the title names

it), so identity is never color-alone; a table view exists; dark mode is selected - its own

steps from the same ramps, validated against the dark surface, not an automatic

flip; texture is available for the CVD/print/forced-colors case.

  1. Render it and look at it. The validator checks color, not layout - open or

screenshot the output and eyeball it for label collisions, geometry, and overflow

before calling it done.

Then check the result against references/anti-patterns.md - it is the catalog

of what goes wrong. If your chart matches an entry, it's wrong.

Non-negotiables (true in every design system)

  • Assign categorical hues in fixed order, never cycled. A 9th series is never a

generated hue - it folds into "Other," small multiples, or composite encoding.

  • One axis. Never a dual-axis chart (two y-scales). Two measures of different

scale -> two charts, small multiples, or indexed to a common base. *(This is the

#1 chart mistake - see anti-patterns.)*

  • Color follows the entity, never its rank. A filter that changes the series

count must not repaint the survivors.

  • **Sequential = one hue, light->dark. Diverging = two hues + a neutral gray

midpoint.** Never a rainbow; never a hue at the diverging midpoint.

  • Run the validator before shipping any categorical palette. CVD Delta E >= 8 is the

target (OKLab ×100); 6-8 is a floor that is legal ONLY with secondary encoding. A

normal-vision floor below 15 is a hard FAIL - full-color readers can't tell the

pair apart; re-step it on the adjacent pairlist (secondary encoding does not excuse

this one); under --pairs all cut series or facet instead - see check 4. A contrast WARN

obligates visible labels or a table view - it is not dismissable.

  • **Thin marks; a legend always present for >= 2 series (none for one), with

selective direct labels (never a number on every point); recessive grid/axes.**

  • Text wears text tokens, never the series color - values, labels, and legends

stay in primary/secondary/muted ink; a colored mark beside them carries identity.

  • Status colors are reserved (good/warning/serious/critical) and never reused

for "series 4"; they ship with an icon + label, never color alone.

Plugging in a design system

The method is invariant; only these parameters change per system. The reference

instance - every value filled in - is references/palette.md.

ParameterWhat the system provides
Rampsthe hue scales (named steps) the palette draws from
Categorical themethe fixed hue order (a named theme); default + alternates
Sequential huethe default single hue for magnitude
Diverging pairtwo warm/cool poles + a neutral midpoint
Status palettegood / warning / serious / critical - steps distinct from categorical
Texture fillone directional hand-drawn fill, used at 45° / 135°
Surfaceslight & dark chart-surface colors (the validator needs these)
Filter controlsdate-range & dimension controls (behavioral spec in interaction.md)

To onboard a new system: fill those rows, feed its ramps to the validator, and let

it snap each slot to the nearest passing step. Structure and rules stay as written.

Reference files

FileWhat it answers
references/choosing-a-form.mdWhich chart type / is it even a chart?
references/color-formula.mdThe four jobs, the six checks, snap-to-passing
references/marks-and-anatomy.mdMark specs, spacers, labels, figures, hero number
references/interaction.mdTooltips & hover, filters & time ranges
references/components.mdThe pieces a chart is made of - build each in plain HTML
references/anti-patterns.mdWhat goes wrong - check every chart against this
references/palette.mdThe reference palette instance - every parameter, filled in; swap for your brand's
scripts/validate_palette.jsRunnable six-checks validator (run it; don't eyeball)

质量与来源

所属仓库
asgeirtj/system_prompts_leaks
仓库星标
6.9 万
最近更新
今天
采集时间
今天
commit
a09e0e708710
内容指纹
sha256:767676046b1be76
文件路径
Anthropic/claude-code/skills/dataviz/SKILL.md

同仓库其它 Skill

查看全部 48 个
dashboard
Use this for a dashboard, metrics page, KPI tracker, scorecard, data visualization or recurring report: a page or scroll story of charts, numbers and tables of data, whatever the data and wherever it comes from. Read it when creating, filling, refreshing or revising one. You write datasets (a live query on a connector, or an attached CSV/TSV/JSON file), then the page as plain HTML, in the dashboard's own store.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
design-system
How to create and revise a design system made from the Design System appifact type: its files under project/, the exact shapes and size caps, the order to write in, how to change one later, and the checklist.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
design
How to fill and revise a canvas made from the Design (canvas) appifact type.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
pages
The shared Claude Docs viewer — an artifact TYPE. An artifact made from it is a doc: a live document that people and Claude read and edit together (people may also call it a page). The doc's content does not live in this artifact's files at all — it lives in the Claude Docs service and is read and written ONLY through the Claude Docs connector (its create, batch, read and update tools). Read this before touching such an artifact: it says what the files are, that an instance owns none of its own, how to change what the doc says (the connector, never a publish), and where a comment on the doc — including one sent to you from it — is read and answered (the connector's comment verbs; never these files, never the artifact's comment relay).
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
slides
How to fill and revise a deck made from the Slides appifact type.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor
deep-research
Use this skill when the user's prompt requires (1) researching a topic across multiple sources, comparing options or alternatives, analyzing trends or history, understanding markets or industries, or reviewing literature or studies and (2) synthesizing that research into a comprehensive, narrative report. If you're planning to search the web or internal knowledge bases, consider using this skill. This skill coordinates research subagents, so use it only when you have a tool for spawning subagents (the Agent or Task tool); otherwise, research the question directly.
精选 asgeirtj/system_prompts_leaks 6.9 万 原文
Claude CodeCodex CLICursor

相似 Skill

更多「编码」
access
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the iMessage channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set this up" or "who can reach me," or wants to know why texts aren't reaching the assistant.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Telegram channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端