Source profileQuality 87/100Review permissions

lightdash/lightdash/skills/developing-in-lightdash/SKILL.md

developing-in-lightdash

Use when working with Lightdash YAML files, dbt models with Lightdash metadata, the lightdash CLI (deploy, upload, download, preview, lint, warehouse-catalog, sql, set-warehouse), or managing charts, dashboards, spaces and access, AI agents, scheduled content, data-app external connections, users, groups, custom roles, metrics, and dimensions as code

Source repository stars
6,010
Declared platforms
0
Static risk flags
2
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Build and deploy Lightdash analytics projects. This skill covers the semantic layer (metrics, dimensions, joins) and content (charts, dashboards).

Best for

  • Working with Lightdash YAML files (charts, dashboards, models as code)
  • Using the lightdash CLI (deploy, upload, download, preview, lint, warehouse-catalog, sql)
  • Defining metrics, dimensions, joins, or tables in dbt or pure Lightdash projects

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/lightdash/lightdash --skill "skills/developing-in-lightdash"
Safe inspection promptEditorial

Inspect the Agent Skill "developing-in-lightdash" from https://github.com/lightdash/lightdash/blob/086e216d65653d5fb1898d2c4cafff4ec15e3ad4/skills/developing-in-lightdash/SKILL.md at commit 086e216d65653d5fb1898d2c4cafff4ec15e3ad4. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow Patterns

    See Workflows Reference for detailed examples and CI/CD configurations.

    See Workflows Reference for detailed examples and CI/CD configurations.
  2. 02

    When to Use

    Don't use for: Developing the Lightdash application itself (use the codebase CLAUDE.md), general dbt work without Lightdash metadata, or raw SQL unrelated to Lightdash models.

    Working with Lightdash YAML files (charts, dashboards, models as code)Using the lightdash CLI (deploy, upload, download, preview, lint, warehouse-catalog, sql)Defining metrics, dimensions, joins, or tables in dbt or pure Lightdash projects
  3. 03

    What You Can Do

    Review the “What You Can Do” section in the pinned source before continuing.

    Review and apply the “What You Can Do” source section.
  4. 04

    Common Mistakes

    Review the “Common Mistakes” section in the pinned source before continuing.

    Review and apply the “Common Mistakes” source section.
  5. 05

    Before You Start

    When a task uses lightdash download or lightdash upload, especially for bulk edits, spaces and access, scheduled content, AI agents, external connections, users, groups, or custom roles, read and follow Content as Code first. Project and organization content require separate com…

    When a task uses lightdash download or lightdash upload, especially for bulk edits, spaces and access, scheduled content, AI agents, external connections, users, groups, or custom roles, read and follow Content as Code…Always verify which project you're deploying to. Deploying to the wrong project can overwrite production content.The YAML syntax differs significantly between project types.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 21

The documentation asks the agent to run terminal commands or scripts.

| Explore data warehouse values | `lightdash sql` to execute raw sql, read .csv results | [CLI Reference](./resources/cli-reference.md) |

Writes files

medium · line 172

The documentation asks the agent to create, modify, or delete local files.

**Edit** the YAML file in `lightdash/` directory

Writes files

medium · line 193

The documentation asks the agent to create, modify, or delete local files.

**Edit** the YAML file in `lightdash/` directory

Runs scripts

medium · line 214

The documentation asks the agent to run terminal commands or scripts.

# Make changes and iterate

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score87/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars6,010SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
lightdash/lightdash
Skill path
skills/developing-in-lightdash/SKILL.md
Commit
086e216d65653d5fb1898d2c4cafff4ec15e3ad4
License
NOASSERTION
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Developing in Lightdash

Build and deploy Lightdash analytics projects. This skill covers the semantic layer (metrics, dimensions, joins) and content (charts, dashboards).

When to Use

  • Working with Lightdash YAML files (charts, dashboards, models as code)
  • Using the lightdash CLI (deploy, upload, download, preview, lint, warehouse-catalog, sql)
  • Defining metrics, dimensions, joins, or tables in dbt or pure Lightdash projects
  • Creating or editing charts and dashboards as code

Don't use for: Developing the Lightdash application itself (use the codebase CLAUDE.md), general dbt work without Lightdash metadata, or raw SQL unrelated to Lightdash models.

