Official agent skill

Ade Bench Cross DB Tasks

by dbt-labs in dbt-labs/ade-bench

A skill your agent uses when authoring or debugging ade-bench tasks that must run on both DuckDB and Snowflake, including shared project migrations, setup patches, and solution patches

OfficialApache-2.0Auto-check passedDatabases

Install Ade Bench Cross DB Tasks

skills CLI
$ npx skills add dbt-labs/ade-bench --skill ade-bench-cross-db-tasks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dbt-labs/ade-bench ade-bench-cross-db-tasks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dbt-labs/ade-bench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ade-bench-cross-db-tasks .claude/skills/ade-bench-cross-db-tasks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ade-bench-cross-db-tasks
GitHub stars
125
Token cost
~2k tokens
SKILL.md length
694 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when authoring or debugging ade-bench tasks that must run on both DuckDB and Snowflake, including shared project migrations, setup patches, and solution patches

  • Debugging ade-bench tasks that must run on both DuckDB and Snowflake
  • SKILL.md covers Overview, Container Lifecycle (in order), Patch File Pattern and Migration Guidelines, plus 5 more sections
  • Calls yq
  • Including shared project migrations

What it does

Ade Bench Cross DB Tasks is an agent skill from dbt-labs/ade-bench, published by the product's own GitHub organization. Use when authoring or debugging ade-bench tasks that must run on both DuckDB and Snowflake, including shared project migrations, setup patches, and solution patches

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Data warehousing. It works with Snowflake, dbt and DuckDB. The licence is Apache-2.0.

When your agent uses it

  • Debugging ade-bench tasks that must run on both DuckDB and Snowflake
  • Including shared project migrations
  • Solution patches

Example prompts

  • “/ade-bench-cross-db-tasks”

What it can do on your machine

Read from SKILL.md and the folder at commit c305600. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • yq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ade Bench Cross DB Tasks loads about 2k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 694 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dbt-labs/ade-bench at commit c305600, republished under its Apache-2.0 licence (© dbt-labs). 694 words, ~2,044 tokens.

