developing-in-lightdash
Build, deploy, and lint Lightdash projects. Manage metrics, dimensions, charts, and dashboards using the Lightdash CLI.
Install
mkdir -p .claude/skills/developing-in-lightdash && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3298" && unzip -o skill.zip -d .claude/skills/developing-in-lightdash && rm skill.zipInstalls to .claude/skills/developing-in-lightdash
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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, users, groups, custom roles, metrics, and dimensions as codeKey capabilities
- →Define metrics and dimensions in dbt or YAML
- →Deploy analytics dashboards via CLI
- →Lint Lightdash YAML configuration files
- →Preview changes before deployment
- →Inspect warehouse catalog metadata
How it works
The tool uses the Lightdash CLI to parse project metadata and synchronize semantic layer definitions and dashboard content with the Lightdash server.
Inputs & outputs
When to use developing-in-lightdash
- →Create metrics and dimensions
- →Lint Lightdash YAML files
- →Deploy analytics dashboards
- →Explore warehouse catalog via CLI
About this skill
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
lightdashCLI (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
- Downloading, uploading, or locally developing data apps (enterprise)
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
| Task | Commands | References |
|---|---|---|
| Create a pure Lightdash project from warehouse metadata | Use Lightdash or an already-authenticated warehouse CLI to inspect catalog metadata and aggregate profiles | Creating from a Warehouse Catalog |
| Discover warehouse tables and fields | lightdash warehouse-catalog --json | CLI Reference |
| Explore data warehouse values | lightdash sql to execute raw sql, read .csv results | CLI Reference |
| Define metrics & dimensions | Edit dbt YAML or Lightdash YAML | Metrics, Dimensions |
| Create charts | lightdash download, edit YAML, lightdash upload | Chart Types |
| Add period comparisons | Add PoP additional metrics to chart YAML | Period over Period |
| Build dashboards | lightdash download, edit YAML, lightdash upload | Dashboard Reference |
| Manage content as code across project and organization resources | lightdash download, lightdash upload | Content as Code |
| Manage data apps as code (enterprise) | lightdash download --apps <ref> (one app) or --include-apps (all), edit bundle, lightdash upload --apps <ref>; local dev via lightdash apps create/preview/validate | Data Apps, Content as Code |
| Manage data-app external connections (enterprise) | lightdash download --include-external-connections, edit YAML, lightdash upload | Content as Code |
| Lint yaml files | lightdash lint | CLI Reference |
| Set warehouse connection | lightdash set-warehouse from profiles.yml | CLI Reference |
| Deploy changes | lightdash deploy (semantic layer), lightdash upload (content) | CLI Reference |
| Test changes | lightdash preview | Workflows |
Common Mistakes
| Mistake | Consequence | Prevention |
|---|---|---|
| Guessing filter values | Case mismatches ('Payment' vs 'payment') cause charts to silently return no data | Always run lightdash sql "SELECT DISTINCT column FROM table LIMIT 50" -o values.csv and use exact values |
| Not updating dashboard tiles after renaming a chart | Dashboard tile still shows old title — title and chartName are independent overrides that do NOT auto-update | Download 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 numbers | Every dimension in metricQuery.dimensions must appear in the chart config. For cartesian: layout.xField, layout.yField, or pivotConfig.columns |
| Unsorted YAML keys | lightdash upload warns "unsorted YAML keys" and diffs become noisy | Always sort keys alphabetically at every nesting level — the CLI writes with sortKeys: true |
| Deploying to wrong project | Overwrites production content | Always run lightdash config get-project before deploying |
Missing contentType field | Content type can't be determined without relying on directory structure | Always include contentType: chart, contentType: dashboard, or contentType: sql_chart at the top level |
Adding --include-apps to an --apps <ref> selection | --include-apps always requests ALL project apps (capped at 50), so the command downloads every app plus the ref — not just the one app | --apps <ref> alone downloads/uploads only that app (by slug, app URL, or UUID). Use --include-apps only when you want every app |
| Editing a data app without reading its bundled skills | App code violates the SDK-only data access and dependency boundaries (direct fetch, pnpm add, vendored libraries) and the upload rejects or the app breaks when deployed | Every app bundle ships .claude/skills/developing-data-apps-locally and .claude/skills/lightdash-data-app — read them before editing files in an app folder (see Data Apps) |
Before You Start
When a task uses lightdash download or lightdash upload, especially for bulk edits, spaces and access, scheduled content, AI agents, data apps, 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.
| Type | Detection | Key Difference |
|---|---|---|
| dbt Project | Has dbt_project.yml | Metadata nested under meta: |
| dbt Fusion / dbt 1.10+ | Has dbt_project.yml, uses dbt Fusion or dbt >= 1.10 | Metadata nested under config: meta: |
| Pure Lightdash | Has lightdash.config.yml, no dbt | Top-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 ofmeta:. 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.ymldefaults.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
- Find the model YAML file (dbt:
models/*.yml, pure Lightdash:lightdash/models/*.yml) - Edit metrics/dimensions using the appropriate syntax for your project type
- Validate:
lightdash lint(pure Lightdash) ordbt compile(dbt projects) - 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
- Download: `lig
Content truncated.
When not to use it
- →Developing the Lightdash application codebase
- →General dbt work without Lightdash metadata
- →Raw SQL unrelated to Lightdash models
Prerequisites
Limitations
- →Requires manual sorting of YAML keys to prevent noisy diffs
- →Dashboard tiles do not auto-update when chart names change
- →Requires explicit contentType field for content identification
How it compares
Unlike manual UI-based configuration, this approach treats analytics definitions as version-controlled code.
Compared to similar skills
developing-in-lightdash side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| developing-in-lightdash (this skill) | 1 | 25d | Review | Intermediate |
| reconciliation | 30 | 5mo | No flags | Intermediate |
| sql-queries | 18 | 5mo | No flags | Intermediate |
| senior-data-engineer | 21 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by lightdash
View all by lightdash →You might also like
reconciliation
anthropics
Reconcile accounts by comparing GL balances to subledgers, bank statements, or third-party data. Use when performing bank reconciliations, GL-to-subledger recs, intercompany reconciliations, or identifying and categorizing reconciling items.
sql-queries
anthropics
Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.). Use when writing queries, optimizing slow SQL, translating between dialects, or building complex analytical queries with CTEs, window functions, or aggregations.
senior-data-engineer
davila7
World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, and data infrastructure. Expertise in Python, SQL, Spark, Airflow, dbt, Kafka, and modern data stack. Includes data modeling, pipeline orchestration, data quality, and DataOps. Use when designing data architectures, building data pipelines, optimizing data workflows, or implementing data governance.
dbt-transformation-patterns
wshobson
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
powerbi-modeling
github
Power BI semantic modeling assistant for building optimized data models. Use when working with Power BI semantic models, creating measures, designing star schemas, configuring relationships, implementing RLS, or optimizing model performance. Triggers on queries about DAX calculations, table relationships, dimension/fact table design, naming conventions, model documentation, cardinality, cross-filter direction, calculation groups, and data model best practices. Always connects to the active model first using power-bi-modeling MCP tools to understand the data structure before providing guidance.
senior-data-scientist
davila7
World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics. Expertise in Python (NumPy, Pandas, Scikit-learn), R, SQL, statistical methods, A/B testing, time series, and business intelligence. Includes experiment design, feature engineering, model evaluation, and stakeholder communication. Use when designing experiments, building predictive models, performing causal analysis, or driving data-driven decisions.