Audit a dbt project for what an AI agent will get wrong if you point it at the data today: wrong metric, wrong table, missed rows, broken joins. Produces one evidence-backed report with blockers, verification queries, and a safe starting perimeter.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Check whether documentation claims match what the SQL actually does. This is the highest-value deep pass check: it catches cases where an agent would trust the docs and get wrong answers.
You receive:
deep_pass_scope: list of model names to assessinventory_json: the canonical inventoryDo NOT read every model in the deep pass scope. Prioritize in this order:
Hard cap: Audit at most 40 models, even if the deep pass scope is larger. For large scopes, the top 40 by priority gives better coverage than rushing through 79.
Minimum: At least 5 models (or all if fewer than 5 are in scope).
Report coverage: Track exactly how many models you audited vs how many were in scope. Include these counts in the output JSON (models_audited array length vs models_in_scope count).
Large SQL files (>300 lines): Do not read the entire file. Read the final 150 lines first (the final SELECT and its immediate CTEs). If you need upstream context, search for specific CTE names referenced in the final SELECT. This prevents context exhaustion on models with 1000+ line SQL.
Your entire response must be a single raw JSON object. No markdown code fences, no commentary before or after.
Return EXACTLY this JSON structure:
{
"models_in_scope": 0,
"models_audited": ["model_a", "model_b"],
"models_skipped": ["model_c"],
"contradictions": [
{
"model": "model_name",
"type": "filter_mismatch|aggregation_mismatch|column_reference_mismatch|coalesce_hidden|scope_mismatch|measure_vs_sql",
"description_claim": "what the description says",
"sql_reality": "what the SQL actually does",
"impact": "what an agent would get wrong",
"confidence": "high|medium",
"file_path": "/path/to/file",
"approximate_line": 0
}
],
"possible_issues": [
{
"model": "model_name",
"observation": "what looks suspicious",
"reasoning": "why it might be a problem",
"confidence": "low"
}
]
}For each prioritized model:
Filter mismatches: Description says "all X" but SQL has a WHERE clause that excludes some X. Or description says "excludes Y" but SQL includes Y.
Aggregation mismatches: Description says "count of Z" but SQL does SUM. Or description says "average" but SQL does COUNT.
Column reference mismatches: Description references a column, table, or join that doesn't appear in the SQL.
Hidden COALESCEs: SQL has COALESCE or fallback defaults that the description doesn't mention. Data could silently be NULL or a default value.
Scope mismatches: Description implies a broader or narrower scope than the SQL implements (e.g., "all customers" vs SQL that filters to active only).
Measure-vs-SQL (if semantic layer exists): Semantic measure expr is inconsistent with the model's actual SQL logic.
possible_issues)Calibration: Only flag contradictions where you're confident the description and SQL disagree. Minor wording differences or vague descriptions are not contradictions. Be careful with CTEs: trace through the full query to understand what the final output includes.
.claude-plugin
.cursor-plugin
.tessl-plugin
examples
phases
scripts
test-fixtures
docs-context
fan-out-joins
manifest-forloop
target
messy-jaffle-shop
sql-edge-cases