Download SKILL.mdSave it as .claude/skills/ade-bench-cross-db-tasks/SKILL.md (or your agent's skills folder).
name
ade-bench-cross-db-tasks
description
Use when authoring or debugging ade-bench tasks that must run on both DuckDB and Snowflake, including shared project migrations, setup patches, and solution patches

ADE-Bench Cross-DB Task Authoring

Overview

Tasks in ade-bench can target DuckDB (default) or Snowflake. A task's files go through a deterministic four-stage lifecycle. Patches that ignore this order produce context mismatches or "reversed patch" prompts that block execution.

Container Lifecycle (in order)

1. MIGRATION   shared/migrations/<name>/migration.sh + migration.patch
               — Converts shared project files from DuckDB to Snowflake syntax
2. SETUP       tasks/<id>/setup.sh  +  tasks/<id>/setup/changes.patch
                                       tasks/<id>/setup/changes.snowflake.patch (optional)
               — Creates the puzzle state the agent must solve
3. AGENT       (agent works here)
4. SOLUTION    tasks/<id>/solution.sh  +  tasks/<id>/solutions/changes.patch
                                          tasks/<id>/solutions/changes.snowflake.patch (optional)

Critical: Migration runs before setup and solution. Any line migration touches is in its post-migration state when patches run.

Patch File Pattern

Always apply the base patch, then conditionally apply the snowflake delta. This applies to both setup.sh and solution.sh:

bash
patch -p1 < /app/setup/changes.patch           # always (use /sage/solutions/ for solution.sh)

if [[ "$*" == *"--db-type=snowflake"* ]]; then
    patch -p1 < /app/setup/changes.snowflake.patch  # additive delta only
fi

Never use if/else to choose between two alternative patches. The base patch handles DuckDB; the snowflake patch stacks on top for Snowflake.

changes.snowflake.patch is a delta — it only contains changes that differ from the DuckDB result. It never replicates what migration already did.

Migration Guidelines

Migration's job: Convert DuckDB-specific syntax to Snowflake equivalents across all tasks sharing a project.

  • Schema names: schema: main → schema: public
  • Date functions: STRPTIME(...) → TO_DATE(TO_TIMESTAMP(...))
  • Generator functions, STRFTIME, etc.

Don't add migration hunks for files that setup removes. If setup strips a config block entirely, migration touching a field inside that block is wasted work that breaks setup's patch. Example: if setup/changes.patch deletes an entire {{ config(...) }} block from src_hosts.sql, migration should not change schema= inside that same block.

Modifying dbt_project.yml: use yq, not patch

The migration process calls yaml.safe_load / yaml.safe_dump on dbt_project.yml to update the profile name. This completely reformats the file — sorted keys, no comments, different whitespace. Any patch against the original layout will fail.

Use yq for all dbt_project.yml changes in setup.sh and solution.sh:

bash
# Add a variable
yq -i '.vars.surrogate_key_treat_nulls_as_empty_strings = true' dbt_project.yml

# Delete a variable
yq -i 'del(.vars.quickbooks.using_department)' dbt_project.yml

# Disable a package model
yq -i '.models.quickbooks_source["stg_quickbooks__refund_receipt"]["+enabled"] = false' dbt_project.yml

yq performs semantic YAML operations so key order and formatting don't matter.

Setup Patch Guidelines

Setup creates the puzzle. setup/changes.patch runs after migration.

When setup's base patch can't match post-migration content (e.g. migration changed schema="main" to schema="public" in a line the setup patch must remove):

bash
# setup.sh
patch -p1 --batch < /app/setup/changes.patch || true   # graceful fail on Snowflake

if [[ "$*" == *"--db-type=snowflake"* ]]; then
    patch -p1 --batch --forward < /app/setup/changes.snowflake.patch
fi
  • --batch: prevents interactive "Apply anyway?" prompt (avoids blocking)
  • --forward: skips reversed/already-applied hunks without prompting
  • || true: base patch may partially fail on Snowflake; that's expected

setup/changes.snowflake.patch is the DuckDB base patch with post-migration values substituted (e.g. schema="public" instead of schema="main" in the removed lines).

Solution Patch Guidelines

Context line mismatch (migration changed a context line)

If migration rewrites a line that appears as a context line ( ) in changes.patch, drop it from context:

diff
# Before — STRPTIME is a context line; migration changes it to TO_DATE(...)
 @@ -11,7 +11,7 @@
          transaction_type,
          CAST(STRPTIME(transaction_created_date, '%m/%d/%Y %H:%M:%S') AS DATE) AS transaction_created_date,
          transaction_modified_date,
 -        product_id,
 +        product_id::varchar AS product_id,

# After — start hunk after the changed line, no STRPTIME context
 @@ -14,4 +14,4 @@
 -        product_id,
 +        product_id::varchar AS product_id,
          quantity,
          purchase_order_id,
          customer_order_id,
- line mismatch (migration changed a line being removed)

If migration rewrites a line that is a - line (a line being deleted), 0-context doesn't help — the removed line must match exactly. Use changes.snowflake.patch with the post-migration value:

patch
# changes.snowflake.patch — removes config block after migration changed schema
@@ -1,9 +1,0 @@
-{{
-    config(materialized="table", schema="public", ...)
-}}
-
Show full SKILL.md (290 more words)Show less
Never duplicate migration in the snowflake patch

Before adding anything to changes.snowflake.patch, check whether migration already makes that change. If migration already converts STRPTIME or changes schema, the solution patch must not repeat it — patch will detect it as reversed and block.

Quick Diagnosis

SymptomCauseFix
Hunk #N FAILED in solutionMigration changed a context lineDrop that context line from the hunk
Reversed patch detected! Assume -R?Snowflake patch duplicates migrationDelete or update the snowflake patch
Setup Hunk #1 FAILED then solution failsMigration changed a - line in setup patchAdd setup/changes.snowflake.patch + --batch || true
dbt_project.yml patch fails on SnowflakeMigration reformatted the file via yaml.safe_dumpSwitch to yq for all dbt_project.yml edits
Silent wrong outputBase patch failed, no error shownAdd set -e or check with --dry-run

Real Examples

analytics_engineering007 (tasks/analytics_engineering007/solutions/changes.patch): Migration converts CAST(STRPTIME(...)) → TO_DATE(...) in fact_inventory.sql. The solution's changes.patch had STRPTIME as a context line — fragile fuzz match. Fixed by starting the hunk at line 14 (@@ -14,4) instead of line 11 (@@ -11,7), skipping the migrated line entirely. The solution's snowflake patch (which also tried to convert STRPTIME) was deleted since migration already did it.

airbnb003 (tasks/airbnb003/setup/): Migration changes schema="main" → schema="public" inside the config block of src_hosts.sql. The setup's changes.patch removes that entire config block but has schema="main" in the - lines — fails after migration. Fixed by adding setup/changes.snowflake.patch (same removal with schema="public") and using --batch || true on the base patch so it fails gracefully, then the snowflake patch completes the removal.

airbnb002 (tasks/airbnb002/solution.sh): Solution needs to add surrogate_key_treat_nulls_as_empty_strings: true to dbt_project.yml. Using patch fails because migration's yaml.safe_dump reformatted the file. Fixed with:

bash
yq -i '.vars.surrogate_key_treat_nulls_as_empty_strings = true' dbt_project.yml

quickbooks003 (tasks/quickbooks003/solution.sh): Solution needs to disable three package models and delete a variable from dbt_project.yml. Patch was unreliable after migration reformatting. Fixed with yq:

bash
yq -i '.models.quickbooks_source["stg_quickbooks__refund_receipt"]["+enabled"] = false' dbt_project.yml
yq -i 'del(.vars.quickbooks.using_department)' dbt_project.yml

© dbt-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/ade-bench-cross-db-tasks of dbt-labs/ade-bench.

Open the folder on GitHubat commit c305600

Compare with similar skills

Ade Bench Cross DB Tasks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ade Bench Cross DB Tasks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ade Bench Cross DB Tasks this skilldbt-labs/ade-bench125—~2kAutomated safety check: PassApache-2.0
Modelersidequery/sidemantic129—~4.2kAutomated safety check: PassApache-2.0
Altimate Data Warehouse DelegateAltimateAI/data-engineering-skills128—~1.4kAutomated safety check: PassMIT
Connect Snowflakeai-analyst-lab/ai-analyst304—~1.4kAutomated safety check: NotesMIT
Snowflake Developmentsickn33/agentic-awesome-skills47k2 repos~2.1kAutomated safety check: PassMIT
Snowflake Developmentalirezarezvani/claude-skills28k—~3.2kAutomated safety check: PassMIT

Similar skills

  • Modeler

    sidequery/sidemantic

    Build, validate, and manage semantic models using Sidemantic.

    129 GitHub stars~4.2k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Altimate Data Warehouse Delegate

    AltimateAI/data-engineering-skills

    Delegates dbt and warehouse tasks such as lineage, migrations and cost attribution to the altimate-code CLI agent and relays its answer back.

    128 GitHub stars~1.4k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Connect Snowflake

    ai-analyst-lab/ai-analyst

    Query the live/remote Snowflake warehouse instead of the local practice copy.

    304 GitHub stars~1.4k tokensUpdated 10 days ago
    DatabasesAuto-check: notes
  • Snowflake Development

    sickn33/agentic-awesome-skills

    Comprehensive Snowflake development assistant covering SQL best practices, data pipeline design (Dynamic Tables, Streams, Tasks, Snowpipe), Cortex AI functions, Cortex Agents, Snowpark Python, dbt…

    47k GitHub starsUsed in 2 repos~2.1k tokens
    DatabasesAuto-check passed
  • Snowflake Development

    alirezarezvani/claude-skills

    A skill your agent uses when writing Snowflake SQL, building data pipelines with Dynamic Tables or Streams/Tasks, using Cortex AI functions, creating Cortex Agents, writing Snowpark Python…

    28k GitHub stars~3.2k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Data Warehouse Experimentation

    rampstackco/claude-skills

    Running experiments out of the data warehouse instead of via dedicated experiment platforms.

    945 GitHub stars~7.3k tokensUpdated 3 days ago
    DatabasesAuto-check passed

Categories

Questions about Ade Bench Cross DB Tasks

What does Ade Bench Cross DB Tasks do?

A skill your agent uses when authoring or debugging ade-bench tasks that must run on both DuckDB and Snowflake, including shared project migrations, setup patches, and solution patches. Ade Bench Cross DB Tasks is an agent skill from dbt-labs/ade-bench, published by the product's own GitHub organization.

When should I use Ade Bench Cross DB Tasks?

Ade Bench Cross DB Tasks fits situations like: debugging ade-bench tasks that must run on both DuckDB and Snowflake; including shared project migrations; solution patches.

How do I install Ade Bench Cross DB Tasks in Claude Code?

Run `npx skills add dbt-labs/ade-bench --skill ade-bench-cross-db-tasks -a claude-code`. Or copy the skill folder (skills/ade-bench-cross-db-tasks in dbt-labs/ade-bench) into .claude/skills/ade-bench-cross-db-tasks in your project. Claude Code loads it when a task matches its description.

How do I install Ade Bench Cross DB Tasks in Codex?

Run `npx skills add dbt-labs/ade-bench --skill ade-bench-cross-db-tasks -a codex`. Or copy the skill folder (skills/ade-bench-cross-db-tasks in dbt-labs/ade-bench) into .agents/skills/ade-bench-cross-db-tasks in your project. Codex loads it when a task matches its description.

Can I use Ade Bench Cross DB Tasks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dbt-labs/ade-bench --skill ade-bench-cross-db-tasks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ade-bench-cross-db-tasks, .gemini/skills/ade-bench-cross-db-tasks, .github/skills/ade-bench-cross-db-tasks and .opencode/skills/ade-bench-cross-db-tasks in your project.

What does Ade Bench Cross DB Tasks need to run?

Going by SKILL.md and its folder, Ade Bench Cross DB Tasks needs the command-line tools its instructions call (yq).

Does Ade Bench Cross DB Tasks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ade Bench Cross DB Tasks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ade Bench Cross DB Tasks use?

Ade Bench Cross DB Tasks is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ade Bench Cross DB Tasks use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ade Bench Cross DB Tasks?

Skills that share tags, products or a category with Ade Bench Cross DB Tasks: Modeler (sidequery/sidemantic, 129 stars), Altimate Data Warehouse Delegate (AltimateAI/data-engineering-skills, 128 stars), Connect Snowflake (ai-analyst-lab/ai-analyst, 304 stars) and Snowflake Development (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ade Bench Cross DB Tasks?

dbt-labs (a GitHub organization, an official publisher) maintains it in dbt-labs/ade-bench, which has 125 GitHub stars. The repository was last updated on September 30, 2026.

Source: dbt-labs/ade-bench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.