Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides creation of Monte Carlo monitors via MCP tools, producing monitors-as-code YAML for CI/CD deployment.
.claude/skills/monte-carlo-monitor-creation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-19 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-20 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
This skill teaches you to create Monte Carlo monitors correctly via MCP. Every creation tool runs in dry-run mode and returns monitors-as-code (MaC) YAML. No monitors are created directly -- the user applies the YAML via the Monte Carlo CLI or CI/CD.
Reference files live next to this skill file. Use the Read tool (not MCP resources) to access them:
references/metric-monitor.md (relative to this file)references/validation-monitor.md (relative to this file)references/custom-sql-monitor.md (relative to this file)references/comparison-monitor.md (relative to this file)references/table-monitor.md (relative to this file)Activate when the user:
Do not activate when the user is:
getMonitors directly)All tools are available via the monte-carlo MCP server.
| Tool | Purpose | | ---------------------------- | ---------------------------------------------------------- | | testConnection | Verify auth and connectivity before starting | | search | Find tables/assets by name; use include_fields for columns | | getTable | Schema, stats, metadata, domain membership, capabilities | | getValidationPredicates | List available validation rule types for a warehouse | | getDomains | List MC domains (only needed if table has no domain info) | | createMetricMonitorMac | Generate metric monitor YAML (dry-run) | | createValidationMonitorMac | Generate validation monitor YAML (dry-run) | | createComparisonMonitorMac | Generate comparison monitor YAML (dry-run) | | createCustomSqlMonitorMac | Generate custom SQL monitor YAML (dry-run) | | createTableMonitorMac | Generate table monitor YAML (dry-run) |
| Type | Tool | Use When | | -------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Metric | createMetricMonitorMac | Track statistical metrics on fields (null rates, unique counts, numeric stats) or row count changes over time. Requires a timestamp field for aggregation. | | Validation | createValidationMonitorMac | Row-level data quality checks with conditions (e.g. "field X is never null", "status is in allowed set"). Alerts on INVALID data. | | Custom SQL | createCustomSqlMonitorMac | Run arbitrary SQL returning a single number and alert on thresholds. Most flexible; use when other types don't fit. | | Comparison | createComparisonMonitorMac | Compare metrics between two tables (e.g. dev vs prod, source vs target). | | Table | createTableMonitorMac | Monitor groups of tables for freshness, schema changes, and volume. Uses asset selection at database/schema level. |
Follow these steps in order. Do NOT skip steps.
The number one error pattern is agents skipping validation and calling a creation tool with guessed or incomplete parameters. Every field in the creation call must be grounded in data retrieved during this phase. Do not proceed to Step 4 until Steps 1-3 are fully satisfied.
Ask yourself:
If the user's intent is unclear, ask a focused question before proceeding.
If you don't have the table MCON:
search with the table name and include_fields: ["field_names"] to find the MCON and get column names.database:schema.table, search for it.getTable with include_fields: true and include_table_capabilities: true to verify capabilities and get domain info.If you already have the MCON:
getTable with the MCON, include_fields: true, and include_table_capabilities: true.CRITICAL: You need the actual column names from getTable results. NEVER guess or hallucinate column names. This is the most common source of monitor creation failures.
For monitor types that require a timestamp column (metric monitors), review the column names and identify likely timestamp candidates. Present them to the user if ambiguous.
Monitors must be assigned to a domain that contains the table being monitored. The getTable response includes a domains list with uuid and name.
domains is empty: skip domain assignment.domains has exactly one entry: default domain_id to that domain's UUID.domains has multiple entries: present only those domains and ask the user to pick.Do NOT present all account domains as options -- only domains that contain the table are valid.
ALWAYS check the table's domains BEFORE calling any creation tool.
Only enter this phase after the validation phase is complete with real data from MCP tools.
Based on the monitor type, read the detailed reference for parameter guidance:
references/metric-monitor.md (relative to this file)references/validation-monitor.md (relative to this file)references/custom-sql-monitor.md (relative to this file)references/comparison-monitor.md (relative to this file)references/table-monitor.md (relative to this file)Skip this step for table monitors. Table monitors do not support the schedule field in MaC YAML — adding it will cause a validation error on montecarlo monitors apply. Table monitor scheduling is managed automatically by Monte Carlo.
For all other monitor types, the creation tools default to a fixed schedule running every 60 minutes. Present these options:
interval_minutes (30, 60, 90, 120, 360, 720, 1440, etc.)Schedule format in MaC YAML:
schedule: { type: fixed, interval_minutes: <N> }schedule: { type: dynamic }schedule: { type: loose, start_time: "00:00" }Before calling the creation tool, present the monitor configuration in plain language:
Ask: "Does this look correct? I'll generate the monitor configuration."
NEVER call the creation tool without user confirmation.
Call the appropriate creation tool with the parameters built in previous steps. Always pass an MCON when possible. If only table name is available, also pass warehouse.
CRITICAL: Always include the YAML in your response. The user needs copy-pasteable YAML.
yaml code block.The YAML returned by creation tools is the monitor definition. It must be wrapped in the standard MaC structure to be applied:
yamlmontecarlo: <monitor_type>: - <returned yaml>
For example, a metric monitor would look like:
yamlmontecarlo: metric: - <yaml returned by createMetricMonitorMac>
Important: montecarlo.yml (without a directory path) is a separate Monte Carlo project configuration file -- it is NOT the same as a monitor definition file. Monitor definitions go in their own .yml files, typically in a monitors/ directory or alongside dbt model schema files.
Tell the user:
.yml file (e.g. monitors/<table_name>.yml or in their dbt schema)montecarlo monitors apply --namespace <namespace>getTable.aggregate_time_field MUST be a real timestamp column from the table.domains BEFORE calling any creation tool.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 13 counted toward the lift figure. The other 9 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +23 percentage points is the difference between those two pass rates over the 13 comparable cases. 7 cases got worse with the skill loaded, and they are included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.