monte-carlo-data/mc-agent-toolkit / skills/remediation
monte-carlo-remediation
UnverifiedInvestigate and remediate data quality alerts using Monte Carlo MCP tools. Runs root cause analysis, assesses blast radius, discovers available tools (MCP/CLI/API), proposes and executes fixes, or escalates with full context when uncertain.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 5.6 KB |
| SKILL.md | skill md | 21.6 KB |
| references/patterns.md | markdown | 10.7 KB |
| references/safety.md | markdown | 7.9 KB |
| references/tool-discovery.md | markdown | 7.5 KB |
README.md
View on GitHub# Monte Carlo Remediation Skill
Investigate and fix data quality issues detected by Monte Carlo — automatically, with safety rails.
## What this does
When you have a data quality alert (freshness, volume, schema change, etc.), this skill guides an AI coding agent through the full remediation lifecycle:
1. **Reuse Monte Carlo's analysis** — fetches the alert and its existing troubleshooting result and remediation plan; runs troubleshooting only if none exists
2. **Follow the plan** — carries out the recommended action (code fix, monitor tuning, alert closure or hand-off), confirming with the user and verifying the result
3. **Fall back to its own fix** — only when no plan exists: maps blast radius via lineage, discovers available MCP tools, and proposes a fix with clear reasoning
4. **Close out** — updates alert status, documents what was done, and suggests prevention measures
The skill works with whatever tools you have connected. If an Airflow MCP is available, it can restart pipelines. If no external MCPs are connected, it produces a detailed remediation plan with manual commands and asks you how to proceed.
## Design: single document, not playbooks
This skill uses a single `SKILL.md` with reference examples — not separate playbooks for each alert type. Here's why:
**Opus-class models generalize better from examples + principles than from rigid playbook branching.** A single document that teaches the reasoning pattern (investigate → discover capabilities → select action → execute safely) handles edge cases and combined root causes naturally. Real incidents rarely fit neatly into a single category — a freshness alert might be caused by a schema change upstream that broke a dbt model. Rigid playbooks force the agent down a single path; principles let it compose the right response.
**Maintenance scales linearly with playbooks, but not with principles.** Adding a new alert type or remediation pattern means adding an example to `references/patterns.md` — not creating and maintaining a new playbook file with its own workflow, tool table, and edge case handling.
**The reference examples are illustrative, not prescriptive.** They show the agent what good remediation looks like for common patterns. The agent uses these as a starting point and adapts based on the specific TSA findings and available tools.
## Editor & stack compatibility
The skill works with any AI editor that supports MCP and the Agent Skills format — including Claude Code, Cursor, and VS Code.
| Stack | Support | Notes |
|---|---|---|
| Any MC-supported warehouse | ✅ Full | Investigation works for all warehouse types |
| Airflow / Dagster / Prefect | ✅ Full (with MCP) | Can restart pipelines automatically |
| dbt Cloud | ✅ Full (with MCP) | Can rerun dbt jobs automatically |
| GitHub / GitLab | ✅ Full (with MCP) | Can create PRs for code fixes |
| No external MCPs | 🟡 Investigation only | Produces remediation plan with manual commands, asks user for next steps |
## Prerequisites
- Claude Code, Cursor, VS Code, or any editor with MCP support
- Monte Carlo account with Editor role or above
- Monte Carlo MCP server configured and authenticated
**Optional but recommended** (for automated execution):
- One or more external MCP servers for your pipeline orchestrator, code platform, or notification system
## Setup
### Via the mc-agent-toolkit plugin (recommended)
Install the plugin for your editor — it bundles the skill, MCP server, and permissions automatically. See the [main README](../../README.md#installing-the-plugin-recommended) for editor-specific instructions.
### Standalone
1. Configure the Monte Carlo MCP server:
```
claude mcp add --transport http monte-carlo-mcp https://integrations.getmontecarlo.com/mcp
```
2. Install the skill:
```bash
npx skills add monte-carlo-data/mc-agent-toolkit --skill remediation
```
3. Authenticate: run `/mcp` in your editor, select `monte-carlo-mcp`, and complete the OAuth flow.
4. Verify: ask your editor "Test my Monte Carlo connection" — it should call `testConnection` and confirm.
### Adding external MCPs for execution
The remediation skill can use any MCP server you have configured. Here are common ones for data teams:
| MCP Server | What it enables | Setup |
|---|---|---|
| **Airflow** | Restart DAGs, retry failed tasks | [Airflow MCP](https://github.com/apache/airflow-mcp) |
| **dbt Cloud** | Rerun dbt jobs | [dbt Cloud MCP](https://github.com/dbt-labs/dbt-cloud-mcp) |
| **GitHub** | Create PRs for code fixes | [GitHub MCP](https://github.com/github/github-mcp-server) |
## How to use it
Open your editor and prompt with the alert or issue you want to fix. Examples:
```
"Remediate alert ABC-123"
"Fix the freshness issue on the orders table"
"We have a schema change alert on raw_events — can you investigate and fix it?"
"Triage and remediate all open alerts on the analytics schema"
"The daily pipeline hasn't run — diagnose and fix it"
```
The skill handles the full workflow: investigation → capability discovery → remediation → verification → documentation. It will ask for confirmation before taking any destructive action.
## Safety
The skill has built-in safety rails:
- **Always explains** what it's about to do and why before executing
- **Always confirms** destructive operations (pipeline triggers, data modifications, code changes)
- **Asks the user** when uncertain rather than guessing at a fix
- **Documents** all findings and actions on the alert
- **Never chains** multiple actions without verifying each one
- **Never modifies data** without explicit confirmation and a rollback plan
See `references/safety.md` for the complete safety protocol.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |