Установка
SKILL.md
Monte Carlo Root Cause Analysis Skill
This skill helps investigate data incidents — freshness delays, volume anomalies, schema changes, field metric drift, and ETL failures — by guiding the agent through a systematic investigation using Monte Carlo's MCP tools. It combines observability metadata with optional direct data querying to find the root cause.
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.
Reference files live next to this skill file. Use the Read tool (not MCP resources) to access them:
- Investigation playbooks by issue type:
references/<type>-investigation.md - Data exploration patterns:
references/data-exploration.md - Intake when no incident ID:
references/intake-no-incident.md - Common root cause catalog:
references/common-root-causes.md
When to activate this skill
Activate when the user:
- Mentions a Monte Carlo alert, incident, or anomaly
- Asks "why is this table stale?" or "why did row count drop?"
- Wants to investigate a data quality issue
- Asks about freshness, volume, or schema problems
- Mentions pipeline failures (Airflow, dbt, Databricks)
- Says things like "debug this alert", "investigate this incident", "root cause analysis"
When NOT to activate this skill
Do not activate when the user is:
- Creating monitors (use the monitoring-advisor skill)
- Running impact assessments before code changes (use the prevent skill)
- Looking at storage costs (use the storage-cost-analysis skill)
- Exploring pipeline performance without a specific incident (use the performance-diagnosis skill)
Prerequisites
Required: Monte Carlo MCP server (integrations.getmontecarlo.com/mcp) must be configured and authenticated.
Optional but recommended:
- Database MCP server (Snowflake, BigQuery, Redshift, Databricks) — enables direct SQL queries for deeper data investigation. Without this, the skill can still analyze using MC's metadata tools but cannot profile actual data.
- GitHub MCP server — enables searching for recent PRs that may have caused the issue. Without this, the skill falls back to MC's query change detection.
MCP Tools Used
From Monte Carlo MCP server
| Tool | Purpose |
|---|---|
get_alerts | Fetch incident/alert details |
search | Find tables by name or keyword |
get_table | Table metadata and fields |
get_asset_lineage | Table-level upstream/downstream lineage |
get_field_lineage | Field-level lineage (trace bad data to source column) |
get_table_freshness | Table update/freshness history |
get_table_size_history | Row count and size history |
get_queries_for_table | Read/write query history |
get_query_changes | Detect SQL text modifications |
get_query_rca | Root cause analysis for failed/futile/missed queries |
get_etl_issues | ETL pipeline issues — pass platform ("airflow", "dbt", or "databricks") |
get_etl_jobs | Find ETL jobs that write to specific tables — pass platform param |
get_github_prs | Recent GitHub PRs from the account's MC GitHub integration |
get_jobs_performance | Job runtime stats, failure rates, 7-day trends |
get_change_timeline | Unified timeline: query changes + volume + ETL failures |
get_current_time | Current timestamp for relative time ranges |
alert_assessment | Optional ~2-min triage of an incident — returns HIGH/MEDIUM/LOW confidence and impact. Useful when you want a quick read before deciding to escalate to TSA. |
run_troubleshooting_agent | Starts the Troubleshooting Agent (TSA) on an incident. Async by default; idempotent (returns existing results unless force_rerun=True). Auto-invoked at Step 1.5 when an incident UUID is present. |
get_troubleshooting_agent_results | Polls TSA results for an incident (status is not_found / running / success / failed). Use to check on the async run started at Step 1.5. |
Credits:
alert_assessmentandrun_troubleshooting_agentconsume Monte Carlo credits the same way the Troubleshooting Agent does when launched from the Monte Carlo UI. Each freshrun_troubleshooting_agentcall is a billable run; reuse via the built-in idempotency (don't passforce_rerun=Trueunless the user explicitly asks for a fresh analysis).
Optional external MCP tools
| Tool | Purpose |
|---|---|
| Database MCP (Snowflake, BigQuery, etc.) | Run SQL queries for data profiling |
| GitHub MCP | Search for recent PRs (alternative to MC's get_github_prs — useful if the account has no MC GitHub integration) |
Workflow
Step 1: Understand the problem (intake)
If the user provides an alert or incident ID:
- Call
get_alertswith the alert ID to fetch details. - Identify: affected table(s), issue type (freshness, volume, schema, field metric), when it started.
- Proceed to Step 2.
If the user describes a problem WITHOUT an incident ID:
Read references/intake-no-incident.md for the full intake flow. In short:
- Ask clarifying questions: what table? what looks wrong? when did it start?
- Search for the table:
search(query="table_name") - Search for related alerts:
get_alertswith a recent time range - Check table health:
get_table_freshness,get_table_size_history - Narrow down the issue type and proceed to Step 2.
Step 1.5: Auto-invoke TSA (when applicable)
When intake produces a Monte Carlo incident UUID, kick off the Troubleshooting Agent (TSA) before continuing to Step 2. TSA runs the same root-cause analysis the Monte Carlo UI uses; running it here in parallel with the manual investigation usually beats running either path alone.
Skip TSA when any of these is true:
- No incident UUID.
run_troubleshooting_agentrequires a UUID. The no-incident intake path (references/intake-no-incident.md) does not feed TSA. If that path later identifies a matching alert, return to Step 1 with the alert's incident UUID — Step 1.5 then applies normally. - Narrow scoped check. The user wants a single fact, not an investigation. Examples: "is
analytics.ordersstale right now?", "what's the row count of X?", "show me the schema of Y", "did this query run today?". Answer the question with the relevant tool and stop. TSA is overkill for these. - Explicit user opt-out. The user says "skip TSA", "don't run TSA", "manual only", "just do it yourself", or similar. Honor the opt-out and proceed to Step 2 without invoking TSA.
Default invocation (async, parallel):
run_troubleshooting_agent(incident_id="<uuid>", async_mode=True)
- The tool is idempotent by default: if a previous successful TSA run exists for this incident, it returns those results immediately. Do not pass
force_rerun=Trueunless the user explicitly asks for a fresh analysis (each fresh run is a billable Monte Carlo credit consumption). - If status is
successon the first call, you have results — fold them straight into Step 7's synthesis and continue Steps 2–6 to corroborate. - If status is
queuedorrunning, continue to Step 2 immediately. TSA typically completes in 4–8 minutes; you'll poll for results viaget_troubleshooting_agent_resultslater in the flow (see Step 4 and Step 7). - If status is
failed, note the error and continue with the manual investigation only — do not re-run automatically.
Tell the user what you started: "I've kicked off the Troubleshooting Agent on this incident — it usually finishes in 4–8 minutes. While it runs, I'll continue investigating manually so we have findings either way."
Step 2: Map the blast radius
TSA in parallel: if you started TSA at Step 1.5, it is running in the background while you do this step. Do not block on it.
- Call
get_asset_lineage(mcons=[table_mcon], direction="UPSTREAM")— what feeds this table? - Call
get_asset_lineage(mcons=[table_mcon], direction="DOWNSTREAM")— what does this table feed? - If the issue involves specific fields, call
get_field_lineageto trace which upstream fields feed the affected columns.
Report to the user: "This table is fed by X upstream sources and feeds Y downstream consumers. Here's what could be impacted."
Ask for direction: Before diving deeper, ask the user what they'd like to investigate first. They may already have a hunch ("I think it's the Airflow job" or "check if someone changed the SQL"). Follow their lead — don't run all investigation paths blindly. If they have no preference, proceed with the most likely path based on the issue type.
Step 3: Investigate based on issue type
Read the appropriate reference file and follow its investigation playbook:
| Issue Type | Reference |
|---|---|
| Table not updating on schedule | references/freshness-investigation.md |
| Unexpected row count changes | references/volume-investigation.md |
| Columns added, removed, or type-changed | references/schema-investigation.md |
| Airflow/dbt/Databricks pipeline failures | references/etl-failure-investigation.md |
| SQL modifications causing data changes | references/query-change-investigation.md |
| Field-level metric drift (null rate, mean, etc.) | references/field-anomaly-investigation.md |
Step 4: Check for upstream causes
Data issues often originate upstream. Walk the lineage chain:
- For each direct upstream table from Step 2:<!-- -->
- Check freshness:
get_table_freshness— is the upstream table also stale? - Check size:
get_table_size_history— did the upstream table's volume change? - Check ETL status:
get_etl_issueswith the relevantplatform
- Check freshness:
- Use
get_field_lineageto trace the specific field that has bad data back to its source. - Check what upstream field values correlate with the anomaly (if DB connector is available — see Step 5).
TSA poll #1. If you started TSA at Step 1.5 and it has not yet returned success, call get_troubleshooting_agent_results(incident_id=...) once here (~30s after Step 1.5). If status is success, hold the result for Step 7. If still running, keep going — you'll poll again before Step 7. Don't block on it.
Step 5: Profile data (if database MCP is available)
If the user has a database MCP server connected (Snowflake, BigQuery, Redshift, Databricks, etc.), read references/data-exploration.md for SQL investigation patterns including:
- Sample rows around the incident time
- Null rate and distribution checks
- Value correlation with upstream tables
- Before/after comparisons
If no database MCP is available: Tell the user: "I can't query the warehouse directly — for deeper data investigation, connect a database MCP server. I can still analyze using Monte Carlo's metadata and the tools available." Continue the investigation with MC tools only.
Step 6: Check for code changes
Call get_github_prs with a time range around when the issue started to find recent PRs from the account's Monte Carlo GitHub integration. Look for PRs that modified dbt models, SQL files, or pipeline configs affecting the impacted table.
If the account has no GitHub integration (tool returns empty), or the user has a local GitHub MCP server they prefer, use that instead.
Also call get_query_changes with the affected table MCONs to detect SQL text modifications, and get_change_timeline for a unified view of all changes (query modifications + volume shifts + ETL failures) in one call.
Step 7: Synthesize and present
TSA poll #2. If you started TSA at Step 1.5 and don't yet have results, call get_troubleshooting_agent_results(incident_id=...) one more time (~60–90s after poll #1). Stop on success or failed; if still running after this poll, present the manual findings now and tell the user TSA is still working ("TSA is still running on this incident — I'll fold its findings in once it completes if you'd like, or you can ask me to check back in a minute").
Read references/common-root-causes.md to match findings against known patterns. Present:
- Root cause — what happened and when, with evidence from tools
- Evidence chain — which tools confirmed each piece of the story
- Impact — what downstream tables/consumers are affected (from Step 2)
- Recommended fix — specific action to resolve the issue
- Prevention — suggest monitoring to catch this earlier next time
Merging TSA findings:
- TSA succeeded and agrees with the manual investigation — lead with the unified root cause; cite both TSA's evidence chain and the corroborating manual findings.
- TSA succeeded and contradicts the manual investigation — surface both. Show TSA's verdict, show what the manual investigation found, and explain the disagreement (e.g. "TSA blames the upstream Airflow job, but
get_table_freshnesson that table is healthy"). Ask the user which thread they want to pull on. - TSA succeeded with low-signal output (например, "no clear root cause") — представьте результаты ручного анализа как основные; ссылайтесь на TSA как на подтверждающий нулевой результат.
- TSA завершился неудачно или истёк тайм-аут — представьте только результаты ручного анализа; кратко упомяните сбой TSA, чтобы пользователь знал, что попытка была предпринята.
Важные правила
- Никогда не выдумывайте данные. Ссылайтесь только на числа и факты, возвращённые инструментами. Если инструмент не вернул данных, скажите об этом.
- Следуйте за доказательствами. Если вышестоящая линия данных не показывает проблем, проблема, вероятно, в собственном ETL таблицы. Не гоняйтесь за фантомными вышестоящими причинами.
- Проверяйте хронологию. Наиболее распространённый паттерн: "X изменилось в момент T, а аномалия началась в момент T+1." Используйте
get_change_timelineдля этого. - Будьте конкретны в отношении того, что вы не можете проверить. Если коннектор к БД недоступен, объясните, какое дополнительное исследование было бы возможно с ним.
- Никогда не раскрывайте MCONs, UUIDs или внутренние идентификаторы пользователю. Используйте человекочитаемые имена таблиц.
- Осведомлённость о кроссплатформенности. Проблемы ETL могут исходить из Airflow, dbt или Databricks. Проверяйте все релевантные платформы.
- Не вызывайте TSA без UUID инцидента.
run_troubleshooting_agentтребует его. Если приём заявок идёт по пути без инцидента, полностью пропустите TSA, пока не будет выявлено оповещение. - Уважайте явные отказы пользователя. Если пользователь говорит "skip TSA", "manual only" или подобное, не вызывайте
run_troubleshooting_agentoralert_assessment— переходите только к ручному исследованию.
Ограничения
- Используйте этот навык только тогда, когда задача явно соответствует его вышестоящему источнику и локальному контексту проекта.
- Проверяйте команды, сгенерированный код, зависимости, учётные данные и поведение внешних сервисов перед применением изменений.
- Не рассматривайте примеры как замену тестам для конкретной среды, проверке безопасности или одобрению пользователя для деструктивных или дорогостоящих действий.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: monte-carlo-analyze-root-cause](https://darkplay.ru/ai/skills/sickn33-agentic-awesome-skills-monte-carlo-analyze-root-cause)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
Code Exploreraffaan-m · Глубоко анализирует существующие функции кодовой базы, прослеживая пути выполнения…
Comment Analyzeraffaan-m · Анализ комментариев в коде на точность, полноту и риск устаревания.
Conversation Analyzeraffaan-m · Анализ транскриптов диалогов для поиска поведения, которое стоит блокировать хуками.
Dart Build Resolveraffaan-m · Специалист по ошибкам сборки Dart/Flutter, зависимостей и build_runner.
Evolveaffaan-m · Анализирует инстинкты и предлагает или генерирует эволюционировавшие структуры.
Harness Optimizeraffaan-m · Анализирует и улучшает конфигурацию локального агентного харнесса по надёжности и цене.
Pr Test Analyzeraffaan-m · Оценивает качество и полноту покрытия тестами в pull request.
Skill Createaffaan-m · Анализирует локальную историю Git, извлекает паттерны кодирования и генерирует файлы…
Type Design Analyzeraffaan-m · Анализ дизайна типов: инкапсуляция, инварианты, полезность, соблюдение.
understand-anythingegonex-ai · Понимание кодовой базы на основе ИИ — анализ, визуализация и объяснение любого проекта.Лучшие ИИ-инструменты для автоматизации и ассистентов
Подборка ИИ-ассистентов для автоматизации рутины и ускорения рабочих процессов. Сервисы, которые берут на себя переписку, анализ данных, ведение базы знаний и подготовку продаж, эк
Give Me Public
AITunnelAitunnel
STIVAStiva
Wikibot (Викибот)Wikibot
mymeet.aiMymeet
InsighterInsighter
TGHuntTghunt
LegiscanLegiscan
RouterAIRouterai
Wikibot 1.0 (Викибот)WikibotЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachat