| name | bonnard-build-dashboard |
| description | Guide a user through building and deploying a markdown dashboard. Use when user says "build a dashboard", "create a chart", "visualize data", or wants to create a dashboard. |
| allowed-tools | Bash(bon *), Write, Edit, Read |
Build & Deploy a Markdown Dashboard
This skill guides you through creating a markdown dashboard with built-in
chart components and deploying it to Bonnard.
Phase 1: Explore Available Data
Discover what measures and dimensions are available to query:
bon schema
bon schema <view_name>
bon query '{"measures": ["view_name.measure"], "dimensions": ["view_name.dimension"], "limit": 5}'
bon query --sql "SELECT MEASURE(total_revenue), date FROM sales_performance LIMIT 5"
Ask the user what data they want to visualize. Match their request to
available views and measures.
Phase 2: Learn the Format
Review the dashboard format docs for reference:
bon docs dashboards
bon docs dashboards.components
bon docs dashboards.queries
bon docs dashboards.inputs
bon docs dashboards.examples
Phase 3: Build the Markdown File
Create a .md file with three parts:
- YAML frontmatter — title and optional description
- Query blocks —
```query name code fences with YAML query options
- Components —
<BigValue />, <LineChart />, <BarChart />, etc.
Key points:
Example structure:
---
title: Revenue Dashboard
description: Key revenue metrics and trends
---
` ``query total_revenue
measures: [orders.total_revenue]
` ``
` ``query order_count
measures: [orders.count]
` ``
<BigValue data={total_revenue} value="orders.total_revenue" title="Revenue" fmt="eur2" />
<BigValue data={order_count} value="orders.count" title="Orders" />
## Trend
` ``query monthly
measures: [orders.total_revenue, orders.count]
timeDimension:
dimension: orders.created_at
granularity: month
` ``
<BarChart data={monthly} x="orders.created_at" y="orders.total_revenue" y2="orders.count" yFmt="eur" y2Fmt="num0" y2SeriesType="line" title="Revenue & Orders" />
Save the file (e.g., dashboard.md).
Phase 4: Preview Locally (Required)
Always preview before deploying. Open a local dev server with live reload:
bon dashboard dev dashboard.md
This opens a browser with the rendered dashboard. Edit the .md file and
the preview updates automatically. Queries run against the deployed
semantic layer using the user's credentials.
Requires bon login — no API key needed.
Ask the user to review the preview and confirm it looks correct before
moving to Phase 5. Do not skip this step — deploying without previewing
often results in layout issues, missing data, or wrong chart types that
are easy to catch locally.
Phase 5: Deploy
Once the user has confirmed the preview looks good, deploy the dashboard:
bon dashboard deploy dashboard.md
This will:
- Upload the markdown content
- Assign a slug (derived from filename, or use
--slug)
- Extract the title from frontmatter
- Print the URL where the dashboard is accessible
Options:
--slug <slug> — custom URL slug (default: derived from filename)
--title <title> — override frontmatter title
Theming (Optional)
Customize colors and palettes:
- Per-dashboard: Add
theme: to frontmatter (e.g. theme: { palette: observable })
- Org-wide: Create a
theme.yml and run bon theme set theme.yml
- Preview locally:
bon dashboard dev dashboard.md --theme theme.yml
See bon docs dashboards.theming for palette names, color tokens, and examples.
Phase 6: View Live
Open the deployed dashboard in the browser:
bon dashboard open dashboard
Iteration
To update, edit the .md file and redeploy:
bon dashboard deploy dashboard.md
Each deploy increments the version. Use bon dashboard list to see all
deployed dashboards with their versions and URLs.
To remove a dashboard:
bon dashboard remove dashboard