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★ 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_messagetomainsummarizing your results, and respond to anyshutdown_requestwithsend_messageusingtype: "shutdown_response"andapprove: 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 (containsdbt_projectsarray with project names and paths, andsource_file_path)- The dbt project folder path (from
dbt_projectsin session status) - The source definition file path (from
source_file_pathin 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
pendinginstead ofdbt-tested, STOP and return to the parent skill to run test generation first. dbt-snowflakeinstalled and available on PATHdbt compileneeds 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
- Read
ROADMAP.mdfor current phase. Process only assigned dbt projects; ignore others. - Read
session_status.jsonfordbt_projectsarray - For each assigned dbt project: read
dbt_project.yml,models/sources.yml, list.sqlmodel files. The orchestrator has already registered nodes viatrack_status.py init-dbt. - Ensure backup exists at
<UNIT>/stabilization/original/; create if missing - Bootstrap fixes (before compile loop): Read the test report's
bootstrap_statussection. If blockers exist: a. Fixdbt_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 inmacros/*.sql, fix unclosed blocks c. Fixsources.yml— if source definitions reference non-existent schemas or tables, update to match the test environment d. After each fix, attemptdbt parseto validate - Run
dbt compile --project-dir <DBT_PROJECT_PATH> --profiles-dir ~/.dbt; parse errors to identify failing nodes - Build fixing plan: bootstrap fixes first (already applied above) → model compilation errors → EWI markers → complex transformations
- Present summary (total nodes, passing/failing, error types, recommended order)
- ⚠️ 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
- Read the failing node's
.sqlfile - Read the original pre-fix version from
<UNIT>/stabilization/original/<project_name>/— to identify originalref()/source()targets and logic to preserve - Read its model dependencies; verify they expose the columns needed
- Read
dbt_project.yml(variable definitions),sources.yml(source schemas), and the current error message 4b. Read all macro files undermacros/— check for syntax errors and EWI markers - Read the source dataflow component (from
source_file_pathif available) — especially useful for EWI markers - Read the test report for baseline failures on this node — assertions describe expected behavior from source ETL
- Check
tracking/fix-log.mdfor prior succe
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic