Logo Monte Carlo Manage Mac

Monte Carlo Manage Mac

Tổ chức
monte-carlo-data
monte-carlo-manage-mac

Create, edit, validate, and import Monitors-as-Code YAML files. CLI-first; falls back to MC MCP tools, then manual validation.

Tổng quan

Nhà phát hànhmonte-carlo-data
Kho mãmc-agent-toolkit
Tên kỹ năngmonte-carlo-manage-mac
Sao
93
Bản fork
5
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được monte-carlo-data công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Monte Carlo Manage Mac trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/manage-mac
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/monte-carlo-data/mc-agent-toolkit.git /tmp/mc-agent-toolkit
mkdir -p .claude/skills
cp -r /tmp/mc-agent-toolkit/skills/manage-mac .claude/skills/monte-carlo-manage-mac
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Monte Carlo Manage Mac trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Monte Carlo Manage Mac ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Monte Carlo Manage Mac với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Manage MaC: Monitors-as-Code YAML Authoring

You 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-configured monte-carlo-mcp server, do not route to it — it may point at a different endpoint or credentials.

Arguments: $ARGUMENTS


Prerequisites

Two external tools power this skill. Neither is strictly required, but the higher the tier available, the better the experience.

MC CLI (Tier 1)

Monte Carlo MCP server (Tier 2)

If neither is available, the skill falls back to Tier 3 (Manual) — no setup required.


Tooling tiers

Use the highest available tier:

TierToolUsed for
1 — CLImontecarlo binaryValidate (compile), apply, import (convert-to-mac, export)
2 — MCPMonte Carlo MCP serverAuthor YAML shapes via dry_run=True, resolve table metadata
3 — ManualNo external toolsValidate field names/enums/types when CLI unavailable

CLI check

Before starting any workflow, run:

bash
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 montecarlodata Configure: 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.


Entry point detection

User intentWorkflow
No existing file; wants monitors for a table or use caseCreate
Has an existing file; wants to add, modify, or remove monitorsEdit
Has an existing file; wants to check it before applyingValidate
Wants to export live monitors into a MaC YAML fileImport
Wants to discover what to monitor or explore a tableRedirect to monitoring-advisor — do not proceed

If ambiguous, ask which workflow is needed.


MCP tools reference

ToolUsed for
searchResolve a table name to its MCON and full_table_id
get_tableVerify column names and retrieve table schema
get_warehousesResolve warehouse UUID
create_or_update_metric_monitorAuthor metric monitors (dry_run=True)
create_or_update_sql_monitorAuthor custom_sql monitors (dry_run=True)
create_or_update_validation_monitorAuthor validation monitors (dry_run=True)
create_or_update_table_monitorAuthor table monitors (dry_run=True)
create_or_update_comparison_monitorAuthor metric_comparison monitors (dry_run=True)
get_validation_predicatesList valid predicates for validation monitors
get_monitorsFetch 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:

bash
curl -s https://clidocs.getmontecarlo.com/mac/schema.json

Create workflow

Step 1: Gather context

Ask for any information not already provided:

  1. Table(s): fully qualified name (database.schema.table or equivalent)
  2. Monitor type(s): what kind of monitoring — metric, validation, custom SQL, etc. Do not suggest deprecated types: 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.
  3. Namespace: used with montecarlo monitors apply --namespace <namespace>
  4. Notification audiences: optional — ask only if the user mentions alerting
  5. Type-specific required inputs:
    • 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 provided
    • json_schema: ask for the field name to check if not provided

Step 2: Resolve table and field metadata (Tier 2 — MCP)

Follow steps 1–3 from ../monitoring-advisor/references/data-monitor-creation.md to:

  • Resolve the MCON and full_table_id via search
  • Verify column names via get_table
  • Resolve domain UUID and warehouse UUID

Never 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.

Step 3: Author YAML blocks (Tier 2 — MCP)

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.

Step 4: Assemble the YAML file

  1. Add the yaml-language-server header as the first line:
    yaml
    # yaml-language-server: $schema=https://clidocs.getmontecarlo.com/mac/schema.json
  2. Open with montecarlo: as the root key
  3. Group the dry_run output blocks by monitor type under their respective keys
  4. If the user specified notification audiences, add the audiences field (array of strings) directly on each monitor object

Step 5: Validate and apply

Prompt for namespace if not already provided.

Tier 1 — CLI (preferred):

bash
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.


Edit workflow

Step 1: Read the file

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.

Step 2: Understand the requested change

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.

Step 3: Write and validate

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):

bash
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.


Validate workflow

Step 1: Try CLI first (Tier 1)

bash
montecarlo monitors compile --namespace <namespace>

If this succeeds, report the output to the user and stop — no further LLM validation needed.

Step 2: Manual validation fallback (Tier 3 — no external tools)

Use this path only if CLI is unavailable.

Fetch the schema — it is ~50KB and WebFetch truncates it, so use Bash:

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.

Step 3: Read the file

Use the Read tool to load the user's file. Ask for the path if not provided.

Step 4: Validate against the schema

For each monitor in the file, check:

  1. Required fields present: every field marked required in the schema items is present
  2. No unknown fields: no field names that don't appear in the schema for that monitor type
  3. Enum values valid: validate against the schema, not memory. Enums are case-sensitive and vary by field: sensitivity 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).
  4. Type correctness: string fields are strings, integer fields are integers, etc.
  5. Top-level structure: 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.

Step 5: Report findings

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.


Import workflow

Step 1: Identify the source

Ask what to import:

  • A specific table: "Which table? Provide the full name (database.schema.table)"
  • A namespace or group: "Any filters? (table name pattern, monitor type, namespace)"

Step 2: Fetch monitors

Tier 1 — CLI (preferred):

bash
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.

Step 3: Assemble the YAML file

  1. Add the yaml-language-server header as the first line
  2. Group returned monitors by type under a single montecarlo: block
  3. Deduplicate: two monitors are duplicates if they share the same name field. Keep the one with a uuid (deployed version). If neither or both have UUIDs, keep the first and flag the conflict.
  4. Scan for deprecated field names; offer to migrate before saving
  5. Prompt for a namespace if not provided

Step 4: Present and save

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 their name field. 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.


File format rules

  • Always include # yaml-language-server: $schema=https://clidocs.getmontecarlo.com/mac/schema.json as the first line
  • Use 2-space indentation
  • Quote string values that contain special characters or colons
  • Do not add inline comments explaining field values

Câu hỏi thường gặp

Kỹ năng AI Monte Carlo Manage Mac làm được gì?

Create, edit, validate, and import Monitors-as-Code YAML files. CLI-first; falls back to MC MCP tools, then manual validation.

Vì sao nên dùng Monte Carlo Manage Mac trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Monte Carlo Manage Mac là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Monte Carlo Manage Mac trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/manage-mac. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Monte Carlo Manage Mac?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Monte Carlo Manage Mac với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Monte Carlo Manage Mac với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Monte Carlo Manage Mac có miễn phí không?

Có. Kỹ năng này được monte-carlo-data phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