What You Can Do

TaskCommandsReferences
Create a pure Lightdash project from warehouse metadataUse Lightdash or an already-authenticated warehouse CLI to inspect catalog metadata and aggregate profilesCreating from a Warehouse Catalog
Discover warehouse tables and fieldslightdash warehouse-catalog --jsonCLI Reference
Explore data warehouse valueslightdash sql to execute raw sql, read .csv resultsCLI Reference
Define metrics & dimensionsEdit dbt YAML or Lightdash YAMLMetrics, Dimensions
Create chartslightdash download, edit YAML, lightdash uploadChart Types
Add period comparisonsAdd PoP additional metrics to chart YAMLPeriod over Period
Build dashboardslightdash download, edit YAML, lightdash uploadDashboard Reference
Manage content as code across project and organization resourceslightdash download, lightdash uploadContent as Code
Manage data-app external connections (enterprise)lightdash download --include-external-connections, edit YAML, lightdash uploadContent as Code
Lint yaml fileslightdash lintCLI Reference
Set warehouse connectionlightdash set-warehouse from profiles.ymlCLI Reference
Deploy changeslightdash deploy (semantic layer), lightdash upload (content)CLI Reference
Test changeslightdash previewWorkflows

Common Mistakes

MistakeConsequencePrevention
Guessing filter valuesCase mismatches ('Payment' vs 'payment') cause charts to silently return no dataAlways run lightdash sql "SELECT DISTINCT column FROM table LIMIT 50" -o values.csv and use exact values
Not updating dashboard tiles after renaming a chartDashboard tile still shows old title — title and chartName are independent overrides that do NOT auto-updateDownload the dashboard, find tiles with matching chartSlug, update title and chartName to match
Including unused dimensions in metricQuery"Results may be incorrect" warning — extra dimensions change SQL grouping and produce wrong numbersEvery dimension in metricQuery.dimensions must appear in the chart config. For cartesian: layout.xField, layout.yField, or pivotConfig.columns
Unsorted YAML keyslightdash upload warns "unsorted YAML keys" and diffs become noisyAlways sort keys alphabetically at every nesting level — the CLI writes with sortKeys: true
Deploying to wrong projectOverwrites production contentAlways run lightdash config get-project before deploying
Missing contentType fieldContent type can't be determined without relying on directory structureAlways include contentType: chart, contentType: dashboard, or contentType: sql_chart at the top level

Before You Start

When a task uses lightdash download or lightdash upload, especially for bulk edits, spaces and access, scheduled content, AI agents, external connections, users, groups, or custom roles, read and follow Content as Code first. Project and organization content require separate commands, and a default download is not a complete snapshot.

Check Your Target Project

Always verify which project you're deploying to. Deploying to the wrong project can overwrite production content.

lightdash config get-project        # Show current project
lightdash config list-projects      # List available projects
lightdash config set-project --name "My Project"  # Switch project

Detect Your Project Type

The YAML syntax differs significantly between project types.

TypeDetectionKey Difference
dbt ProjectHas dbt_project.ymlMetadata nested under meta:
dbt Fusion / dbt 1.10+Has dbt_project.yml, uses dbt Fusion or dbt >= 1.10Metadata nested under config: meta:
Pure LightdashHas lightdash.config.yml, no dbtTop-level properties
ls dbt_project.yml 2>/dev/null && echo "dbt project" || echo "Not dbt"
ls lightdash.config.yml 2>/dev/null && echo "Pure Lightdash" || echo "Not pure Lightdash"

dbt Fusion / dbt 1.10+: Lightdash metadata must be nested under config: meta: instead of meta:. The properties are identical — only the nesting changes. Example:

models:
  - name: orders
    config:
      meta:
        metrics:
          total_revenue:
            type: sum
            sql: "${TABLE}.amount"

Syntax Comparison

dbt YAML (metadata under meta:):

models:
  - name: orders
    meta:
      metrics:
        total_revenue:
          type: sum
          sql: "${TABLE}.amount"
    columns:
      - name: status
        meta:
          dimension:
            type: string

Pure Lightdash YAML (top-level):

