developing-in-lightdash
Build, configure, and deploy Lightdash analytics projects. Supports both dbt projects with embedded Lightdash metadata and pure Lightdash YAML projects without dbt. Create metrics, dimensions, charts, and dashboards using the Lightdash CLI.
Install
mkdir -p .claude/skills/developing-in-lightdash && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3298" && unzip -o skill.zip -d .claude/skills/developing-in-lightdash && rm skill.zipInstalls to .claude/skills/developing-in-lightdash
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,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
| Task | Commands | References |
|---|---|---|
| Explore data warehouse | 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 |
| Build dashboards | lightdash download, edit YAML, lightdash upload | Dashboard Reference |
| 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 |
| 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 |
Before You Start
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: |
| 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"
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.
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.
Editing Charts
- Download:
lightdash download --charts chart-slug - Edit the YAML file in
lightdash/directory - Verify filter values: If you added or changed filters, use
lightdash sqlto check actual column values (see Common Mistakes) - Update dashboard tiles: If you changed the chart's name or purpose, download any dashboards that reference it and update their tile
titleandchartNameproperties to match (see Common Mistakes) - Lint:
lightdash lintto validate before uploading - 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
- Download:
lightdash download --dashboards dashboard-slug - Edit the YAML file in
lightdash/directory - Verify filter values: If you added or changed filters, use
lightdash sqlto check actual column values (see Common Mistakes) - Lint:
lightdash lintto validate before uploading - Upload:
lightdash upload --dashboards dashboard-slug
Creating New Content
Charts and dashboards are typically created in the UI first, then managed as code:
- Create in UI
lightdash downloadto pull as YAML- Edit and version control
lightdash lintto validate before uploadinglightdash uploadto 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
| Command | Purpose |
|---|---|
lightdash deploy | Sync semantic layer (metrics, dimensions) |
lightdash upload | Upload charts/dashboards |
lightdash download | Download charts/dashboards as YAML |
lightdash lint | Validate YAML locally |
lightdash preview | Create temporary test project |
lightdash sql "..." -o file.csv | Run SQL queries against warehouse |
lightdash run-chart -p chart.yml | Execute 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:
- Tables Reference — queryable entities, labels, joins
- Metrics Reference — aggregated calculations (
count,sum,average,min,max,number, etc.) - Dimensions Reference — attributes for grouping/filtering (
string,number,boolean,date,timestamp) - Joins Reference — cross-table relationships
Chart Types
All charts share a common base structure:
contentType: chart # Required: chart, dashboard, or sql_chart
chartConfig:
type: <type>
config: {} # Type-specific — see individual references
dashboardSlug: my-dashboard # Optional: scopes chart to dashboard (won't appear in space)
metricQuery:
exploreName: my_explore # Required: which explore to query
dimensions:
- my_explore_category
filters: {}
limit: 500
metrics:
- my_explore_total_sales
sorts: []
name: "C
---
*Content truncated.*
More by lightdash
View all skills by lightdash →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversXcodeBuild streamlines iOS app development for Apple developers with tools for building, debugging, and deploying iOS an
Explore official Google BigQuery MCP servers. Find resources and examples to build context-aware apps in Google's ecosys
dbt bridges data build tool resources and natural language, enabling top BI software features, metadata discovery, and d
Foundry Toolkit: Deploy, test, and analyze smart contracts on EVM networks and local Anvil with powerful blockchain dev
Use Backlinks (Ahrefs) for detailed SEO analysis. Check website backlinks, anchor text, domain rating & more with this b
InfraNodus offers powerful text analysis and semantic analysis tools to find content gaps and improve research, SEO, and
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.