Refactored commands to extract reusable skills following the Commands → Skills separation pattern. Each command is now <50 lines and references skill files for detailed knowledge. Plugins refactored: - claude-config-maintainer: 5 commands → 7 skills - code-sentinel: 3 commands → 2 skills - contract-validator: 5 commands → 6 skills - data-platform: 10 commands → 6 skills - doc-guardian: 5 commands → 6 skills (replaced nested dir) - git-flow: 8 commands → 7 skills Skills contain: workflows, validation rules, conventions, reference data, tool documentation Commands now contain: YAML frontmatter, agent assignment, skills list, brief workflow steps, parameters Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
dbt Workflow
Pre-Validation (MANDATORY)
Always run dbt_parse before any dbt operation.
This validates:
- dbt_project.yml syntax
- Model SQL syntax
- schema.yml definitions
- Deprecated syntax (dbt 1.9+)
If validation fails, show errors and STOP.
Model Selection Syntax
| Pattern | Meaning |
|---|---|
model_name |
Single model |
+model_name |
Model and upstream dependencies |
model_name+ |
Model and downstream dependents |
+model_name+ |
Model with all dependencies |
tag:name |
Models with specific tag |
path:models/staging |
Models in path |
test_type:schema |
Schema tests only |
test_type:data |
Data tests only |
Execution Workflow
- Parse:
dbt_parse- Validate project - Run:
dbt_run- Execute models - Test:
dbt_test- Run tests - Build:
dbt_build- Run + test together
Test Types
Schema Tests
Defined in schema.yml:
unique- No duplicate valuesnot_null- No null valuesaccepted_values- Value in allowed listrelationships- Foreign key integrity
Data Tests
Custom SQL in tests/ directory:
- Return rows that fail assertion
- Zero rows = pass, any rows = fail
Materialization Types
| Type | Description |
|---|---|
view |
Virtual table, always fresh |
table |
Physical table, full rebuild |
incremental |
Append/merge new rows only |
ephemeral |
CTE, no physical object |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Test/run failure |
| 2 | dbt error (parse failure) |
Result Formatting
=== dbt [Operation] Results ===
Project: [project_name]
Selection: [selection_pattern]
--- Summary ---
Total: X models/tests
PASS: X (%)
FAIL: X (%)
WARN: X (%)
SKIP: X (%)
--- Details ---
[Model/Test details with status]
--- Failure Details ---
[Error messages and remediation]