type: model
name: orders
sql_from: 'DB.SCHEMA.ORDERS'

metrics:
  total_revenue:
    type: sum
    sql: ${TABLE}.amount

dimensions:
  - name: status
    sql: ${TABLE}.STATUS
    type: string

Setting Up Warehouse Connection

If the project needs a different warehouse connection (e.g., switching from Postgres to BigQuery), update it from your profiles.yml:

lightdash set-warehouse --project-dir ./dbt --profiles-dir ./profiles --assume-yes

This reads credentials from profiles.yml, updates the warehouse connection on the currently selected project, and triggers a recompile. Run this before lightdash deploy.

To target a specific project:

lightdash set-warehouse --project-dir ./dbt --profiles-dir ./profiles --project <uuid> --assume-yes

Core Workflows

Verify Filter Values Before Using Them

CRITICAL: Never guess filter values. Case mismatches (e.g., 'Payment' vs 'payment') cause charts to silently return no data.

Filters are case-sensitive by default. The case_sensitive key can override this in order of priority:

  • Dimension metadata
  • Model/explore metadata
  • lightdash.config.yml defaults.case_sensitive

Before writing any string filter, query actual values from the warehouse:

lightdash sql "SELECT DISTINCT category FROM payments LIMIT 50" -o category_values.csv

Read the CSV and use the exact values in your filter YAML. This applies to all equals/notEquals filters with string values — in charts and dashboards.

