跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

data-dashboard

Build a dense, data-heavy screen - an analytics console or a trading terminal - with real charts drawn from tokens: candlestick, volume, depth, stacked area, waterfall, scatter, correlation matrix, donut, gauge, sparklines, heatmaps and order books. Use when the request is a dashboard, terminal, monitoring view, data console, or any screen whose job is to show many numbers at once. Covers the layout sequence, the SVG geometry, the accessibility contract per chart type, and the contrast traps that only appear in dark mode.

plugin87 · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add plugin87/ux-ui-agent-skills --skill data-dashboard

技能说明


name: data-dashboard description: Build a dense, data-heavy screen - an analytics console or a trading terminal - with real charts drawn from tokens: candlestick, volume, depth, stacked area, waterfall, scatter, correlation matrix, donut, gauge, sparklines, heatmaps and order books. Use when the request is a dashboard, terminal, monitoring view, data console, or any screen whose job is to show many numbers at once. Covers the layout sequence, the SVG geometry, the accessibility contract per chart type, and the contrast traps that only appear in dark mode. invocation: model

Skill: Data dashboard

A dashboard is the hardest screen to keep honest: it is dense, it is mostly non-text, and almost every default makes it worse. This is the recipe that produced examples/showcase/ and examples/terminal/, both of which pass every gate in both themes.

1. Decide the brief before drawing anything

Answer these in one line each, or /grill-me them out of the user:

  • Who reads this, and what decision do they make from it? A revenue console for an operator and a trading desk for a dealer look nothing alike.
  • What is the one number that leads? A dashboard without a lead is a wall.
  • What is the update cadence? Hourly figures get a "last run" line. Live figures get a tape and a timestamp per row.
  • How dense is honest? A terminal earns 12 panels. A weekly report does not.

2. Layout sequence, not a grid of equal cards

Four equal stat cards is the single loudest tell that nobody designed this. Compose in bands, each a different shape:

BandContentWhy
1Hero metric at 3x body size + its own chart, spanning most of the widthThe eye lands once
2Two or three secondary figures, stacked or narrowQuiet by construction
3Three different chart shapes side by side (donut, ranked bars, sparklines)Variety reads as intent
4A table that really sorts, plus a feed or logDetail after summary
5A footer line that ends the pageA page must end on purpose

Use a 12-column grid with explicit spans (span 8 / span 4), collapsing to 6 then 1. Never repeat(auto-fit, …) for the primary bands - it produces exactly the equal-card wall you are avoiding.

3. The chart inventory

All of these are plain inline SVG with viewBox, sized by CSS, filled from --color-chart-*. No chart library, no runtime dependency.

ChartGeometryUse it for
Bar / column<rect> per bucket, rx for a soft cornerDiscrete periods
Candlestick<line> wick + <rect> body per period, class by up/downOHLC price
VolumeBars under the price chart, same x-scale, opacity:.45Conviction behind a move
Moving average<polyline> over the candles, 2px, round joinsTrend through noise
Line / sparkline<polyline>, pathLength="1" for a draw animationTrend in a cell
Area / stacked area<path> per band: forward along the top, reverse along the previous baseline, closeComposition over time
DepthTwo cumulative area paths mirrored around the midBook liquidity
WaterfallFloating <rect> per step + dashed connectors between levelsAttribution
Donut<circle> with stroke-dasharray and rotate() per segmentShare of a whole, 3-5 slices
Radial gaugeSame trick, stroke-linecap:round, 270-degree sweepOne value against a limit
Scatter / bubble<circle>, radius = third dimensionTwo measures plus weight
Correlation matrixHTML table, cell tint via color-mixPairwise relationships
HeatmapHTML table or <rect> grid, tint by valueCohorts, calendars
Order bookHTML table with a depth bar per rowBids and asks

Generate the geometry, do not hand-place it. Write a small deterministic script (a seeded walk) that emits the SVG elements, then paste the output in. Hand-typed coordinates drift and cannot be regenerated.

4. Domain correctness is part of craft

Gates cannot catch a chart that is drawn beautifully and means nothing. Check by hand:

  • A correlation matrix is symmetric and its diagonal is exactly 1. Random values in both triangles is an instant tell to anyone who reads one for a living.
  • A stacked area sums to the total; bands must not cross or leave gaps. The usual bug is reversing the baseline by index instead of by coordinate, which shows as dark wedges between bands.
  • A waterfall needs connectors, and the closing bar must equal opening plus the steps.
  • Depth rises away from the mid on both sides; it never falls.
  • A donut whose segments do not total the whole is a pie chart lying.

5. Accessibility contract, per chart

  • Every SVG gets role="img" plus either aria-label or <title>+<desc> referenced by aria-labelledby. Say what the chart shows, not that it is a chart: "Range 182.06 to 200.10, closing at 187.84" beats "price chart".
  • Never encode meaning in colour alone. Green with a + and an arrow; red with a -. Up and down also carry a word in the table cell.
  • Tables get <caption> (use .sr-only when the panel header already says it), scope="col" / scope="row", and aria-sort only if clicking really sorts.
  • Sortable headers, range tabs and theme toggles all declare state - so they must change it on a real click. verify_interactive.mjs clicks them and checks.

6. The traps that only appear when you measure

Every one of these was found on a screen that looked finished. The first group a gate caught; the ones marked "no gate sees it" were caught by opening the screenshot and looking, which is why that step is not optional:

  • A chart palette is not a text palette. White initials on --color-chart-4 measured 2.65:1 in dark. Chart colours are tuned for large filled shapes.
  • Success green as text on a raised surface measured 4.43:1 - four hundredths short of AA. Put the colour on the icon a
阅读完整来源 ↗