developing-in-lightdash
/developing-in-lightdash
Czyta, tworzy i edytuje dashboardy i wykresy Lightdash jako JSON, w tym układ dashboardu i konfigurację specyficzną dla typu wykresu.
- Autor
- lightdash ↗
- Repozytorium
- lightdash ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 25.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 16
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Czyta, tworzy i edytuje dashboardy i wykresy Lightdash jako JSON, w tym układ dashboardu i konfigurację specyficzną dla typu wykresu.
Oryginalny opis (EN)
Use when reading, creating, and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.
Jak działa
- MCP tool names
- What You Can Do
- Common Mistakes
- Core Workflows
- Editing Charts
- Slug Fields
- Chart Types
- Choosing the Right Chart Type
- Resources
Podgląd SKILL.md
---
name: developing-in-lightdash
description: Use when reading, creating, and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.
---
# Developing in Lightdash
For in-process agents and MCP clients working with JSON content tools; Autopilot reuses the chart references with its own workflow.
Use this skill when working with Lightdash dashboards and charts.
## MCP tool names
This skill is shared with Lightdash's native agent, so its workflows use camelCase tool names. When reading it through MCP:
- Use `read_content`, `edit_content`, and `create_content` for `readContent`, `editContent`, and `createContent`.
- Use `grep_fields` and `get_metadata` for native `grepFields` and `getMetadata`.
- Use `generate_hashes` for native `generateHashes`.
- Replace `runContentQuery` with `run_metric_query` to validate a chart's governed semantic-layer `metricQuery`. Do not use `run_sql` for this validation.
- Use `run_sql` where a workflow runs `runContentQuery` with `source.type: "sql"` or `chartType: "sql_chart"`; for a saved SQL chart, pass the `sql` from `read_content`.
## What You Can Do
| Task | Tools/Action | References |
| ----------------------------- | --------------------------------------------------------------- | ------------------------------------- |
| Read dashboards and charts | `readContent` | `dashboard-reference`, chart refs |
| Create, read, edit SQL charts | `createContent` / `readContent` / `editContent`, `sql_chart` | `sql-chart-reference` |
| Read data apps (read-only) | `readContent` with `type: data_app` | manifest-shaped JSON, no source code |
| Edit dashboards | `editContent` with RFC6902 JSON Patch | `dashboard-reference` |
| Edit charts and tiles | `editContent`, then update referencing dashboards if needed | Chart refs, `dashboard-reference` |
| Create charts | `grepFields`, `getMetadata`, `runContentQuery`, `createContent` | Chart refs |
| Create dashboards | `grepFields`, `getMetadata`, `createContent` | `dashboard-reference`, best practices |
| Add period comparisons | Edit chart `metricQuery` and config | `period-over-period-reference` |
| Verify changed metric queries | `runContentQuery` with `source.type: "metricQuery"` | Chart refs |
Rules:
- Always read content before editing if you have not read it since the last user message.
- Preserve unrelated fields.
- Prefer minimal patches.
- Follow the dashboard or chart shape from the resource instead of inventing structure.
- When you create or edit content, please provide links for them in the final response
## Common Mistakes
| 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 |
| **Leaving invalid touched tile positions** | Edited tiles overlap, sit outside the 36-column grid, or leave unintended gaps | Validate touched tiles against `dashboard-reference` grid layout rules after tile actions |
| **Missing `contentType`** | Content type becomes ambiguous | Always keep `contentType: "chart"` or `contentType: "dashboard"` |
## Core Workflows
### Edit Dashboards
1. Call `readContent` and inspect the current JSON shape.
2. Always read the `dashboard-reference` resource.
3. Build the smallest possible JSON Patch.
4. Call `editContent` with that patch.
5. Re-read if needed to verify the final state.
To add or retarget a dashboard filter, take each tile's explore and field ids from its read-only `chartQuery` in the dashboard JSON (see `Per-Tile Filter Targeting` in `dashboard-reference`). Do not read every chart on the dashboard for that. A dimension filter is added to `/filters/dimensions` with this shape; `target` and `tileTargets` values are objects with `fieldId` and `tableName`, never bare field id strings:
```json
{
"label": "Order date",
"operator": "inThePast",
"settings": { "completed": false, "unitOfTime": "days" },
"values": [90],
"target": { "fieldId": "orders_order_date_day", "tableName": "orders" },
"tileTargets": {
"events-per-day": {
"fieldId": "events_date_day",
"tableName": "events"
}
}
}
```
### Edit Charts and Dashboard Tiles
1. Call `readContent` for the chart slug.
2. Always read the chart reference for chart type (see `Choosing the Right Chart Type` below).
3. If you add or change filters, verify exact filter values before patching.
4. If you change the chart's name or purpose, also update dashboards that reference that chart.
5. Build the smallest possible JSON Patch.
6. If you changed the chart's `metricQuery`, call `runContentQuery` with `source.type: "metricQuery"` and the edited chart's `tableName`/`metricQuery`.
7. Call `editContent` with that patch.
8. Re-read if needed to verify the final state.
### Create Charts
1. Use `grepFields`, then `getMetadata`, to explore available fields and plan your chart.
2. Always read the chart reference for chart type (see `Choosing the Right Chart Type` below) to understand required fields and configuration.
3. Build the full chart JSON with that metric query and other required fields.
4. Call `runContentQuery` with `source.type: "metricQuery"` and the chart's `tableName`/`metricQuery`.
5. Call `createContent` with the verified chart JSON.
### Create Dashboards
1. Always read the `dashboard-reference` and `dashboard-best-practices` resources.
2. Explore existing dashboards and charts to find reusable content and inspiration for layout and design.
3. Use `grepFields`, then `getMetadata`, to explore available fields and plan which charts to include.
4. Create an empty dashboard shell first.
5. Start building charts and adding them to the dashboard one by one, using the workflow above for creating charts.
### Create and Edit SQL Charts
Use SQL charts only when the semantic layer cannot express the question. Always read `sql-chart-reference` first. A dashboard of SQL charts references their persisted slugs in `sql_chart` tiles.
To edit a SQL chart, read it, then patch it with `editContent` (`type: sql_chart`).
## Editing Charts
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.
```json
{
"tiles": [
{
"properties": {
"chartName": "Gross Profit",
"chartSlug": "total-revenue-kpi",
"title": "Gross Profit"
},
"type": "saved_chart"
}
]
}
```
## Slug Fields
`slug` is a read-only stable identifier.
### Dashboards
- `spaceSlug` is the dashboard's space path. Changing it moves the dashboard to another space.
- Dashboard tile `properties.chartSlug` references an existing reusable or dashboard-owned chart.
### Charts
Charts are either reusable space charts or dashboard-owned charts.
- Reusable chart: no `dashboardSlug`; `spaceSlug` is its space path and changing it moves the chart.
- Dashboard-owned chart: has `dashboardSlug`; both `dashboardSlug` and `spaceSlug` are read-only, and `spaceSlug` is the owning dashboard's space.
## Chart Types
All charts share a common base structure:
```json
{
"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
}
```
Spaces can be nested. Use `parent/child` syntax in `spaceSlug` for sub-spaces, for example `"sales/forecasts"`. A bare slug like `"sales-forecasts"` is a flat top-level space; the slash defines the hierarchy.
## Choosing the Right Chart Type
| 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` |
For period comparisons, read `period-over-period-reference` in addition to the chart type reference.
## Resources
### Charts
- `cartesian-chart-reference` - Bar, line, area, scatter
- `pie-chart-reference` - Parts of whole
- `table-chart-reference` - Data tables
- `big-number-chart-reference` - KPIs
- `funnel-chart-reference` - Conversion funnels
- `gauge-chart-reference` - Progress indicators
- `treemap-chart-reference` - Hierarchical composition
- `map-chart-reference` - Geographic data
- `sankey-chart-reference` - Flow diagrams
- `custom-viz-reference` - Vega-Lite
- `period-over-period-reference` - PoP comparisons
- `sql-chart-reference` - Charts saved from raw warehouse SQL, their approval step, and dashboards built from them
- `field-formatting-reference` - Chart-level field formatting overrides for metrics and dimensions
### Dashboards
- `dashboard-reference` - Dashboard structure, layout, tabs, tiles, and filters
- `dashboard-best-practices` - Dashboard design guidance
Pliki w paczce (16)
- SKILL.md 13 KB
- resources/big-number-chart-reference.md 7 KB
- resources/cartesian-chart-reference.md 18 KB
- resources/custom-viz-reference.md 5 KB
- resources/dashboard-best-practices.md 14 KB
- resources/dashboard-reference.md 25 KB
- resources/field-formatting-reference.md 5 KB
- resources/funnel-chart-reference.md 6 KB
- resources/gauge-chart-reference.md 6 KB
- resources/map-chart-reference.md 14 KB
- resources/period-over-period-reference.md 11 KB
- resources/pie-chart-reference.md 7 KB
- resources/sankey-chart-reference.md 8 KB
- resources/sql-chart-reference.md 8 KB
- resources/table-chart-reference.md 15 KB
- resources/treemap-chart-reference.md 7 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · lightdash/lightdash | 100 | MIT |
| lightdash/lightdash | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 2eff6ef361c1 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100developing-chart-types-locally
Pomaga edytować lokalnie utworzony lub pobrany własny typ wykresu Lightdash (data_app_viz): kontrakt vizSchema i komponentu, pętla wgrywania i weryfikacji, lokalny podgląd i droga do oficjalnego rejestru. - 90developing-data-apps-locally
Wyjaśnia lokalną edycję, budowanie i wysyłanie aplikacji danych Lightdash utworzonych lub pobranych lokalnie oraz wskazuje, co jest tylko do odczytu. - 90preset-dashboards
Przegląda dashboardy, wykresy, zrzuty ekranu i dane wykresów w przestrzeni Preset przez bezpośrednie wywołania API Superset. - 100simulator-charts
Tworzy i konfiguruje wykresy oraz dashboardy w Simulator.Company na grafie, np. liniowe, słupkowe i kołowe, z danymi kont. - 100dashboard-designer
Projektuje dashboard danych: dobiera KPI, układ i hierarchię wizualną oraz narzędzie BI, na przykład dla dashboardu KPI lub monitoringu. - 90preset-mcp-dashboard
Przegląda, tworzy i uzupełnia dashboardy w Superset przez narzędzia MCP, dodając do nich wykresy.