/init:setup-secrets [source-name]from init
Safely manages dlthub credentials in *.secrets.toml files. Configures API keys, database passwords, and tokens using MCP tools or CLI fallback. Activated when users need to set up or inspect secrets, or when writing Python code that reads credentials via dlt.secrets.
Ships in init. 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.
Essential Reading Credentials & config resolution: https://dlthub.com/docs/general-usage/credentials/setup.md https://dlthub.com/docs/general-usage/credentials/advanced.md
Configure credentials in .dlt/secrets.toml. Never read secrets files directly — use dlt-workspace-mcp tools or dlthub ai secrets CLI commands.
Prefer MCP — use secrets_list, secrets_view_redacted, secrets_update_fragment tools from dlt-workspace-mcp.
CLI fallback: If MCP is not connected, see cli-reference.md for equivalent dlthub ai secrets commands.
Read additional docs as needed:
https://dlthub.com/docs/general-usage/credentials/complex_types.mdGcpServiceAccountCredentials, AwsCredentials, etc.): https://dlthub.com/docs/general-usage/credentials/complex_types.md#built-in-credentialshttps://dlthub.com/docs/dlt-ecosystem/destinations/Parse $ARGUMENTS:
source_name or description of what credentials are needed (e.g. "stripe api key", "postgres credentials")If called from another skill, you already know the source, destination, and which fields are needed — skip to step 3.
If called standalone (e.g. user says "set up secrets" or hit ConfigFieldMissingException):
dlt.secrets.value parameters on @dlt.source/@dlt.resource functionsUse secrets_list to list workspace-scoped secrets files. Profile-scoped files (e.g. .dlt/dev.secrets.toml) appear first — use those when present, fall back to .dlt/secrets.toml otherwise.
Pick the target file from the list — you will pass it as path to secrets_update_fragment in step 4.
Then use secrets_view_redacted (no path argument) to see the unified merged view with values replaced by ***. To inspect a specific file, pass path=".dlt/<profile>.secrets.toml".
Look for:
[sources.<name>], [destination.<name>])<configure me>)Skip this step if you already know the secrets file is empty or doesn't exist.
Before asking the user for values:
Use secrets_update_fragment with fragment (TOML string) and path (target file from step 2). Creates the file if needed, deep-merges without overwriting other sections, returns the redacted result.
CRITICAL: Only write placeholders — never pass actual secret values through secrets_update_fragment or any other tool. The user fills in real values themselves by editing the file directly.
Always scope secrets under the source or destination name:
[sources.<source_name>]
api_key = "<paste-your-api-key-here>"
[destination.<destination_name>.credentials]
host = "localhost"
port = 5432
database = "analytics"
username = "loader"
password = "<paste-your-password-here>"
<source_name> = name= arg on @dlt.source, or the function name if not set.
Use meaningful placeholders that hint at the format:
"sk-*****-your-key" or "ak-xxxx-xxxx-xxxx""ghp_xxxxxxxxxxxxxxxxxxxx" (GitHub), "xoxb-xxxx" (Slack)"<paste-your-password-here>""https://your-instance.example.com"Never use the generic "<configure me>".
Use secrets_view_redacted to see the unified merged view across all workspace secret files. Tell the user which fields still have placeholders and how to obtain real values.
You can write Python scripts that read and use secrets without ever revealing them. dlt.secrets and dlt.config work as dictionaries using the same TOML paths shown by view-redacted.
Example: you need to call the GitHub REST API and view-redacted shows [sources.github] api_key = "***":
import dlt
import requests
# reads from secrets.toml [sources.github] api_key — never prints the value
api_key = dlt.secrets["sources.github.api_key"]
resp = requests.get(
"https://api.github.com/user",
headers={"Authorization": f"Bearer {api_key}"},
)
print(resp.json()["login"])
You can also retrieve typed credentials:
from dlt.sources.credentials import GcpServiceAccountCredentials
creds = dlt.secrets.get("destination.bigquery.credentials", GcpServiceAccountCredentials)
Reference: https://dlthub.com/docs/general-usage/credentials/advanced.md#access-configs-and-secrets-in-code
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/create-background-agentWrite a dltHub background agent: an AGENT.md that runs unattended on the platform, on a schedule, after a job fails, or when someone starts it from the web UI. Use when the user wants work to happen on its own after an event ('whenever a job fails, diagnose it for me', 'every Monday summarise what broke'), when they ask how to write, declare or deploy an AGENT.md, how to pick its access, tools, inputs or output, how to set run.agent, or how to ship an agent in a toolkit. Do NOT use for a host subagent in .claude/agents/, for scheduling a pipeline or a plain job (deploy-workspace), for diagnosing one failure right now (debug-deployment), or for setting AGENT__MODEL and the other AGENT__ variables, which belong to any agent job including the shipped job-inspector./dlthub-routerThe entry point for building anything with dlthub: route the user to the right workflow toolkit and install it on demand. MUST use when the user asks 'what can you do', 'what can I build', 'what are toolkits', 'how do I build a pipeline', 'I want to pull data from a REST API', 'ingest from a SQL database', 'ingest CSVs from S3 into a warehouse', 'make reports / dashboards', 'transform / model my data', 'add data quality checks', 'how do I deploy / schedule a pipeline', 'I'm new to dlthub', 'where do I start', 'my deployed job failed', or seems unsure what to do next after setup. Also use when the user names a data-engineering goal and no matching toolkit is installed yet. Do NOT use when the matching toolkit is already installed: go straight to its entry skill. Do NOT use when a specific task is in progress (debugging a pipeline, validating data, adding endpoints) and its toolkit is installed. Do NOT use when the user wants a guided end-to-end demo: use **quick-start**./improve-skillsImprove existing skills based on the current session. Use at the end of a session (or when the user asks) to capture new debugging patterns, data issues, data validation tracks, querying techniques, doc references, or workflow improvements learned during the session. Keeps skills lean and personalized./troubleshoot-pipeline-runGeneral pipeline troubleshooting, when no troubleshooting guide specific to the source or runtime context is present.npx claudepluginhub dlt-hub/dlthub-ai-harness --plugin initOther plugins' skills for the same job