You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent/skills/dashboard-design/SKILL.md
+57-5Lines changed: 57 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
name: dashboard-design
3
3
description: Design and code a self-contained HTML dashboard for DeepSQL — ground on the schema, verify SQL, then write a beautiful single-file dashboard that loads data via the deepsql.query bridge.
deepsql.charts.format(n) // human number formatter
34
36
```
35
37
38
+
**Chart sizing and the expand control are handled by the runtime — do not build your own.**
39
+
Height is fixed regardless of container width (a chart in a wide card never balloons), and every
40
+
chart already gets a corner "expand" button that opens a larger re-render in an overlay — this is
41
+
exactly the kind of per-chart chrome that's tempting to hand-roll and easy to get inconsistent
42
+
across widgets, so it's built into `deepsql.charts.*` once instead. Pass `opts.title` (the chart's
43
+
plain-business-language heading) so the expanded overlay has something to show as its title — do
44
+
not add your own zoom/expand/fullscreen button, modal, or lightbox; one already exists per chart.
45
+
36
46
Hard rules:
37
47
- Inline everything — one `<style>`, one or more `<script>`. **No external URLs, CDNs, fonts, or images** (blocked by CSP) and **no `fetch()`/XHR/WebSocket** — data comes only from `deepsql.query`.
38
48
- Never hardcode result data. Query live on load, and re-query when a control changes.
@@ -52,6 +62,9 @@ Hard rules:
52
62
- No `undefined` / `null` / `NaN` can reach the screen — every injected value is guarded with a fallback. Pay special attention to KPI sub-labels and any computed % (e.g. a "top source share" caption).
53
63
- Every explicit user ask from the intent checklist is present and wired (controls default correctly and re-query on change).
54
64
- No table/column/SQL/connection-id text is visible anywhere.
65
+
- No AI-slop pattern from the section below is present (gradient background/hero, emoji-as-icon,
66
+
decorative blobs/glassmorphism, uniform shadows, off-scale spacing/type, more than one accented
67
+
"hero" card, hand-rolled chart colors or expand/zoom controls).
55
68
A dashboard that renders with a blank chart or an "undefined" label is a failed build — catch it here.
56
69
57
70
## NEVER expose internals (security + UX — non-negotiable)
@@ -80,6 +93,45 @@ Rules:
80
93
- Numbers formatted for humans (`deepsql.charts.format(n)` / thousands separators; currency symbol from the business rule) — never raw.
81
94
-**Never render `undefined`, `null`, or `NaN`.** Guard every value you inject into the DOM (`v == null ? '—' : v`); a KPI sub-line/label with no value must fall back to a dash or be omitted — not the literal text "undefined".
82
95
96
+
## Avoid AI-slop patterns (named, so you can catch yourself)
97
+
98
+
These are the specific tells that make a generated dashboard look generated instead of
99
+
designed. Each one is easy to reach for by default — that's exactly why it needs to be named
100
+
and ruled out explicitly, not left to taste.
101
+
102
+
-**No default purple/blue/pink gradient backgrounds.** A `linear-gradient(135deg, #667eea, #764ba2)`-style
103
+
hero band, header, or card is the single most recognizable AI-generated-UI signature. `--ds-grad`
104
+
exists for exactly one purpose — a subtle lift on the single most important KPI card — never a page
105
+
background, never a header banner, never more than one card on the whole dashboard.
106
+
-**No emoji as icons, bullets, or section markers.** Not in KPI labels, not in section headers, not
107
+
as a substitute for a real icon. If a visual marker is needed, use a plain shape (a dot, a small
108
+
colored square in a legend) — never 📊📈💰✨ etc.
109
+
-**No oversized rounded "blob" shapes, decorative background circles, or glassmorphism for its own
110
+
sake.**`backdrop-filter`/translucency is not part of this theme — don't add it. Every visual
111
+
element must carry information (a card, a chart, a legend swatch); nothing is decoration.
112
+
-**No uniform drop-shadow on every element.**`--ds-shadow` is for cards that sit on `--ds-bg` —
113
+
don't add extra shadows to buttons, badges, or text, and don't stack multiple shadow layers for
114
+
"depth." Flat and quiet is correct here.
115
+
-**No arbitrary one-off spacing or font sizes.** Pick from a small fixed scale and stay on it for
116
+
the whole document:
117
+
- Spacing: `4px 8px 12px 16px 24px 32px` — nothing between these, nothing larger without a real reason.
118
+
- Type: 3 sizes total — a KPI number (~28–32px, bold), section/card headings (~14–15px, semibold),
119
+
body/labels (~12–13px, regular). Don't introduce a fourth size for a one-off caption.
120
+
-**No centered "hero" layout with everything stacked in one narrow column.** This is a working
121
+
dashboard, not a landing page — use a real grid (`auto-fit`/`auto-fill` KPI row, multi-column chart
122
+
layout) that uses the available width purposefully.
123
+
-**Chart color discipline:** stick to the theme's own greyscale chart palette (already built into
124
+
`deepsql.charts.*` — you don't choose chart colors). Don't override `opts.color` per chart to
125
+
introduce your own arbitrary hues; the built-in palette is the whole point of using the shared
126
+
chart runtime instead of hand-rolled SVG.
127
+
-**One hero KPI, not a "hero row."** If more than one card gets the gradient/accent treatment,
128
+
none of them read as important — that defeats the point. Pick the single number the business
129
+
question is actually about and reserve the accent for it alone.
130
+
131
+
Before emitting, ask: **would this ship, unedited, from a design team that obsesses over every
132
+
pixel — or does it look like the first thing a template generator produced?** If any of the
133
+
patterns above are present, that's your answer.
134
+
83
135
## Interaction
84
136
85
137
- Wire controls to re-run only the affected queries and re-render — never reload the page. A date range picker defaults to what the user asked for (e.g. today) and drives every time-sensitive query.
0 commit comments