复制安装命令
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
Monte Carlo's official toolkit for AI coding agents.
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
来源文件:README.md
Monte Carlo's official toolkit for AI coding agents. Brings data observability — lineage, monitoring, validation, alerting, and metadata ingestion — directly into your development workflow. The toolkit bundles multiple skills into a single plugin that works across supported editors.
Using Claude.ai (web or desktop) instead of a coding agent? Monte Carlo is a verified connector in the Claude directory — install it directly.
The toolkit bundles the following capabilities as a single mc-agent-toolkit plugin. Each feature is a skill that can also be used standalone.
Skills are grouped by the job they help you do. Orchestrated workflows sequence individual skills into guided multi-step flows; atomic skills can be invoked directly by name. Both are loaded the same way.
| Skill | Description | Details |
|---|---|---|
| Asset Health | Single-table health report: freshness, active alerts, monitor coverage, importance, and upstream issues. Run before building on a table. | README |
| Skill | Description | Details |
|---|---|---|
| Incident Response (workflow) | Orchestrates full incident lifecycle — triage → root cause → remediation → prevent recurrence. | SKILL |
| Automated Triage | Scores and prioritizes active alerts; runs deep troubleshooting on high-signal ones. | SKILL |
| Analyze Root Cause | Investigates incidents via lineage tracing, ETL checks, query analysis, and data profiling. | README |
| Remediation | Proposes and executes fixes for data-quality alerts; assesses blast radius before acting, or escalates with full context. | README |
| Troubleshoot Agent Traces | Investigates AI-agent alerts (evaluation, metric, trajectory, validation) and agent traces — kicks off the trace troubleshooting agent and guides a backend-aware manual investigation. | README |
| Skill | Description | Details |
|---|---|---|
| Proactive Monitoring (workflow) | Sequences coverage analysis → gap identification → monitor creation into a guided flow. | SKILL |
| Monitoring Advisor | Identifies coverage gaps and creates monitors for warehouse tables or AI agents — validates tables and fields against your live workspace, emits monitors-as-code YAML. | README |
| Manage MaC | Create, edit, validate, and import Monitors-as-Code YAML files — authors new monitors from scratch, modifies existing files, validates against the published JSON Schema, and exports live monitors to YAML. | SKILL |
| Tune Monitor | Recommends sensitivity, segment, and schedule changes to reduce alert noise on an existing metric monitor. | SKILL |
| Skill | Description | Details |
|---|---|---|
| Prevent | Edit-lifecycle safety net for dbt/SQL: surfaces blast radius and monitor gaps before edits, generates monitors-as-code for new logic. Auto-activates via hooks. | README |
| Generate Validation Notebook | Generates targeted SQL validation queries for a dbt PR or local repo change. | README |
| Skill | Description | Details |
|---|---|---|
| Storage Cost Analysis | Identifies storage waste (unread, zombie, dead-end tables); uses lineage to verify cleanup is safe and estimates savings. | README |
| Performance Diagnosis | Diagnoses slow pipelines and expensive queries across Airflow, dbt, Databricks, and other platforms. | README |
| Skill | Description | Details |
|---|---|---|
| Push Ingestion | Generates collection scripts to push metadata, lineage, or query logs to Monte Carlo from any data source. | README |
| Connection Auth Rules | Builds Connection Auth Rules JSON for a Monte Carlo connection type using live connector schemas. | SKILL |
| Instrument Agent | Instruments a Python AI agent for Monte Carlo Agent Observability — detects AI libraries, installs the Monte Carlo OpenTelemetry SDK, sets up tracing, and verifies traces in Monte Carlo. Asks before editing. | SKILL |
Monte Carlo recommends installing the mc-agent-toolkit plugin. The plugin bundles all skills together with hooks, the Monte Carlo MCP server, and agent-specific capabilities — no separate MCP configuration or authentication setup needed. See the plugins page for the full list of supported coding agents.
/plugin marketplace add monte-carlo-data/mc-agent-toolkit
/plugin install mc-agent-toolkit@mc-marketplace
claude plugin update pulls in the latest skill and hook changes.See the Claude Code plugin README for detailed setup and usage.
For other coding agents (Cursor, Copilot CLI, OpenCode, Codex, Cortex Code), see the plugins page for installation guides.
Skills can also be used standalone without the plugin. This is for users who want to install individual skills via registries or use them with agents not listed above.
A Monte Carlo account with Editor role or above
Monte Carlo MCP server — configure with:
claude mcp add --transport http monte-carlo-mcp https://mcp.getmontecarlo.com/mcp
Then authenticate: run /mcp in your editor, select monte-carlo-mcp, and complete the OAuth flow.
See official docs for other MCP clients and advanced options.
If your MCP client doesn't support HTTP transport, use .mcp.json.example with npx mcp-remote and header-based authentication. See the MCP server docs for details.
npx skills add monte-carlo-data/mc-agent-toolkit --skill prevent
Or copy directly:
cp -r skills/prevent ~/.claude/skills/prevent
See the skills directory for the full list and individual READMEs.
All six editor plugins send an anonymous install beacon — a Toolkit Installed event carrying an opaque per-install UUID, a per-session UUID, the toolkit version, and the editor name — once per machine per toolkit version (first install and after each version change), so we can count installations and version adoption. The Claude Code and Cortex Code plugins additionally send anonymous skill-usage telemetry (which skills are invoked, how often). As of v1.13.3, the same install_id and toolkit version also ride as HTTP headers on authenticated MCP requests to the Monte Carlo MCP server, so the otherwise-anonymous install can be correlated with the account's MCP tool usage server-side. No prompts, skill arguments, or code are ever sent, and telemetry is fail-open and non-blocking. To disable all of it, set MC_AGENT_TOOLKIT_TELEMETRY_DISABLED=1. See each plugin's README (e.g. Claude Code, Cortex Code) for details.
See CONTRIBUTING.md for guidelines on adding skills, creating plugins, and submitting pull requests. It also covers plugin architecture and releasing new versions.
This project is licensed under the Apache-2.0 license — see LICENSE for details.
See SECURITY.md for reporting vulnerabilities.
name: monte-carlo-manage-mac
description: Create, edit, validate, and import Monitors-as-Code YAML files. CLI-first; falls back to MC MCP tools, then manual validation.
when_to_use: |
Invoke when the user has a MaC YAML file they want to create, edit, or validate, or when they
want to export live monitors into a MaC YAML file.
Example triggers: "create a monitors YAML for this table", "add a metric monitor to my MaC file",
"validate my monitors.yaml before I apply it", "what's wrong with my MaC file",
"export my existing monitors to YAML", "get my monitors into a file so I can commit them",
"import my live monitors to YAML", "get a MaC file from my existing monitors".
Do NOT invoke when the user wants to discover what to monitor or generate monitors from scratch
via table exploration — use monitoring-advisor for that.
bucket: Monitoring
version: 1.0.0You are a Monitors-as-Code (MaC) YAML authoring agent. Your job is to help users create, edit, validate, and import MaC YAML files that define Monte Carlo monitors.
Monte Carlo tool routing (required): Always call Monte Carlo MCP tools through this plugin's bundled server, whose fully-qualified tool names are
mcp__plugin_mc-agent-toolkit_monte-carlo-mcp__<tool>(e.g.mcp__plugin_mc-agent-toolkit_monte-carlo-mcp__get_alerts). Bare tool names used in this skill (get_alerts,search,get_table, …) refer to that bundled server. If the session also has a separately-configuredmonte-carlo-mcpserver, do not route to it — it may point at a different endpoint or credentials.
Arguments: $ARGUMENTS
Two external tools power this skill. Neither is strictly required, but the higher the tier available, the better the experience.
MC CLI (Tier 1)
pip install montecarlodatamontecarlo configure (requires a Monte Carlo API key — Settings → API keys → Add → Personal)Monte Carlo MCP server (Tier 2)
dry_run=True calls and resolving table metadataIf neither is available, the skill falls back to Tier 3 (Manual) — no setup required.
Use the highest available tier:
| Tier | Tool | Used for |
|---|---|---|
| 1 — CLI | montecarlo binary | Validate (compile), apply, import (convert-to-mac, export) |
| 2 — MCP | Monte Carlo MCP server | Author YAML shapes via dry_run=True, resolve table metadata |
| 3 — Manual | No external tools | Validate field names/enums/types when CLI unavailable |
Before starting any workflow, run:
montecarlo --version
If the command fails or is not found, inform the user:
"MC CLI is not installed. It enables local validation and streamlined apply/import. Install:
pip install montecarlodataConfigure:montecarlo configure(requires a Monte Carlo API key — Settings → API keys → Add → Personal) Would you like to set it up, or continue without it?"
If the user accepts, give the full install and configure steps, then resume the workflow once setup is complete. If the user declines, proceed using Tier 2 (MCP) and Tier 3 (Manual) only.
| User intent | Workflow |
|---|---|
| No existing file; wants monitors for a table or use case | Create |
| Has an existing file; wants to add, modify, or remove monitors | Edit |
| Has an existing file; wants to check it before applying | Validate |
| Wants to export live monitors into a MaC YAML file | Import |
| Wants to discover what to monitor or explore a table | Redirect to monitoring-advisor — do not proceed |
If ambiguous, ask which workflow is needed.
| Tool | Used for |
|---|---|
search | Resolve a table name to its MCON and full_table_id |
get_table | Verify column names and retrieve table schema |
get_warehouses | Resolve warehouse UUID |
create_or_update_metric_monitor | Author metric monitors (dry_run=True) |
create_or_update_sql_monitor | Author custom_sql monitors (dry_run=True) |
create_or_update_validation_monitor | Author validation monitors (dry_run=True) |
create_or_update_table_monitor | Author table monitors (dry_run=True) |
create_or_update_comparison_monitor | Author metric_comparison monitors (dry_run=True) |
get_validation_predicates | List valid predicates for validation monitors |
get_monitors | Fetch live monitors in YAML format (Import fallback) |
For monitor types without a dedicated MCP tool (json_schema, query_performance, bulk_monitor),
fall back to schema-based authoring. Never guess field names — derive them from the schema:
curl -s https://clidocs.getmontecarlo.com/mac/schema.json
Ask for any information not already provided:
field_health, dimension_tracking, field_quality,
comparison, freshness, or volume. If the user explicitly requests one of these,
decline: inform them it is no longer supported, and suggest the closest valid alternative
(e.g. freshness or volume → metric monitor tracking recency or row count;
field_quality → validation monitor; comparison → metric_comparison; field_health → metric).
Note: comparison (deprecated) and metric_comparison (current) are distinct — never
decline a request for a metric_comparison monitor.
Common phrases → monitor type: "null rate / percent null / zero rate / column distribution" → metric;
"validate email format / check values in set / regex match" → validation;
"query taking too long / slow queries" → query_performance.montecarlo monitors apply --namespace <namespace>metric: ask for the metric to track if not provided (e.g. row count, null rate, freshness, custom metric expression)custom_sql: ask for the SQL query if not providedjson_schema: ask for the field name to check if not providedFollow steps 1–3 from ../monitoring-advisor/references/data-monitor-creation.md to:
full_table_id via searchget_tableNever guess column names, warehouse UUIDs, or domain UUIDs.
For validation monitors, call get_validation_predicates to confirm the predicate names
available in the user's workspace before proceeding. If the result is empty, inform the user
that no validation predicates are configured in their workspace and stop.
For each monitor, call the appropriate create_or_update_*_monitor with dry_run=True and the
parameters the user specified. The backend returns a canonical YAML block — use that output as
the YAML for the file rather than authoring it by hand.
Call the tool once per monitor. Complete all dry_run calls before assembling the file. If an MCP tool returns an error, stop and surface the error message to the user. Do not proceed with a partial result.
# yaml-language-server: $schema=https://clidocs.getmontecarlo.com/mac/schema.json
montecarlo: as the root keyaudiences field (array of strings)
directly on each monitor objectPrompt for namespace if not already provided.
Tier 1 — CLI (preferred):
montecarlo monitors compile --namespace <namespace> # validate
montecarlo monitors apply --namespace <namespace> # deploy
Tier 3 fallback (CLI unavailable): Run the Validate workflow against the assembled YAML, then present the apply command for the user to run manually when CLI is available.
Use the Read tool to load the user's file. Ask for the path if not provided. If the Read tool returns an error (file not found), report it and ask for the correct path — do not create a new file silently.
Adding a monitor: Follow the Create workflow (Steps 1–4) to generate the new monitor block
via dry_run=True, then append it to the correct type list in the file.
Modifying a monitor: Call create_or_update_*_monitor(dry_run=True, name=<current_name>, ...)
with the updated parameters, preserving the existing name value. Use the returned YAML block
to replace the existing monitor entry. Do not look up or pass a UUID — in the MaC realm,
identity is the name field plus namespace.
Removing a monitor: Delete the monitor object and preserve all other monitors in the type list. If it is the only item under its type key, remove the entire type key — do not leave an empty list.
Deprecated field names: While reading the file, check for fields marked deprecated: true
in the schema. Scope this scan to the montecarlo: block only. If found, list all occurrences
and offer to migrate them in a single operation before applying other changes. Apply only after
explicit user confirmation. If the user declines, proceed with the requested edit without
migrating. The schema's description encodes the canonical replacement name
(e.g. "Deprecated. Use warehouse instead.") — never guess. If both the deprecated field and
its replacement are present with different values, flag the conflict and ask the user which to keep.
Deprecated monitor types (field_health, dimension_tracking, field_quality, comparison,
freshness, volume): cannot be mechanically migrated — offer to re-author with a supported type
via the Create workflow, then delete the deprecated block.
YAML-level fields (not part of the monitor definition sent to the backend): add or modify
these directly in the YAML without calling the MCP tool. Common examples: is_paused, labels,
tags, priority, audiences, data_quality_dimension, domains. Refer to the schema to
confirm others.
Show only what changed (before/after for modifications, new block for additions). Write the updated file using the Edit tool.
Ensure the # yaml-language-server: $schema=https://clidocs.getmontecarlo.com/mac/schema.json
header is the first line. Add it if missing.
If removing the last monitor of the last type, the file should contain only the
yaml-language-server header and montecarlo: {}.
Tier 1 — CLI (preferred):
montecarlo monitors compile --namespace <namespace> # validate
montecarlo monitors apply --namespace <namespace> # deploy
Tier 3 fallback (CLI unavailable): Run the Validate workflow against the updated file.
montecarlo monitors compile --namespace <namespace>
If this succeeds, report the output to the user and stop — no further LLM validation needed.
Use this path only if CLI is unavailable.
Fetch the schema — it is ~50KB and WebFetch truncates it, so use Bash:
curl -s https://clidocs.getmontecarlo.com/mac/schema.json
If Bash is unavailable, fall back to WebFetch — but coverage of validation, table,
query_performance, and bulk_monitor types may be incomplete.
If the schema cannot be fetched, stop and report:
Cannot fetch the MaC schema from
https://clidocs.getmontecarlo.com/mac/schema.json. Please check your network connection and try again.
Use the Read tool to load the user's file. Ask for the path if not provided.
For each monitor in the file, check:
required in the schema items is presentsensitivity is lowercase (high/medium/low), priority is uppercase
(P1–P5), data_quality_dimension is uppercase (ACCURACY, COMPLETENESS, CONSISTENCY,
TIMELINESS, UNIQUENESS, VALIDITY), alert_conditions[].operator is uppercase (GT,
GTE, LT, LTE, EQ, NEQ, AUTO, AUTO_HIGH, AUTO_LOW, INSIDE_RANGE,
OUTSIDE_RANGE, NOOP).montecarlo: must be present; its sub-keys must be valid monitor
type keys or notifications:. Extra top-level keys (e.g. dbt version:, models:) are
allowed and must not be flagged.Schema scope disclaimer: The schema validates field names, types, and enum values only.
Cross-field semantic constraints are enforced by the backend — a file that passes schema
validation may still be rejected by montecarlo monitors apply.
Type-specific reminders:
metric monitors use a nested data_source object (data_source.table), not a flat table
field. alert_conditions is required. sensitivity is only valid on metric.custom_sql monitors require both sql (the query string) and schedule.validation monitors have a singular alert_condition field whose value is a predicate tree.
The minimal valid structure requires type: GROUP, operator, and conditions with at least
one BINARY or UNARY node. Binary predicates require both left (field) and right
(value) nodes; unary predicates (not_null, is_not_empty) require only left.query_performance monitors have no table field — asset targeting uses a selection array.
alert_conditions items require threshold and metric fields; additionalProperties: false
applies — unknown fields like threshold_value or type will be flagged.table monitors have no flat table field — asset targeting uses asset_selection.notifications: is the NaC block — do not validate or modify its contents.bulk_monitor monitors use asset_selection for targeting, not a tables field.
Required fields: description, asset_selection, monitor_type, alert_conditions,
schedule. monitor_type enum: bulk_metric or bulk_pii — metric is not valid.Do not author new monitors of deprecated types. If the file contains them, validate what is present but do not add new instances.
If the file is valid:
The file is valid. Apply with:
montecarlo monitors apply --namespace <namespace>
If issues exist, report all in a single pass:
Validation issues found:
1. metric[0] ("orders_row_count")
- Missing required field: `description`
- Fix: add `description: "Row count for orders table"`
2. custom_sql[0] ("status_check")
- Unknown field: `sensitivity`
- Fix: remove — `sensitivity` is only valid on `metric` monitors
Deprecated field migration: List all occurrences of deprecated fields found (every instance, not just unique field names) and offer to migrate them. Apply only after explicit user confirmation.
Ask what to import:
Tier 1 — CLI (preferred):
montecarlo monitors export # export all
montecarlo monitors convert-to-mac # convert UI monitors to MaC YAML
Tier 2 — MCP fallback:
get_monitors(full_table_id="database.schema.table", config_format="yaml")
For broader imports, omit full_table_id and filter by other criteria (e.g. namespace).
If no monitors are returned, inform the user and stop — do not create an empty file.
montecarlo: blockname field. Keep the one
with a uuid (deployed version). If neither or both have UUIDs, keep the first and flag
the conflict.Show the assembled YAML and ask for a file path if not provided. If the user specifies an
existing file, read it first, merge by type list (deduplicating by name), and write the result.
For a new file, use the Write tool.
Remind the user:
These monitors are now defined in your repo. Once you run
montecarlo monitors apply, Monte Carlo will manage them as MaC resources identified by theirnamefield. Future edits should be made in this file, not in the UI.
If the user wants to validate before saving, run the Validate workflow first. To add monitors immediately after importing, transition to the Edit workflow retaining the file path and namespace.
# yaml-language-server: $schema=https://clidocs.getmontecarlo.com/mac/schema.json
as the first line
评论 (0)
暂无评论,成为第一个评论者吧!