Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dbt-fixer

БесплатноБез исполняемых скриптовНе проверен

Fix dbt models via iterative compile-fix loop. Scoped to dbt projects assigned to the current phase. Use when the stabilization skill invokes dbt fixing.

sfc-gh-dflippoот sfc-gh-dflippo★ 35 звёзд на GitHub

Об этом скилле

dbt Fixer

Fix dbt projects generated by SnowConvert. Scope includes: model SQL files (staging, intermediate, mart), macros, and project configuration (dbt_project.yml, sources.yml). The fixer first resolves bootstrap issues (placeholder config, broken macros) to make the project compilable, then uses an iterative compile-fix-recompile loop to resolve model-level errors until all dbt nodes pass.

Autonomous mode: When spawned as a team agent, skip all interactive stopping points, make reasonable defaults for user-facing decisions, and document assumptions in the completion report. When done, send a send_message to main summarizing your results, and respond to any shutdown_request with send_message using type: "shutdown_response" and approve: true.

Main Mode (interactive / standalone use)

Input

Concurrent execution note: You may be spawned concurrently with other agents fixing different dbt projects in the same ETL unit. Each agent operates on its own project — do not access or modify files belonging to other dbt projects. Writing test/fix artifacts for another agent's project (even to be helpful) breaks that project's own validator lookup and causes a false missing-artifact failure at phase completion.

This sub-skill expects:

  • session_status.json — from track_status.py init (contains dbt_projects array with project names and paths, and source_file_path)
  • The dbt project folder path (from dbt_projects in session status)
  • The source definition file path (from source_file_path in session status) — for understanding original ETL intent
  • The test report at <UNIT>/stabilization/tests/dbt/<project_name>/test_report.md — required (contains baseline failures and source-to-dbt component mapping). If this file does not exist, tests have not been generated yet — STOP and return to the parent skill to run Step 9 (dbt-test-gen) first

Prerequisites

  • MUST be called AFTER dbt-test-gen — tests must exist before fixing begins. The parent skill (stabilization/SKILL.md) enforces this via the phase workflow. If the project status is pending instead of dbt-tested, STOP and return to the parent skill to run test generation first.
  • dbt-snowflake installed and available on PATH
  • dbt compile needs no warehouse, but it is only a syntactic pre-filter — it cannot tell a correct fix from a wrong one (see Step 2.3)
  • A warehouse is required to actually verify a fix. The convergence gate is the source-derived semantic tests, which must execute. Without a warehouse, nodes can only be recorded with status unverified (plus a reason), never as fixed.

Phase 1: Analyze and Plan

  1. Read ROADMAP.md for current phase. Process only assigned dbt projects; ignore others.
  2. Read session_status.json for dbt_projects array
  3. For each assigned dbt project: read dbt_project.yml, models/sources.yml, list .sql model files. The orchestrator has already registered nodes via track_status.py init-dbt.
  4. Ensure backup exists at <UNIT>/stabilization/original/; create if missing
  5. Bootstrap fixes (before compile loop): Read the test report's bootstrap_status section. If blockers exist: a. Fix dbt_project.yml — replace placeholder values (YOUR_PROJECT_NAME → derive from folder name or source definition; YOUR_PROFILE_NAME → use a sensible default based on the Snowflake connection) b. Fix macro syntax — resolve !!!RESOLVE EWI!!! markers in macros/*.sql, fix unclosed blocks c. Fix sources.yml — if source definitions reference non-existent schemas or tables, update to match the test environment d. After each fix, attempt dbt parse to validate
  6. Run dbt compile --project-dir <DBT_PROJECT_PATH> --profiles-dir ~/.dbt; parse errors to identify failing nodes
  7. Build fixing plan: bootstrap fixes first (already applied above) → model compilation errors → EWI markers → complex transformations
  8. Present summary (total nodes, passing/failing, error types, recommended order)
  9. ⚠️ STOPPING POINT (interactive mode): confirm with user. Autonomous agents: skip and proceed.

Phase 2: Fix (Iterative Compile-Fix Loop)

After user confirms, work through failing nodes. For each node:

Step 2.1: Gather Context

  1. Read the failing node's .sql file
  2. Read the original pre-fix version from <UNIT>/stabilization/original/<project_name>/ — to identify original ref()/source() targets and logic to preserve
  3. Read its model dependencies; verify they expose the columns needed
  4. Read dbt_project.yml (variable definitions), sources.yml (source schemas), and the current error message 4b. Read all macro files under macros/ — check for syntax errors and EWI markers
  5. Read the source dataflow component (from source_file_path if available) — especially useful for EWI markers
  6. Read the test report for baseline failures on this node — assertions describe expected behavior from source ETL
  7. Check tracking/fix-log.md for prior succe
Полный SKILL.md на GitHub

Установить dbt-fixer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл dbt-fixer?

Fix dbt models via iterative compile-fix loop. Scoped to dbt projects assigned to the current phase. Use when the stabilization skill invokes dbt fixing.

Как установить скилл dbt-fixer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dbt-fixer запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dbt-fixer с