monte-carlo-validation-notebook
Generates SQL validation notebooks for dbt PR changes with before/after comparison queries.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- monte-carlo-validation-notebook
- risk
- safe
- tags
- [ "data-observability", "validation", "dbt", "monte-carlo", "sql-notebook" ]
- tools
- [ "claude", "cursor", "codex" ]
- author
- monte-carlo-data
- source
- community
- category
- data
- date_added
- 2026-04-08
- description
- Generates SQL validation notebooks for dbt PR changes with before/after comparison queries.
- source_repo
- monte-carlo-data/mc-agent-toolkit
- source_type
- community
02 资源文件 3
- 参考文档references/detailed-guide.md21.0 KB
- 脚本scripts/generate_notebook_url.py4.7 KB
- 脚本scripts/resolve_dbt_schema.py5.9 KB
03 SKILL.md 正文
Tip: This skill works well with Sonnet. Run
/model sonnetbefore invoking for faster generation.
Generate a SQL Notebook with validation queries for dbt changes.
Arguments: $ARGUMENTS
Detailed Guide
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.
When to Use
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:
- Target (required): first argument — a GitHub PR URL or local dbt repo path
- MC Base URL (optional):
--mc-base-url <URL>— defaults tohttps://getmontecarlo.com - Models (optional):
--models <model1,model2,...>— comma-separated list of model filenames (without.sqlextension) to generate queries for. Only these models will be included. By default, all changed models are included up to a maximum of 10.
Setup
Prerequisites:
gh(GitHub CLI) — required for PR mode. Must be authenticated (gh auth status).python3— required for helper scripts.pyyaml— install withpip3 install pyyaml(orpip install pyyaml,uv pip install pyyaml, etc.)
Note: Generated SQL uses ANSI-compatible syntax that works across Snowflake, BigQuery, Redshift, and Athena. Minor adjustments may be needed for specific warehouse quirks.
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 fromdbt_project.ymlrouting rules and model config overrides.generate_notebook_url.py- Encodes notebook YAML into a base64 import URL and opens it in the browser.
Mode Detection
Auto-detect mode from the target argument:
- If target looks like a URL (contains
://orgithub.com) -> PR mode - If target is a path (
.,/path/to/repo, relative path) -> Local mode
Context
This 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:
- Database Parameters: Two
textparameters (prod_dbanddev_db) for selecting databases - Schema Inference: Automatically infers schema per model from
dbt_project.ymland model configs - Single-table queries: Basic validation queries using
{{prod_db}}.<SCHEMA>.<TABLE> - Comparison queries: Before/after queries comparing
{{prod_db}}vs{{dev_db}} - Flexible usage: Users can set both parameters to the same database for single-database analysis
Notebook YAML Spec Reference
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
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
04 同仓库更多 Skills
oath
Auditing regulatory compliance (SOC2/PCI-DSS/HIPAA/ISO 27001): maps requirements, checks controls, designs audit trails, implements Policy as Code. Use when compliance auditing is needed.
nexus
Orchestrating multi-specialist task chains and scope-adaptive product delivery: classifies intent, selects and executes the minimum viable chain, aggregates results, and verifies acceptance criteria. For multi-domain tasks, build-first delivery, and product lifecycle execution.
nest
Designing LLM-optimized folder structures: audits and restructures directories for context efficiency, progressive disclosure, and prompt cache performance. Not for general repo structure (Grove).
native
Implementing production iOS/Android/macOS native features (SwiftUI, Compose) and iterating a screen against a reference design. Not for cross-platform RN/Flutter (Port) or web (Artisan).
muse
Defining and managing design tokens, applying token systems to existing codebases, building design system foundations. Use for spacing, color, typography, dark mode, cross-platform output.
morph
Converting document formats (Markdown/Word/Excel/PDF/HTML) and generating reusable conversion scripts. Use for distributable specs, accessibility-compliant PDFs, or Pandoc/LibreOffice pipelines.