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.
1---
2name: dashboard
3description: |
4 Admin / analytics dashboard in a single HTML file. Fixed left sidebar,
5 top bar with user/search, main grid of KPI cards and one or two charts.
6 Use when the brief asks for a "dashboard", "admin", "analytics", or
7 "control panel" screen.
8triggers:
9 - "dashboard"
10 - "admin panel"
11 - "analytics"
12 - "control panel"
13 - "后台"
14 - "管理后台"
15od:
16 mode: prototype
17 platform: desktop
18 scenario: operations
19 preview:
20 type: html
21 entry: index.html
22 design_system:
23 requires: true
24 sections: [color, typography, layout, components]
25 craft:
26 requires: [state-coverage, accessibility-baseline, laws-of-ux]
27metadata:
28 source: https://skillmd.com/skills/gabrielmoreira/dashboard
29---
30
31# Dashboard Skill
32
33Produce a single-screen admin / analytics dashboard.
34
35## Workflow
36
371. **Read the active DESIGN.md** (injected above). Colors, typography, spacing,
38 component styling all come from it. Do not invent new tokens.
392. **Classify** what the dashboard monitors (sales, traffic, usage, incidents,
40 ops, etc.) from the brief. Generate specific, plausible metric names and
41 values — no "Metric A / Metric B" placeholders.
423. **Lay out** the required regions:
43 - **Left sidebar** (220–260px): brand mark at top, 6–8 nav links with
44 icons, active state uses the DS accent.
45 - **Top bar**: page title on the left, search input + user avatar / status
46 on the right.
47 - **Main**:
48 - Row 1: 3–4 KPI cards (label + big number + delta vs. prior period).
49 - Row 2: one primary chart (full width or 2/3) — render as an inline SVG
50 line / bar / area chart drawn from real-looking numbers.
51 - Row 3: one secondary chart or table (recent events, top items, etc.).
524. **Write** one self-contained HTML document:
53 - `<!doctype html>` through `</html>`, CSS in one inline `<style>` block.
54 - CSS Grid for the overall layout; Flexbox inside cards.
55 - Semantic HTML: `<aside>`, `<header>`, `<main>`, `<section>`.
56 - Tag each logical region with `data-od-id="slug"` for comment mode.
575. **Charts**: inline SVG only, no JS libraries. A line chart is ~10 lines of
58 `<polyline>` with a subtle area fill. A bar chart is N `<rect>`s with
59 DS-accent fill. Label axes lightly (muted text, smaller scale).
606. **Self-check**:
61 - Every color comes from DESIGN.md tokens.
62 - Accent used at most twice (sidebar active + one chart highlight).
63 - Sidebar + top bar are sticky; main scrolls independently.
64 - Density matches the DS mood — airy DSes get more padding, dense DSes
65 (trading, crypto) tighten rows.
66
67## Output contract
68
69Emit between `<artifact>` tags:
70
71```
72<artifact identifier="dashboard-slug" type="text/html" title="Dashboard Title">
73<!doctype html>
74<html>...</html>
75</artifact>
76```
77
78One sentence before the artifact, nothing after.