monte-carlo-monitor-creation – skill DevOps & Hạ tầng cho agent AI
Hướng dẫn tạo monitor Monte Carlo qua công cụ MCP, tạo YAML monitors-as-code để triển khai CI/CD.
Cài skill monte-carlo-monitor-creation bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/monte-carlo-monitor-creation-da508.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /monte-carlo-monitor-creation – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/monte-carlo-monitor-creation-da508.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $monte-carlo-monitor-creation – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/monte-carlo-monitor-creation-da508.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /monte-carlo-monitor-creation – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/monte-carlo-monitor-creation-da508.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /monte-carlo-monitor-creation – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Monte Carlo Monitor Creation Skill
This skill teaches you to create Monte Carlo monitors correctly via MCP. The documented *Mac tools generate monitors-as-code (MaC) YAML. Verify the
connected tool schema and dry-run behavior before calling them; tool names alone
are not proof of read-only behavior. Deployment via CLI/CI is a separate action
requiring the user's authorized target and scope.
Reference files live next to this skill file. Use the Read tool (not MCP resources) to access them:
- Metric monitor details:
references/metric-monitor.md(relative to this file) - Validation monitor details:
references/validation-monitor.md(relative to this file) - Custom SQL monitor details:
references/custom-sql-monitor.md(relative to this file) - Comparison monitor details:
references/comparison-monitor.md(relative to this file) - Table monitor details:
references/table-monitor.md(relative to this file)
When to activate this skill
Activate when the user:
- Asks to create, add, or set up a monitor (e.g. "add a monitor for...", "create a freshness check on...", "set up validation for...")
- Mentions monitoring a specific table, field, or metric
- Wants to check data quality rules or enforce data contracts
- Asks about monitoring options for a table or dataset
- Requests monitors-as-code YAML generation
- Wants to add monitoring after new transformation logic (when the prevent skill is not active)
When NOT to activate this skill
Do not activate when the user is:
- Just querying data or exploring table contents
- Triaging or responding to active alerts (use the prevent skill's Workflow 3)
- Running impact assessments before code changes (use the prevent skill's Workflow 4)
- Asking about existing monitor configuration (use
getMonitorsdirectly) - Editing or deleting existing monitors
---
Available MCP tools
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) |
---
Monitor types
| 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. |
---
Procedure
Follow these steps in order. Do NOT skip steps.
Validation Phase (Steps 1-3) -- MUST complete before any creation tool is called
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.
Step 1: Understand the request
Ask yourself:
- What does the user want to monitor? (a specific table, a metric, a data quality rule, cross-table consistency, freshness/volume at schema level)
- Which monitor type fits? Use the monitor types table above.
- Does the user have all the details, or do they need guidance?
If the user's intent is unclear, ask a focused question before proceeding.
Step 2: Identify the table(s) and columns
If you don't have the table MCON:
1. Use search with the table name and include_fields: ["field_names"] to find the MCON and get column names.
2. If the user provided a full table ID like database:schema.table, search for it.
3. Once you have the MCON, call getTable with include_fields: true and include_table_capabilities: true to verify capabilities and get domain info.
If you already have the MCON:
1. Call 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.
Step 3: Handle domain assignment
Monitors must be assigned to a domain that contains the table being monitored. The getTable response includes a domains list with uuid and name.
1. If domains is empty: skip domain assignment.
2. If domains has exactly one entry: default domain_id to that domain's UUID.
3. If 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.
---
Creation Phase (Steps 4-8)
Only enter this phase after the validation phase is complete with real data from MCP tools.
Step 4: Load the sub-skill reference
Based on the monitor type, read the detailed reference for parameter guidance:
- Metric -- Read the detailed reference:
references/metric-monitor.md(relative to this file) - Validation -- Read the detailed reference:
references/validation-monitor.md(relative to this file) - Custom SQL -- Read the detailed reference:
references/custom-sql-monitor.md(relative to this file) - Comparison -- Read the detailed reference:
references/comparison-monitor.md(relative to this file) - Table -- Read the detailed reference:
references/table-monitor.md(relative to this file)
Step 5: Ask about scheduling
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 other monitor types, check the loaded reference and connected tool schema
for valid scheduling defaults. Metric aggregation can require a longer interval;
do not overwrite a valid generated schedule with a generic 60-minute value.
Present supported options:
1. Fixed interval -- any integer for interval_minutes (30, 60, 90, 120, 360, 720, 1440, etc.)
2. Dynamic -- MC auto-determines when to run based on table update patterns.
3. Loose -- runs once per day.
Schedule format in MaC YAML:
- Fixed:
schedule: { type: fixed, interval_minutes: <N> } - Dynamic:
schedule: { type: dynamic } - Loose:
schedule: { type: loose, start_time: "00:00" }
Step 6: Confirm with the user
Before calling the creation tool, present the monitor configuration in plain language:
- Monitor type
- Target table (and columns if applicable)
- What it checks / what triggers an alert
- Domain assignment
- Schedule
Ask: "Does this look correct? I'll generate the monitor configuration."
NEVER call the creation tool without user confirmation.
Step 7: Create the monitor
Call the appropriate creation tool with the parameters built in previous steps. Always pass an MCON
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- monte-carlo-monitoring-advisor – Phân tích độ phủ dữ liệu, tạo monitor cho bảng kho dữ liệu và AI agent. Bao gồm thiếu độ…
- multi-cloud-architecture – Khung quyết định và các mẫu kiến trúc để thiết kế ứng dụng trên AWS, Azure và GCP.
- mysql – Quản trị cơ sở dữ liệu MySQL/MariaDB. Cấu hình replication và tối ưu hiệu năng. Dùng khi…
- neon-functions – Hàm HTTP Node.js serverless chạy lâu, được triển khai lên nhánh Neon của bạn, với…
- new-relic – Cấu hình nền tảng quan sát New Relic để giám sát hạ tầng và ứng dụng.
- nfs-storage – Cấu hình máy chủ và máy khách NFS. Triển khai chia sẻ tệp qua mạng cho hệ thống Linux…
- noaa-radar-satellite-fetching – Tải sản phẩm NOAA NEXRAD và GOES từ kho lưu trữ đám mây công khai, chọn đúng site…
- observability-cloud-planning – Lập sổ đăng ký cloud, SLO và mức sẵn sàng ứng phó sự cố sau khi tiếp nhận yêu cầu. Dùng…