astronomer/agents/cosmos-dbt-core
Claude Code and agent skill by astronomer/agents
- community
Checking that the SKILL.md file is still in the repository.
Turns a dbt Core project into an Airflow DAG/TaskGroup using Astronomer Cosmos. Use turning a dbt Core project into an Airflow DAG or TaskGroup with Astronomer Cosmos. Before implementing, verify dbt engine, warehouse, Airflow version, execution environment, DAG vs TaskGroup, and manifest availability.
Install
npx vskill@latest install astronomer/agents/cosmos-dbt-coreSKILL.md
Cosmos + dbt Core: Implementation Checklist
Execute steps in order. Prefer the simplest configuration that meets the user's constraints.
Version note: This skill targets Cosmos 1.11+ and Airflow 3.x. If the user is on Airflow 2.x, adjust imports accordingly (see Appendix A).Reference: Latest stable: https://pypi.org/project/astronomer-cosmos/
Before starting, confirm: (1) dbt engine = Core (not Fusion → use cosmos-dbt-fusion), (2) warehouse type, (3) Airflow version, (4) execution environment (Airflow env / venv / container), (5) DbtDag vs DbtTaskGroup vs individual operators, (6) manifest availability.
1. Configure Project (ProjectConfig)
| Approach | When to use | Required param | |
|---|---|---|---|
| Project path | Files available locally | dbt_project_path | |
| Manifest only | dbt_manifest load | manifest_path + project_name |
2. Choose Parsing Strategy (RenderConfig)
Pick ONE load mode based on constraints:
| Load mode | When to use | Required inputs | Constraints | |
|---|---|---|---|---|
dbt_manifest | Large projects; containerized execution; fastest | ProjectConfig.manifest_path | Remote manifest needs manifest_conn_id | |
dbt_ls | Complex selectors; need dbt-native selection | dbt installed OR dbt_executable_path | Can also be used with containerized execution | |
dbt_ls_file | dbt_ls selection without running dbt_ls every parse | RenderConfig.dbt_ls_path | select/exclude won't work | |
automatic (default) | Simple setups; let Cosmos pick | (none) | Falls back: manifest → dbt_ls → custom |
CRITICAL: Containerized execution (DOCKER/KUBERNETES/etc.)
3. Choose Execution Mode (ExecutionConfig)
Reference: See [reference/cosmos-config.md](reference/cosmos-config.md#execution-modes-executionconfig) for detailed configuration examples per mode.
Pick ONE execution mode:
| Execution mode | When to use | Speed | Required setup | |
|---|---|---|---|---|
WATCHER | Fastest; single dbt build visibility | Fastest | dbt adapter in env OR dbt_executable_path or dbt Fusion | |
WATCHER_KUBERNETES | Fastest isolated method; single dbt build visibility | Fast | dbt installed in container | |
LOCAL + DBT_RUNNER | dbt + adapter in the same Python installation as Airflow | Fast | dbt 1.5+ in requirements.txt | |
LOCAL + SUBPROCESS | dbt + adapter available in the Airflow deployment, in an isolated Python installation | Medium | dbt_executable_path | |
AIRFLOW_ASYNC | BigQuery + long-running transforms | Fast | Airflow ≥2.8; provider deps | |
KUBERNETES | Isolation between Airflow and dbt | Medium | Airflow ≥2.8; provider deps | |
VIRTUALENV | Can't modify image; runtime venv | Slower | py_requirements in operator_args | |
| Other containerized approaches | Support Airflow and dbt isolation | Medium | container config |
4. Configure Warehouse Connection (ProfileConfig)
Reference: See [reference/cosmos-config.md](reference/cosmos-config.md#profileconfig-warehouse-connection) for detailed ProfileConfig options and all ProfileMapping classes.
Option A: Airflow Connection + ProfileMapping (Recommended)
Option B: Existing profiles.yml
CRITICAL: Do not hardcode secrets; use environment variables.
5. Configure Testing Behavior (RenderConfig)
Reference: See [reference/cosmos-config.md](reference/cosmos-config.md#testing-behavior-renderconfig) for detailed testing options.
| TestBehavior | Behavior | |
|---|---|---|
AFTER_EACH (default) | Tests run immediately after each model (default) | |
BUILD | Combine run + test into single dbt build | |
AFTER_ALL | All tests after all models complete | |
NONE | Skip tests |
6. Configure operator_args
Reference: See [reference/cosmos-config.md](reference/cosmos-config.md#operator_args-configuration) for detailed operator_args options.
7. Assemble DAG / TaskGroup
Option A: DbtDag (Standalone)
Option B: DbtTaskGroup (Inside Existing DAG)
Option C: Use Cosmos operators directly
Setting Dependencies on Individual Cosmos Tasks
8. Safety Checks
Before finalizing, verify:
- [ ] Execution mode matches constraints (AIRFLOW_ASYNC → BigQuery only)
- [ ] Warehouse adapter installed for chosen execution mode
- [ ] Secrets via Airflow connections or env vars, NOT plaintext
- [ ] Load mode matches execution (complex selectors → dbt_ls)
- [ ] Airflow 3 asset URIs if downstream DAGs scheduled on Cosmos assets (see Appendix A)
Appendix A: Airflow 3 Compatibility
Import Differences
| Airflow 3.x | Airflow 2.x | |
|---|---|---|
from airflow.sdk import dag, task | from airflow.decorators import dag, task | |
from airflow.sdk import chain | from airflow.models.baseoperator import chain |
Asset/Dataset URI Format Change
Cosmos ≤1.9 (Airflow 2 Datasets):
Cosmos ≥1.10 (Airflow 3 Assets):
CRITICAL: Update asset URIs when upgrading to Airflow 3.
Appendix B: Operational Extras
Caching
Cosmos caches artifacts to speed up parsing. Enabled by default.
Reference: https://astronomer.github.io/astronomer-cosmos/configuration/caching.html
Memory-Optimized Imports
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cosmos-dbt-core/SKILL.md
Popularity
- Repository stars
- 290
- Repository forks
- 31
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/astronomer/agents/cosmos-dbt-core)