Tip: This skill works well with Sonnet. Run /model sonnet before invoking for faster generation.
Generate a SQL Notebook with validation queries for dbt changes.
Arguments: $ARGUMENTS
The import URL contains reversible notebook SQL and metadata. Review the destination and content before --open; no automatic browser import is performed. Require trusted base/head compiled relation metadata rather than treating the helper’s hardcoded PROD convention as authoritative.
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Use this skill when the user wants to validate dbt model or snapshot changes with Monte Carlo SQL Notebook queries, either from a GitHub PR or a local dbt repository.
Parse the arguments:
--mc-base-url <URL> — defaults to https://getmontecarlo.com--models <model1,model2,...> — comma-separated list of model filenames (without .sql extension) to generate queries for. Only these models will be included. By default, all changed models are included up to a maximum of 10.Prerequisites:
gh (GitHub CLI) — required for PR mode. Must be authenticated (gh auth status).python3 — required for helper scripts.pyyaml — install with pip3 install pyyaml (or pip install pyyaml, uv pip install pyyaml, etc.)Dialect gate: These templates require warehouse-specific review for identifiers, composite distinct, timestamps and intervals. LIMIT bounds returned rows, not scan cost. Use read-only credentials, timeouts and scan budgets; do not execute queries as part of notebook generation.
This skill includes two helper scripts in ${CLAUDE_PLUGIN_ROOT}/skills/monte-carlo-validation-notebook/scripts/:
resolve_dbt_schema.py - Resolves dbt model output schemas from dbt_project.yml routing rules and model config overrides.generate_notebook_url.py - Encodes notebook YAML into a base64 import URL and opens it in the browser.Auto-detect mode from the target argument:
:// or github.com) -> PR mode., /path/to/repo, relative path) -> Local modeThis command generates a SQL Notebook containing validation queries for dbt changes. The notebook can be opened in the MC Bridge SQL Notebook interface for interactive validation.
The output is an import URL that opens directly in the notebook interface:
<MC_BASE_URL>/notebooks/import#<base64-encoded-yaml>
Key Features:
text parameters (prod_db and dev_db) for selecting databasesdbt_project.yml and model configs{{prod_db}}.<SCHEMA>.<TABLE>{{prod_db}} vs {{dev_db}}Key structure:
version: 1
metadata:
id: string # kebab-case + random suffix
name: string # display name
created_at: string # ISO 8601
updated_at: string # ISO 8601
default_context: # optional database/schema context
database: string
schema: string
cells:
- id: string
type: sql | markdown | parameter
content: string # SQL, markdown, or parameter config (JSON)
display_type: table | bar | timeseries