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
For CLI users and writeback sandboxes working with YAML and dbt files.
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)
- Creating, downloading, editing, or uploading custom chart types built in Chart Studio (enterprise)
- Creating, editing, migrating, downloading, or uploading organization Data App themes
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 |
| Build or edit a custom chart type (enterprise) | lightdash apps create "<name>" --chart-type or lightdash download --chart-types <ref>, edit chart-types/<slug>/src/, lightdash upload --chart-types <ref> | Custom Chart Types |
| Manage organization Data App themes as code | lightdash download --organization, edit themes/<slug>/, lightdash upload --organization | Data App Themes |
| 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 the developing-data-apps-locally and lightdash-data-app skills — read them before editing files in an app folder (see Data Apps) |
Building a reusable chart as a Vega-Lite custom chart | The visualization lives inside one saved chart and can't be reused or picked from the explorer's chart type picker | For a new reusable visualization, build a custom chart type (see Custom Chart Types). Use Vega-Lite only for existing chartConfig.type: custom charts or when the project has no custom chart types (enterprise) |
| Editing a chart type without reading its bundled skills | The component queries or fetches data itself, or its vizSchema drifts from what src/ reads, so the chart type breaks or never appears in the chart type picker | Every chart type folder ships AGENTS.md plus the reusable-visualization and developing-chart-types-locally skills — read all three before editing files in chart-types/<slug>/ |
| Inventing a theme-only CLI command or treating a missing folder as deletion | The command does not exist, or a supposedly deleted remote theme returns on the next download | Use organization download/upload, and read Data App Themes before changing themes/ |
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, custom chart types, organization themes, 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.
For any task that creates, edits, migrates, downloads, uploads, or tests an organization Data App theme, always read and follow Data App Themes before touching themes/. Theme packages are strict multi-file resources, organization upload has no theme-only mode, and lightdash lint does not validate them.
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 Postgre
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 | 2mo | Review | Intermediate |
| reconciliation | 30 | 6mo | No flags | Intermediate |
| sql-queries | 18 | 6mo | No flags | Intermediate |
| senior-data-engineer | 21 | 9mo | 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.