upgrade-preflight
What it does
This skill helps operators decide whether a self-hosted Lightdash upgrade is safe and recover from a stuck migration. It is for teams that run their own Lightdash server and plan its upgrades.
When to use it
- ✓When you are planning an upgrade of a self-hosted Lightdash instance.
- ✓When you need to answer whether a Lightdash upgrade is safe to run.
- ✓When a Lightdash migration has failed, hung or is stuck on a lock.
Skill link
https://github.com/lightdash/lightdash/blob/main/skills/upgrade-preflight/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Check whether upgrading our self-hosted Lightdash to the latest version is safe, and tell me what the checks found.”
5 new skills a week. 1 minute to read.
How it works
The skill explains which upgrade check and migration preflight commands to run, how to read their exit codes and output, and what they do not prove. It points operators to the official safety and runbook pages for the full steps.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Upgrade preflight
Decide whether a self-hosted Lightdash upgrade is safe to run, and report the answer accurately.
Scope
Use this when helping an operator upgrade a self-hosted instance: choosing a target version, planning a window, gating a pipeline, or recovering a migration that failed or hung.
Don't use this for Lightdash Cloud (upgrades are managed), dbt or semantic-layer work, or developing Lightdash itself.
The human-facing references are upgrade safety (what the signals mean) and the upgrade runbook (execution sequences, per-platform invocation, recovery, rollback). This skill is the agent-facing layer: what to run, what to branch on, and what not to conclude. Link the operator to those pages rather than paraphrasing them.
Vocabulary
One term per concept, matching the docs: a span is a from-version to a to-version; verdict is upgrade-check's answer about a span; a check is one item the preflight reports; decision is the preflight's overall answer; the lease is the row a migrating node holds while it works.
Two layers, in this order
Two commands. They answer different questions and neither substitutes for the other.
lightdash upgrade-check |
migrate preflight |
|
|---|---|---|
| Question | Is this span safe in principle? | Will this database take it right now? |
| Where | Anywhere — the @lightdash/cli, no login, no database |
Inside the image, with database env credentials |
| Reads | The public release-safety index on GitHub | The live database + the artifact baked into the image |
| Invocation | lightdash upgrade-check --from 1.130.0 --to 1.138.0 [--json] |
pnpm -F backend migrate-production preflight [--json] [--strict] [--force] |
Run upgrade-check first. It is the decision layer: it can tell the operator not to attempt the span at all, or that they must stop at an intermediate release, before anyone touches the instance. migrate preflight is the execution layer and cannot see the span — it knows only the image it runs in and the ledger in front of it. A preflight decision of proceed never licenses a span whose verdict was not true.
Gate on exit codes and JSON
Both commands print human text by default and a machine payload under --json. Branch on the exit code, then read named fields — not the rendered text. The words RED, UNSAFE and abort all appear in the prose of runs that are fine, and the human renderer is not a contract.
Exit codes are binary in both commands: 0 success, 1 everything else — an unsafe verdict, an aborted decision, or an error such as an unreachable index or a rejected flag. There is no severity ladder in the exit code; the severity lives in the payload. A non-zero exit means "stop and read the payload", never "this specific thing went wrong".
upgrade-check — branch on safe (boolean). It is true only when verdict is true, requiredStops is empty, and the from-version is not below minPreviousVersion.
verdictis tri-state:true,false, or"unknown"."unknown"is not a pass — a release in the span is unindexed or indexed as unknown, so the command fails closed. Report it as "cannot verify this span", never as "clear" or "probably fine". This is the output most likely to be mis-summarised into an all-clear.requiredStopsnon-empty means the span must be split into several upgrades, not that it is forbidden.- A rollback span is rejected with an error rather than a verdict; rollback guidance is in the runbook.
migrate preflight — branch on decision: proceed, proceed-with-warnings, abort, or force-proceed. Equivalently, gate on summary.red and summary.yellow.
severityis the class of a check, not its result.postgres-versionis always a red-class check; on a healthy server it reports{"severity": "red", "outcome": "pass"}and renders as[RED PASS]. Onlyseverity: "red"withoutcome: "fail"is
FAQ
Does it work for Lightdash Cloud?
No, the description says Cloud upgrades are managed for you, so this is for self-hosted instances only.
Can one check replace the other?
No, the skill explains that the two preflight commands answer different questions.
Where are the full steps?
The skill links to the official upgrade safety and runbook pages for the full procedure.
Details
Original description by the author
Checks whether a self-hosted Lightdash upgrade is safe to run, and reads the tooling's answer without over-reading it. Use when upgrading a self-hosted instance, planning a maintenance window, answering "is this upgrade safe", or recovering a failed, hung, parked or lock-stuck migration — covers `lightdash upgrade-check` and `migrate preflight`, how to gate on their exit codes and JSON, and the readings that look calm but mean "could not check".
repo: lightdash/lightdash
Popularity
- GitHub stars
- 6.2k
- Ranking position
- #14407
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
breakup-pr
6.2kHelps your agent split a large pull request into smaller, stacked slices that can be reviewed and merged one at a time.
lightdash-agent-slack-messaging
6.2kHelps your agent write clear, friendly maintenance and activity reports for Lightdash administrators, based only on the evidence it has.
developing-in-lightdash
6.2kHelps your agent read, create and edit Lightdash dashboards and charts as JSON, including each chart type's settings.
filter-expressions
6.2kHelps your agent write correct filter expressions for Lightdash metric queries, including filters on custom metrics.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.