Editing Metrics & Dimensions

  1. Find the model YAML file (dbt: models/*.yml, pure Lightdash: lightdash/models/*.yml)
  2. Edit metrics/dimensions using the appropriate syntax for your project type
  3. Validate: lightdash lint (pure Lightdash) or dbt compile (dbt projects)
  4. Deploy: lightdash deploy

See Metrics Reference and Dimensions Reference for configuration options.

Creating a Pure Lightdash Project from a Warehouse Catalog

When the prepared project has no usable dbt project and the task is to bootstrap a semantic layer from warehouse metadata, always read and follow Creating from a Warehouse Catalog before inspecting data or writing YAML. This applies whether warehouse access comes from the selected Lightdash project or an already-authenticated warehouse CLI such as Snowflake CLI or bq. Do not use that workflow when an existing dbt semantic layer can be extended.

Editing Charts

  1. Download: lightdash download --charts chart-slug
  2. Edit the YAML file in lightdash/ directory
  3. Verify filter values: If you added or changed filters, use lightdash sql to check actual column values (see Common Mistakes)
  4. Update dashboard tiles: If you changed the chart's name or purpose, download any dashboards that reference it and update their tile title and chartName properties to match (see Common Mistakes)
  5. Lint: lightdash lint to validate before uploading
  6. Upload: lightdash upload --charts chart-slug (and any modified dashboards)

Dashboard tiles have their own titles. A saved_chart tile's title and chartName properties are independent overrides — they do NOT auto-update when you rename the chart. If you change a chart from "Total Revenue" to "Gross Profit" but don't update the dashboard tile, the dashboard will still display "Total Revenue". Always download the dashboard, find tiles with matching chartSlug, and update their title and chartName to match.

# Dashboard tile — title and chartName must be updated manually when chart changes
tiles:
  - type: saved_chart
    properties:
      chartSlug: total-revenue-kpi
      title: "Gross Profit"        # ← Update this when chart name/purpose changes
      chartName: "Gross Profit"    # ← Update this too

Editing Dashboards

  1. Download: lightdash download --dashboards dashboard-slug
  2. Edit the YAML file in lightdash/ directory
  3. Verify filter values: If you added or changed filters, use lightdash sql to check actual column values (see Common Mistakes)
  4. Lint: lightdash lint to validate before uploading
  5. Upload: lightdash upload --dashboards dashboard-slug

Creating New Content

Charts and dashboards are typically created in the UI first, then managed as code:

  1. Create in UI
  2. lightdash download to pull as YAML
  3. Edit and version control
  4. lightdash lint to validate before uploading
  5. lightdash upload to sync changes

Testing with Preview

For larger changes, test in isolation:

lightdash preview --name "my-feature"
# Make changes and iterate
lightdash stop-preview --name "my-feature"

CLI Quick Reference

CommandPurpose
lightdash deploySync semantic layer (metrics, dimensions)
lightdash uploadUpload charts/dashboards
lightdash downloadDownload charts/dashboards as YAML
lightdash lintValidate YAML locally
lightdash previewCreate temporary test project
lightdash warehouse-catalog --jsonDiscover raw warehouse tables
lightdash sql "..." -o file.csvRun SQL queries against warehouse
lightdash run-chart -p chart.ymlExecute chart YAML query against warehouse

See CLI Reference for full command documentation.

Semantic Layer

The semantic layer defines your data model. See individual references for full configuration:

Chart Types

All charts share a common base structure:

chartConfig:
  config: {}        # Type-specific — see individual references
  type: <type>
contentType: chart              # Required: chart, dashboard, or sql_chart
dashboardSlug: my-dashboard  # Optional: scopes chart to dashboard (won't appear in space)
metricQuery:
  dimensions:
    - my_explore_category
  exploreName: my_explore     # Required: which explore to query
  filters: {}
  limit: 500
  metrics:
    - my_explore_total_sales
  sorts: []
name: "Chart Name"
slug: unique-chart-slug
spaceSlug: target-space
tableConfig:
  columnOrder: []
tableName: my_explore           # Required: top-level explore/table name
version: 1

Key ordering: All YAML keys must be sorted alphabetically at every nesting level. The CLI writes files with sortKeys: true and warns on upload if keys are unsorted. When writing or editing YAML by hand, keep keys in alphabetical order to avoid warnings and noisy diffs.

Chart scoping: Use spaceSlug only for shared charts. Add dashboardSlug to scope a chart to a specific dashboard (it won't appear in the space).

Nested spaces: Spaces can be nested. In YAML, spaceSlug uses parent/child syntax to address a sub-space — the / denotes hierarchy. Examples:

spaceSlug: sales              # Top-level space "sales"
spaceSlug: sales/maps         # Sub-space "maps" inside "sales"
spaceSlug: sales/eu/forecasts # Deeper nesting works the same way

Each path segment must be the slug of an existing (or to-be-created) space at that level. A bare slug like sales-maps is a flat top-level space, NOT a sub-space — the slash is the only thing that creates the hierarchy.

Choosing the Right Chart Type

Data PatternRecommended ChartWhy
Trends over timeLine or area (cartesian)Shows continuous change with time on X-axis
Category comparisonsBar (cartesian)Easy visual comparison between discrete categories
Part-of-whole relationshipspie or treemapShows proportions summing to 100%
Single KPI metricbig_numberFocuses attention on one important value
Conversion stagesfunnelVisualizes drop-off between sequential steps
Progress toward targetgaugeShows current value relative to goal
Geographic datamapPlots data points or regions on a map
Flow between categoriessankeyShows how values move from source to target nodes
Detailed recordstableDisplays raw data with sorting and formatting
Advanced custom needscustomFull Vega-Lite spec for custom visualizations
TypeUse CaseReference
cartesianBar, line, area, scatterCartesian
pieParts of wholePie
tableData tablesTable
big_numberKPIsBig Number
funnelConversion funnelsFunnel
gaugeProgress indicatorsGauge
treemapHierarchical dataTreemap
mapGeographic dataMap
sankeyFlow diagramsSankey
customVega-LiteCustom Viz

Dashboards

Dashboards arrange charts and content in a grid layout. See Dashboard Reference for YAML structure, tile types, tabs, and filters.

Exploring the Warehouse

Use lightdash sql to explore data when building models:

# Preview table structure
lightdash sql "SELECT * FROM orders LIMIT 5" -o preview.csv

# Check distinct values for a dimension
lightdash sql "SELECT DISTINCT status FROM orders" -o statuses.csv

# Test metric calculations
lightdash sql "SELECT SUM(amount) FROM orders" -o test.csv

Workflow Patterns

PatternWhen to Use
Direct (deploy + upload)Solo dev, rapid iteration
Preview-FirstTeam, complex changes
CI/CDAutomated on merge

See Workflows Reference for detailed examples and CI/CD configurations.

Resources

Semantic Layer

Charts

Dashboards & Workflows

External

Alternatives

Compare before choosing