Skip to content

Commit 1fcbcbe

Browse files
wojtekdekaclaude
andauthored
YET-1269: /manage-mac skill — CLI-first MaC YAML authoring (#88)
## Summary Adds the `/manage-mac` skill for Monitors-as-Code YAML authoring — create, edit, validate, and import MaC YAML files from any MCP-compatible editor (Claude Code, Cursor, etc.). **CLI-first, 3-tier approach:** | 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 as last resort | The skill checks CLI availability at startup and prompts the user to install/configure if missing, then gracefully falls back through tiers. **Four workflows:** - **Create** — gather context, resolve table metadata via MCP, author YAML blocks via `dry_run=True`, compile + apply - **Edit** — add/modify/remove monitors; name-based identity (no UUID); deprecated field migration with confirmation - **Validate** — `montecarlo monitors compile` first; manual schema validation as fallback - **Import** — `montecarlo monitors export` / `convert-to-mac` first; `get_monitors` MCP as fallback **Deprecated type handling:** skill actively declines `field_health`, `dimension_tracking`, `field_quality`, `comparison`, `freshness`, `volume` and suggests the correct modern alternative. **Schema validation gates in `monitoring-advisor` and `tune-monitor`:** - Both skills now validate generated YAML against the published schema (`clidocs.getmontecarlo.com/mac/schema.json`) before presenting it to the user - `tune-monitor` also detects MaC-managed monitors and offers to hand off to `/manage-mac` to keep the YAML file as the source of truth **Follow-up:** YET-1310 — publish a clean schema without deprecated fields. ## Test plan - [ ] CLI available: create a metric monitor end-to-end — compile passes, apply command shown - [ ] CLI unavailable: validate falls back to manual tier, schema fetched via curl - [ ] Request deprecated type (`freshness`) — skill declines and suggests `metric` - [ ] Edit existing file — name preserved, no UUID lookup, diff shown - [ ] Import with `convert-to-mac` CLI path - [ ] Co-located dbt `schema.yml` — extra top-level keys not flagged - [ ] tune-monitor: generates YAML → schema validation runs before presenting to user - [ ] tune-monitor: MaC-managed monitor detected → offers to hand off to `/manage-mac` 🤖 Generated with [Claude Code](https://claude.ai/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dfdcdc1 commit 1fcbcbe

20 files changed

Lines changed: 474 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Skills are grouped by the job they help you do. Orchestrated workflows sequence
2929
|---|---|---|
3030
| **Proactive Monitoring** _(workflow)_ | Sequences coverage analysis → gap identification → monitor creation into a guided flow. | [SKILL](skills/proactive-monitoring/SKILL.md) |
3131
| **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](skills/monitoring-advisor/README.md) |
32+
| **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](skills/manage-mac/SKILL.md) |
3233
| **Tune Monitor** | Recommends sensitivity, segment, and schedule changes to reduce alert noise on an existing metric monitor. | [SKILL](skills/tune-monitor/SKILL.md) |
3334

3435
### Prevent — catch issues before they ship

plugins/claude-code/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mc-agent-toolkit",
3-
"version": "1.11.1",
3+
"version": "1.12.0",
44
"description": "Monte Carlo Agent Toolkit — data observability for AI coding agents. Surfaces blast radius, active alerts, and monitor coverage gaps before you edit dbt SQL. Includes skills for incident response, proactive monitoring, storage cost analysis, and push ingestion. Hooks enforce data-safety checks automatically as you work.",
55
"author": {
66
"name": "Monte Carlo",

plugins/claude-code/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to the Monte Carlo Agent Toolkit plugin for Claude Code will
55
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66
This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.12.0] - 2026-05-20
9+
10+
### Added
11+
12+
- New `/manage-mac` skill: create, edit, validate, and import Monitors-as-Code YAML files — CLI-first: uses `montecarlo monitors compile` to validate and `apply` to deploy; falls back to MC MCP tools then manual validation
13+
- Schema validation gates injected into `monitoring-advisor` and `tune-monitor` — agents now validate generated YAML against the published schema before presenting it to the user
14+
815
## [1.11.1] - 2026-05-13
916

1017
### Added
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../skills/manage-mac

plugins/codex/.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mc-agent-toolkit",
3-
"version": "1.11.1",
3+
"version": "1.12.0",
44
"description": "Monte Carlo Agent Toolkit — data observability skills and enforcement hooks for AI coding agents.",
55
"author": {
66
"name": "Monte Carlo",

plugins/codex/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to the Monte Carlo Agent Toolkit plugin for Codex will be do
55
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66
This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.12.0] - 2026-05-20
9+
10+
### Added
11+
12+
- New `/manage-mac` skill: create, edit, validate, and import Monitors-as-Code YAML files — CLI-first: uses `montecarlo monitors compile` to validate and `apply` to deploy; falls back to MC MCP tools then manual validation
13+
- Schema validation gates injected into `monitoring-advisor` and `tune-monitor` — agents now validate generated YAML against the published schema before presenting it to the user
14+
815
## [1.11.1] - 2026-05-13
916

1017
### Added

plugins/codex/skills/manage-mac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../skills/manage-mac

plugins/copilot/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to the Monte Carlo Agent Toolkit plugin for Copilot CLI will
55
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66
This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.12.0] - 2026-05-20
9+
10+
### Added
11+
12+
- New `/manage-mac` skill: create, edit, validate, and import Monitors-as-Code YAML files — CLI-first: uses `montecarlo monitors compile` to validate and `apply` to deploy; falls back to MC MCP tools then manual validation
13+
- Schema validation gates injected into `monitoring-advisor` and `tune-monitor` — agents now validate generated YAML against the published schema before presenting it to the user
14+
815
## [1.11.1] - 2026-05-13
916

1017
### Added

plugins/copilot/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mc-agent-toolkit",
3-
"version": "1.11.1",
3+
"version": "1.12.0",
44
"description": "Monte Carlo Agent Toolkit — data observability for AI coding agents.",
55
"author": {
66
"name": "Monte Carlo",

plugins/copilot/skills/manage-mac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../skills/manage-mac

0 commit comments

Comments
 (0)