AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Transform

skill-exmergo-dex-transform · by exmergo

Use this to author and change a dbt project: bootstrap a new dbt project in a repo that has none (`transform init`), write or refactor dbt model SQL from staging to marts, add tests and docs in schema.yml, manage dependencies, and define or update the semantic layer (dbt semantic models / MetricFlow: entities, dimensions, measures, metrics). Trigger it for requests like "set up a dbt project in t…

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-exmergo-dex-transform

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-exmergo-dex-transform)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Transform? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Transform

Author and refactor the dbt project: both the SQL transformations (staging to marts, tests, docs) and the semantic layer on top (entities, dimensions, measures, metrics). Both are the same job, writing reviewable diffs to the dbt project, which is the source of truth. This is the building half of the loop. It writes only to the repo, as reviewable diffs, and runs against a dev target only.

How to drive it

uv run "${CLAUDE_SKILL_DIR}/scripts/run.py"  [flags]

You author the dbt file content; the engine validates it, computes the diffs, and stores the proposal as a plan. Hand content over with --edits-file (or - to read stdin), a JSON payload:

{"edits": [
  {"path": "models/staging/stg_orders.sql", "kind": "model_sql", "content": "..."},
  {"path": "models/staging/stg_orders.yml", "kind": "schema_yml", "content": "..."}
]}

kind is model_sql, schema_yml, or semantic_yml (optional on semantic define|update|plan, which imply it). Model SQL must be a single read-only SELECT once its jinja is stripped; semantic YAML is validated against MetricFlow's schemas, cross-reference-checked, and (when dbt is available) parsed by dbt itself before the plan is accepted.

Bootstrapping a project

If no dbt project exists in the repo, offer transform init before anything else: transform plan needs a project to edit. Ask the user for the project name and confirm the connector with them, then run:

uv run "${CLAUDE_SKILL_DIR}/scripts/run.py" transform init "" --connector 

The engine renders the whole skeleton (dbt_project.yml, models/staging/ and models/marts/, a profiles.yml with a single dev target and no secrets) and records connector, dbt_project_dir, and dbt_target: dev in .dex/config.yml; do not hand-write these files yourself. Init never assumes a connector: it errors rather than defaulting, so always pass the user's confirmed choice (a connector: already committed in .dex/config.yml also counts). DuckDB, BigQuery, Snowflake, and Postgres are the supported connectors today; Databricks returns an actionable not-yet-supported error. DuckDB needs a warehouse path (--path, or the duckdb.path config). BigQuery needs a GCP project (usually bigquery.project in .dex/config.yml; confirm it with the user) and writes builds to a dedicated dev dataset (bigquery.dev_dataset, default dbt_dev); auth is Application Default Credentials, so if credentials are missing tell the user to run gcloud auth application-default login, never ask for a key. Snowflake writes builds to a dedicated snowflake.dev_database/dev_schema on the pinned warehouse; Postgres writes builds to a dedicated postgres.dev_schema (default dbt_dev), with the password reaching dbt only through the PGPASSWORD environment variable. Both discover their connections and refuse with the fix named when none resolves. Init refuses if any dbt project already exists.

dbt SQL models

  • transform plan "" --edits-file validates the edits and

returns them as diffs with a plan id. Nothing is applied yet. Add --scaffold (repeatable) to generate a staging skeleton (stg_.sql plus per-model YAML with key tests and PII meta) from the .dex/ cache instead of, or on top of, hand-authored edits.

  • transform apply [plan-id] writes the plan into the dbt project (the latest

unapplied plan when no id is given; any plan kind, semantic included). The result is still a reviewable git diff for the user. If a human edited a file after the plan was made, nothing is written: the divergence comes back as diffs with needs_confirmation, and you should re-plan against current state (or, only when the user says so, re-run with --confirm).

  • transform plans lists stored plans (pending and applied, newest first), so

you never need to browse .dex/plans/ by hand.

  • transform build --target dev runs dbt build against a dev target. The

engine surfaces a cost preflight first and runs only with --confirm (plus a --budget on billed connectors). On BigQuery there is no upfront estimate (dbt has no dry-run), so always get an explicit byte budget from the user and pass it as --budget ; never invent one. Each statement dbt runs is capped server-side by the profile's maximum_bytes_billed, and the envelope reports billed bytes afterward. Production-looking targets are refused outright; --confirm cannot override that. dbt runs with its working directory pinned to the project dir, so relative paths in profiles.yml resolve against the project. When the project declares packages (packages.yml) and dbt_packages/ is missing, the engine runs dbt deps automatically before the build.

  • transform deps installs dbt packages explicitly (also the refresh path when

dbt_packages/ exists but is stale). No confirmation needed: deps writes only inside the project and never touches the warehouse.

Seeding the dev warehouse

A DuckDB dev target points at a database file, and dbt happily creates an empty one if it does not exist, which then fails every source() relation with a confusing catalog error. The engine refuses that build up front and names the fix. The convention: copy the shared source warehouse to the dev target path (for example cp shared/f1.duckdb /dev.duckdb), or point the dev target at an existing database file. Projects without sources just get a warning and an empty database, which is fine for model-only builds.

The semantic layer

  • semantic define ... --edits-file and semantic update ... author

and evolve the dbt semantic models (entities, dimensions, measures, metrics) as plans. define refuses names that already exist (use update); update refuses names that do not (use define). For one logical change that mixes both (evolve existing metrics and add the helpers they depend on), use semantic plan ...: it accepts mixed intent and classifies each name, and the envelope reports the split as defined and updated.

  • Plan-time validation is layered so a plan that validates will build:

MetricFlow's schemas check the shape; the engine resolves every metric input (ratio and derived metrics reference metrics, not measures; a measure only becomes a metric via create_metric: true, and the error names that fix); and finally the emitted YAML is run through dbt's own parser against a throwaway copy of the project. A plan that fails parse is refused, not stored. If dbt is not installed the parse degrades to a warning; --no-parse skips it explicitly.

  • A semantic plan is applied like any other: transform apply [plan-id] writes

its YAML into the dbt project (no id applies the latest unapplied plan).

  • dbt cannot parse semantic models in a project without a MetricFlow **time

spine**; the engine warns when one is missing and defers the parse gate until one exists. Author it like any other model (a day-grain date model plus YAML with a time_spine: config) in the same or a separate plan.

  • viz preview is not yet implemented (it returns not_implemented); the Viz

integration arrives later.

Guardrails (enforced in the engine, not here)

  • Writes confined to the repo, and within it to the dbt project's model paths.

dex never writes to source warehouse data.

  • Dev-target only. Prod-target execution is never initiated by dex.
  • Cost surfaced before any spend. A build that would spend requires explicit

confirmation and a session budget.

  • Propose, don't impose. Human edits to dbt (SQL and semantic YAML) are

authoritative; on conflict the engine surfaces a diff and asks rather than overwriting.

  • PII flags propagate from the cache into emitted dbt (model and column meta),

never example values.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

  • Author: exmergo
  • Source: exmergo/dex
  • License: Apache-2.0
  • Homepage: https://www.exmergo.com/dex

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.