dbt

dbt is a skill for Claude Code from treasure-data/td-skills. It costs 42 tokens per session (1,045 once invoked), scanned A, original, Apache-2.0.

A guide to using dbt with Treasure Data's Trino-based query system. It covers installation, profile settings, project configuration, and required macro overrides.

In plain words
What is it for?
Use it when installing dbt, creating profiles.yml or dbt_project.yml, and adding the macros needed for Treasure Data Trino.
Why use it?
It helps avoid setup errors when connecting dbt to Treasure Data and configuring a project correctly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflow-skills plugin — 3 skills shipped together

Good fit Use it when installing dbt, creating profiles.yml or dbt_project.yml, and adding the macros needed for Treasure Data Trino.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/treasure-data/td-skills/dbt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add treasure-data/td-skills --skill dbt
Clone the repo
git clone --depth 1 https://github.com/treasure-data/td-skills

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dbt

README.md
[![agentmods](https://agentmods.dev/badge/skills/treasure-data/td-skills/dbt/github.svg)](https://agentmods.dev/skills/treasure-data/td-skills/dbt)
Your own site
<a href="https://agentmods.dev/skills/treasure-data/td-skills/dbt"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/dbt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dbt

Your own site · 80×15
<a href="https://agentmods.dev/skills/treasure-data/td-skills/dbt"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/dbt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,045 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.01045
Opus 5.5 $0.00017 $0.00418
Sonnet 5.5 $0.00008 $0.00209
Haiku 4.5 $0.00004 $0.00104

Measured 3mo ago against content hash e41594dcd5c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dbt scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'dbt-core==1.10.9', 'dbt-trino==1.9.3'])
workflow-skills/dbt/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

dbt with Treasure Data Trino

Installation

uv venv && source .venv/bin/activate
uv pip install dbt-core dbt-trino==1.9.3

profiles.yml

td:
  target: dev
  outputs:
    dev:
      type: trino
      method: none                          # Not 'ldap'
      user: "{{ env_var('TD_API_KEY') }}"
      password: dummy                       # Not used
      host: api-presto.treasuredata.com
      port: 443
      database: td                          # Always 'td'
      schema: your_dev_database             # Your TD database name
      threads: 4
      http_scheme: https
      session_properties:
        query_max_run_time: 1h

Key TD settings:

  • method: none for API key auth
  • database: td (always)
  • schema: your_td_database (what you see in TD Console)

Required Override Macros

TD doesn't support CREATE VIEW. Create macros/override_dbt_trino.sql:

{% macro trino__create_view_as(relation, sql) -%}
  create or replace table {{ relation }} as (
    {{ sql }}
  );
{%- endmacro %}

{% macro trino__list_relations_without_caching(schema_relation) %}
  {% call statement('list_relations_without_caching', fetch_result=True) %}
    select
      table_catalog as "database",
      table_schema as "schema",
      table_name as "name",
      table_type as "type"
    from {{ schema_relation }}.information_schema.tables
    where table_schema = '{{ schema_relation.schema }}'
  {% endcall %}
  {{ return(load_result('list_relations_without_caching').table) }}
{% endmacro %}

dbt_project.yml

name: 'my_td_project'
version: '1.0.0'
config-version: 2
profile: 'td'

flags:
  require_certificate_validation: true

vars:
  target_range: '-3M/now'

models:
  my_td_project:
    +materialized: table
    +on_schema_change: "append_new_columns"

Model Patterns

Basic model:

{{
  config(materialized='table')
}}

SELECT
  TD_TIME_STRING(time, 'd!', 'JST') as date,
  COUNT(*) as event_count
FROM {{ source('raw', 'events') }}
WHERE TD_INTERVAL(time, '{{ var("target_range", "-7d") }}', 'JST')
GROUP BY 1

Read the full file on GitHub · 172 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 172 lines · 42 tokens per session scan A e41594dcd5c0

Subscribe to this mod's changes

dbt is a skill published in the GitHub repository treasure-data/td-skills (23 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 1,045 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

dbt compared with skills from other repositories

dbt next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dbttreasure-data/td-skillsSkill23todayApache-2.0A42Claude Code
create-prprisma/ormSkill48ktodayApache-2.0A47Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill32ktodayMITA57Claude Code, Codex
atlas-mssqlariga/atlasSkill8.9k3d agoApache-2.0A163Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex
bex-keyvaluebex-co/bexSkill1.6ktodayApache-2.0A117Claude Code, Codex
pentesting-mysqlxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A65Claude Code, Codex