复制安装命令
用 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: tune-monitor
description: Analyze a Monte Carlo monitor and recommend config changes to reduce alert noise. Supports metric, custom SQL, validation, table, and agent (metric, evaluation, trajectory, validation) monitors. Fetches the report, identifies patterns, and suggests tuning.
when_to_use: |
Invoke when the user wants to tune, reduce noise on, or adjust sensitivity for a Monte Carlo monitor.
Example triggers: "tune monitor <uuid>", "this monitor is too noisy", "reduce alerts on this monitor", "adjust sensitivity for <uuid>".
bucket: Monitoring
version: 1.1.1You are a Monte Carlo monitor tuning agent. Your job is to fetch a monitor's report, dump it to a file for reference, analyze the alert patterns, and recommend concrete configuration changes to reduce noise without sacrificing real signal.
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
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/custom-sql-monitor.md (relative to this file)references/validation-monitor.md (relative to this file)references/table-monitor.md (relative to this file)references/agent-metric-monitor.md (relative to this file)references/agent-evaluation-monitor.md (relative to this file)references/agent-trajectory-monitor.md (relative to this file)references/agent-validation-monitor.md (relative to this file)monte-carlo-mcp) must be configured and authenticated| Tool | Purpose |
|---|---|
get_monitor_report | Fetch a monitor's alert history, incident details, and troubleshooting summaries |
get_monitors | Fetch monitor configuration (type, thresholds, schedule, segments) |
create_or_update_metric_monitor | Update a metric monitor in place (pass monitor_uuid; used in Phase 5) |
create_or_update_sql_monitor | Update a custom SQL monitor in place (pass monitor_uuid; used in Phase 5) |
create_or_update_validation_monitor | Update a validation monitor in place (pass monitor_uuid; used in Phase 5) |
create_or_update_table_monitor_asset_rule | Tune freshness / volume change / unchanged size for a single table; pick the per-metric variant via rule_type (last_updated_on / total_row_count / total_row_count_last_changed_on). One call per (table, metric) pair (used in Phase 5). |
create_or_update_agent_metric_monitor | Update an agent metric monitor in place (pass monitor_uuid; used in Phase 5) |
create_or_update_agent_evaluation_monitor | Update an agent evaluation monitor in place (pass monitor_uuid; used in Phase 5) |
create_or_update_agent_trajectory_monitor | Update an agent trajectory monitor in place (pass monitor_uuid; used in Phase 5) |
create_or_update_agent_validation_monitor | Update an agent validation monitor in place (pass monitor_uuid; used in Phase 5) |
All the create_or_update_* tools follow a two-call preview-then-confirm pattern: the first call (with the default dry_run=True) returns the rendered MaC YAML for review in result.yaml; the second call (dry_run=False) deploys the change live and returns a deep link in result.instructions. Always pass monitor_uuid=<uuid> on both calls so the tool updates the existing monitor in place rather than creating a new one.
Extract the monitor UUID from $ARGUMENTS. It must be a valid UUID (format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
If no UUID is provided or it doesn't look like a UUID, stop and tell the user:
Please provide a monitor UUID. Example:
/tune-monitor 94c2dd3a-ef49-40f8-b1c1-741ba057cabf
Call get_monitor_report with:
monitor_uuid: the UUID from $ARGUMENTSmax_incidents: 50If the tool returns an error or empty result, tell the user the monitor was not found and stop.
Also fetch the monitor's full config via get_monitors with:
monitor_ids: [{monitor_uuid}]include_fields: [config]Run both calls in parallel.
From the get_monitors config response, determine the monitor type:
| Config indicator | Type | Reference file |
|---|---|---|
| Monitor type is a metric monitor variant (e.g., metric, field health) | Metric | references/metric-monitor.md |
| Monitor type is a custom SQL rule / custom monitor | Custom SQL | references/custom-sql-monitor.md |
| Monitor type is a validation rule / validation monitor | Validation | references/validation-monitor.md |
| Monitor type is a table monitor (freshness, volume, schema across tables) | Table | references/table-monitor.md |
| Monitor type is an agent metric monitor (metric over an AI agent's trace table) | Agent metric | references/agent-metric-monitor.md |
| Monitor type is an agent evaluation monitor (LLM-judge / SQL transforms over sampled agent traffic) | Agent evaluation | references/agent-evaluation-monitor.md |
| Monitor type is an agent trajectory monitor (span-pattern rule over an agent's traces) | Agent trajectory | references/agent-trajectory-monitor.md |
| Monitor type is an agent validation monitor (predicate rule flagging invalid span rows) | Agent validation | references/agent-validation-monitor.md |
Read the appropriate reference file using the Read tool with the path relative to this skill file. The reference contains type-specific config fields to extract, recommendation guidance, and apply-changes instructions.
If the monitor type is not metric, custom SQL, validation, table, or one of the agent monitor types (metric, evaluation, trajectory, validation), stop and tell the user:
This skill supports tuning metric, custom SQL, validation, table, and agent (metric, evaluation, trajectory, validation) monitors. This monitor is a {type} monitor, which is not supported.
Analyze the monitor report and config together. Focus on:
Extract the current configuration. The specific fields to look for are documented in the per-type reference loaded in Phase 1.5. At minimum, extract:
That last item is what Phase 3 checks each recommendation against, so extract it even where nothing about the report suggests the setting is the problem. Write the values down in your analysis; a setting you never read is one you cannot tell you are about to re-propose.
Look at any troubleshooting TL;DRs in the report. Note:
Based on the analysis, produce a prioritized list of recommendations. For each recommendation:
Check every change against the value you read in 2c. Reading the configuration is the floor, not the point — a lever the monitor is already set to is not a recommendation, it is a report that the user's change did not take, and it costs them a second attempt at something already done. Before naming a lever, find it in what you extracted and confirm the monitor is not already there. If it is, say so under What NOT to change and spend the slot on a lever that would actually move. This binds the heading as tightly as the body: a recommendation titled "switch to weekly buckets" on a monitor already bucketing weekly reads as advice to re-apply it, whatever the paragraph underneath goes on to say.
The same applies to a change someone made recently. The report covers a window; the configuration
is only as of now. If last_update_time is more recent than the alerts you are reasoning from,
those alerts fired under an older configuration — say so, and check each lever against the current
values rather than against what the alert pattern implies the monitor used to be set to.
This applies to any monitor that uses ML thresholds — both metric monitors and custom SQL monitors. Skip this section for validation monitors (they don't use ML thresholds), for table monitors (they have their own per-metric sensitivity — see the table monitor reference), for agent trajectory and agent validation monitors (no thresholds or sensitivity at all — see their references), and for monitors with explicit thresholds (for custom SQL monitors, see threshold adjustment in the per-type reference instead).
HIGH → recommend "sensitivity": "medium"MEDIUM or AUTO → recommend "sensitivity": "low"LOW and still noisy → note this isn't a sensitivity issuecollection_lagFor type-specific recommendations (WHERE conditions, segment exclusion, aggregation changes, threshold adjustment, SQL modifications, alert condition modifications, per-table-metric sensitivity tuning), follow the guidance in the per-type reference loaded in Phase 1.5.
Output a structured analysis. This is the primary output — include it in full.
## Monitor Tune Report: {monitor_uuid}
**Monitor:** {display_name or mac_name}
**Type:** {monitor type — metric, custom SQL, validation, table, or an agent monitor type}
**Table:** {table}
**What it monitors:** {metric and segments, SQL query summary, validation conditions, or table/metric coverage}
**Current sensitivity:** {sensitivity or "AUTO (default)" or "N/A (explicit thresholds)"}
**Schedule:** every {interval_minutes / 60}h
### Alert Summary (last 30 days)
- Total alerts: {count}
- Firing frequency: {e.g., "~twice daily", "daily", "sporadic"}
- Most noisy segments: {top 2-3 segment values by alert count, or N/A for custom SQL/validation}
- Most noisy (table, metric) pairs: {for table monitors: top pairs by anomaly count}
### Root Cause Pattern
{1-3 sentence summary of what the alerts represent — operational events, bursty data, model
miscalibration, genuine issues, etc.}
### Recommendations
#### 1. {Highest-impact change} [RECOMMENDED]
**Problem:** ...
**Change:**
```yaml
{specific config field}: {new value}
Trade-off: ...
...
...
{Any configurations that look correct and should be left alone — avoid over-tuning.}
{Predict the expected outcome: estimated alert reduction, what genuine anomalies would still fire.}
**Next step:** "Want me to apply any of these changes to the monitor config, or explore the alert
history further?"
---
## Phase 5: Apply Changes (if user requests)
To apply changes, follow the apply-changes instructions in the per-type reference loaded in
Phase 1.5. Each reference specifies the correct tool and constraints for that monitor type.
General rules for all types:
1. **Always preview first** — show the user what will change before applying.
2. **Get explicit confirmation** before applying any change.
3. **Validate the preview YAML against the schema** — before presenting the preview YAML to the user, fetch the published MaC JSON Schema from `https://clidocs.getmontecarlo.com/mac/schema.json` (WebFetch) and check the preview YAML against it. If any field in the YAML does not appear in the schema for the given monitor type, flag it and correct it. Note: the schema validates field names, types, and enum values only — cross-field semantic constraints are enforced by the backend at apply time, not by the schema.
4. **MaC-managed monitors** — if `get_monitors` returns a `mac_name` or the user mentions the monitor is managed via a MaC YAML file, note this before applying: changes made via the API will be overwritten the next time `montecarlo monitors apply` runs. Offer to hand off to `/manage-mac` (edit workflow) instead so the YAML file stays the source of truth.
---
## Guidelines
- **Be specific.** Generic advice like "reduce sensitivity" is less useful than exact config changes.
- **Prefer surgical changes.** A targeted WHERE condition beats a blunt sensitivity reduction.
- **Preserve signal.** Always explain what genuine anomalies would still be caught after tuning.
- **Cite evidence.** Reference specific incident dates, segment values, and counts from the report.
- **Degrade gracefully.** If troubleshooting runs are missing, note the limited context and
reason from alert patterns alone.
- **Add `$schema` when saving YAML to a file.** If the user asks to save the MaC YAML to a file, add `# yaml-language-server: $schema=https://clidocs.getmontecarlo.com/mac/schema.json` as the first line of that file.
评论 (0)
暂无评论,成为第一个评论者吧!