一键导入
developing-in-lightdash
// Use when reading and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.
// Use when reading and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.
Apply the Lightdash frontend style guide when working on React components, migrating Mantine v6 to v8, or styling frontend code. Use when editing TSX files, fixing styling issues, or when user mentions Mantine, styling, or CSS modules.
Guide for Lightdash's CASL-based authorization system. Use when working with scopes, custom roles, abilities, permissions, ForbiddenError, authorization, or access control. Helps with adding new scopes, debugging permission issues, understanding the permission flow, and creating custom roles.
Use when working with Lightdash YAML files, dbt models with Lightdash metadata, the lightdash CLI (deploy, upload, download, preview, lint, sql, set-warehouse), or creating/editing charts, dashboards, metrics, and dimensions as code
Test and assess an open Renovate dependency-bump PR. Picks the first open Renovate PR, checks out the branch, starts the app, exercises code paths affected by the upgraded package, reviews the changelog and (if needed) the upstream source diff, and reports whether the bump is safe to merge. Use when asked to "test a renovate PR", "triage renovate", "assess a renovate bump", or "check a dependency upgrade".
Use this skill when writing, designing, or generating Slack messages for Lightdash's in-app analytics agent. Triggers when someone asks to create agent update messages, Slack digests, agent notifications, weekly summaries, daily summaries, or any Slack copy for the Lightdash project agent. Also use when asked to vary, refresh, or make agent messages more engaging. Always use this skill for any Lightdash agent Slack communication, even if the user just says "write an agent message" or "draft a Slack update for the agent".
Fix a Snyk vulnerability PR by regenerating the pnpm lockfile, checking changelogs for breaking changes, and posting findings as a PR comment. Use when asked to fix a vulnerability PR or handle a Snyk dependency upgrade.
| name | developing-in-lightdash |
| description | Use when reading and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration. |
Use this skill when working with Lightdash dashboards and charts.
Use content tools:
For reads, call readContent with:
type: "dashboard" or type: "chart"slug: "your-content-slug"This should return the current dashboard or chart JSON for the requested content.
For edits, call editContent with:
type: "dashboard" or type: "chart"slug: "your-content-slug"patch: [...]patch should describe the requested RFC6902 JSON edit.
readContent and inspect the current JSON shape.dashboard-reference resourceeditContent with that patch.readContent for the chart slug.Choosing the Right Chart Type below)editContent with that patch.discoverFields to explore available fields and plan your chartChoosing the Right Chart Type below) to understand required fields and configuration.createContent with that JSON to create the chart.dashboard-reference and dashboard-best-practices resourcesdiscoverFields to explore available fields and plan which charts to include.Rules:
| Mistake | Consequence | Prevention |
|---|---|---|
| Guessing filter values | Case mismatches like "Payment" vs "payment" can make a chart silently return no data | Verify exact values before editing filters. Do not guess string filter values |
| Not updating dashboard tiles after renaming a chart | Dashboard tile still shows the old title because tile title and chartName do not auto-update | If you change a chart's name or purpose, also update dashboard tiles that reference its chartSlug |
Including unused dimensions in metricQuery | Extra dimensions change grouping and can produce wrong numbers | Every dimension in metricQuery.dimensions must be used by the chart configuration |
Missing contentType | Content type becomes ambiguous | Always keep contentType: "chart" or contentType: "dashboard" |
Dashboard tiles have their own titles. A saved_chart tile's title and chartName are independent overrides and do not automatically change when a chart is renamed. If you change a chart from "Total Revenue" to "Gross Profit", update the dashboard tile too.
{
"tiles": [
{
"properties": {
"chartName": "Gross Profit",
"chartSlug": "total-revenue-kpi",
"title": "Gross Profit"
},
"type": "saved_chart"
}
]
}
All charts share a common base structure:
{
"chartConfig": {
"config": {},
"type": "<type>"
},
"contentType": "chart",
"dashboardSlug": "my-dashboard",
"metricQuery": {
"dimensions": ["my_explore_category"],
"exploreName": "my_explore",
"filters": {},
"limit": 500,
"metrics": ["my_explore_total_sales"],
"sorts": []
},
"name": "Chart Name",
"slug": "unique-chart-slug",
"spaceSlug": "target-space",
"tableConfig": {
"columnOrder": []
},
"tableName": "my_explore",
"version": 1
}
Use spaceSlug for shared charts. Add dashboardSlug to scope a chart to a specific dashboard.
| Data Pattern | Recommended Chart | Why |
|---|---|---|
| Trends over time | Line or area (cartesian) | Shows continuous change with time on the X-axis |
| Category comparisons | Bar (cartesian) | Easy visual comparison between discrete categories |
| Part-of-whole relationships | pie or treemap | Shows proportions or composition |
| Single KPI metric | big_number | Focuses attention on one important value |
| Conversion stages | funnel | Shows drop-off between sequential stages |
| Progress toward target | gauge | Shows current value relative to a goal |
| Geographic data | map | Places values on points or regions |
| Flow between categories | sankey | Shows how values move from source to target |
| Detailed records | table | Shows row-level or pivoted data clearly |
| Advanced custom needs | custom | Full Vega-Lite control |
| Type | Use Case | Resource |
|---|---|---|
cartesian | Bar, line, area, scatter | cartesian-chart-reference |
pie | Parts of whole | pie-chart-reference |
table | Data tables | table-chart-reference |
big_number | KPIs | big-number-chart-reference |
funnel | Conversion funnels | funnel-chart-reference |
gauge | Progress indicators | gauge-chart-reference |
treemap | Hierarchical composition | treemap-chart-reference |
map | Geographic data | map-chart-reference |
sankey | Flow diagrams | sankey-chart-reference |
custom | Vega-Lite | custom-viz-reference |
Start with:
dashboard-reference for dashboards
dashboard-best-practices for tips on effective dashboard designcartesian-chart-reference for bar, line, area, or scatter charts