/dlthub-platform:prepare-deploymentfrom dlthub-platform
Sets up production credentials and destinations for dltHub Platform. Guides splitting dev/prod secrets, configuring production destinations like Motherduck, and validating SQL dialect compatibility.
Ships in dlthub-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up profile-scoped credentials and production destinations so the runtime can run pipelines with the right config.
Reference: https://dlthub.com/docs/hub/pipeline-operations/profiles.md
.dlt/ config structureRun ls .dlt/*.toml to see which files exist:
.dlt/
├── config.toml # Workspace config (all profiles)
├── secrets.toml # Workspace secrets (all profiles, gitignored)
├── .workspace # Enable profiles and runtime CLI
Per-profile files may exist. You will create some of them below:
├── dev.config.toml # Dev-only config
├── dev.secrets.toml # Dev-only secrets (gitignored)
├── prod.config.toml # Production config
├── prod.secrets.toml # Production secrets (gitignored)
├── access.config.toml # Interactive notebook config
└── access.secrets.toml # Interactive notebook secrets (gitignored)
Use secrets_list, secrets_view_redacted, and secrets_update_fragment MCP tools (or dlthub ai secrets CLI as fallback) — see (setup-secrets) skill for details.
secrets_list to see all secret files. Then secrets_view_redacted (no path) for the unified merged view, or with path to inspect individual files.dev profile file via secrets_update_fragment with path=".dlt/dev.secrets.toml".prod profile secrets via secrets_update_fragment with path=".dlt/prod.secrets.toml" — user should fill in production values for their sources and destinations.secrets_view_redacted (unified view) and per-file with path.Offer to set up a production destination. If user is using duckdb, explain why ingested data will not survive to be visible by notebooks (runtime erases ephemeral storage!).
duckdb — offer to set up Motherduck as the production destination.dlt supports most major warehouses, data lakes and pure filesystems.If transformations are part of this workspace and the production destination differs from dev: before proceeding, run the (debug-transformation) skill from the transformations toolkit to validate SQL dialect compatibility. Transformations developed against DuckDB may use syntax that fails on BigQuery, Snowflake, or Postgres.
Our goal here is to keep existing dev destination in dev profile, and configure production destination in prod profile. User will be able to continue development as usual while deploying - with the same code!
Learn the concept of named destinations first:
Recommend to user switching to a named destination:
destination to $name for pipelines being deployed (all scripts — including notebooks)STOP before making changes. Show your plan and get approval from the user.
Skip this step if prod credentials were already configured and verified before this session. Run it when setting up prod credentials for the first time or after changing them.
Read check_destination.py and run it to verify credentials work:
uv run python .claude/skills/prepare-deployment/check_destination.py <profile> <destination> [dataset_name]
Use secrets_view_redacted to see the final unified view across all workspace secret files. Confirm:
__deployment__.py)Reference: deployment-module.md Full Documentation https://dlthub.com/docs/hub/pipeline-operations/deployments.md
dlthub run <file> directly instead (see ad-hoc launch)Find every dlt.pipeline(...).run(...) call site that should run on Runtime. Each one becomes a decorated function. Look for:
if __name__ == "__main__" blocks that create and run a pipeline@run.pipelineWrap each pipeline run in a decorated function. Use from dlt.hub import run:
from dlt.hub import run
@run.pipeline("my_pipeline")
def ingest_data():
pipeline = dlt.pipeline(
pipeline_name="my_pipeline",
destination="warehouse",
dataset_name="my_data",
)
pipeline.run(my_source())
DO NOT add triggers or schedules at this point -- just the bare minimum to register the job. Scheduling is added in the deployment step.
Refresh runs (recommended): add auto_refresh_pipeline_mode="drop_sources" to the decorator, e.g. @run.pipeline("my_pipeline", auto_refresh_pipeline_mode="drop_sources"). Then a refresh run (--refresh) reloads every pipeline in the job. Without it, a refresh run does not reload the pipeline. Modes and the refresh cascade: the deploy-workspace skill, advanced-patterns.md, "Refresh runs and the refresh cascade".
__deployment__.pyfrom my_pipeline import ingest_data)import my_notebook)__all__ listing every name to deploy"""My workspace -- ingest and explore data"""
from my_pipeline import ingest_data
import my_notebook
__all__ = ["ingest_data", "my_notebook"]
dlthub deploy --dry-run -- shows what would be created/updated/archiveddlthub deploy --show-manifest -- dumps full manifest as YAMLEvery deployed job gets a job_ref in jobs.<module>.<function> form:
from my_pipeline import ingest_data -> jobs.my_pipeline.ingest_dataimport my_notebook -> jobs.my_notebookJob names: bare names work when unambiguous. dlthub run ingest_data resolves automatically.
STOP before making changes. Show your plan and get approval from the user.
Tell the user the workspace is ready for deployment — use (deploy-workspace) next.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dlt-hub/dlthub-ai-harness --plugin dlthub-platform4 skills in this plugin
/debug-deploymentDebug a failed or misbehaving dltHub Platform deployment. Use when a runtime job fails, produces unexpected results, or the user wants to check job status and logs./deploy-workspaceDeploy dlt pipelines to dltHub Platform. Use when the user says "deploy to dltHub", "launch on dltHub", "run on dltHub", "schedule pipeline", or wants to deploy a pipeline or notebook to dltHub./setup-runtimeVerify dlthub workspace is ready for dltHub Platform. Use when user wants to deploy for the first time, or when another skill reports missing prerequisites like .workspace file or dlt[hub] dependency.Other plugins' skills for the same job