{"id":"b5fa641c-99e6-4b6e-b881-79d772d3ba76","shortId":"z7hrjt","kind":"skill","title":"monte-carlo-context-detection","tagline":"Route data-related requests to the right Monte Carlo skill or workflow. USE WHEN alerts, incidents, data broken, stale, coverage gaps, data quality, or any ambiguous data observability request.","description":"# Monte Carlo Context Detection\n\nThis skill determines which Monte Carlo skill or workflow best fits the user's current context. It activates reactively for ambiguous or multi-step data-related messages, gathers signals, and routes to the right skill or workflow.\n\nReference file for signal definitions: `references/signal-definitions.md` (relative to this file). Read it before routing.\n\n## When to activate this skill\n\nThis skill is activated by the CLAUDE.md routing table when:\n\n- The user's message relates to data quality, alerts, incidents, coverage, or Monte Carlo — but doesn't clearly match a single skill in the routing table\n- The user's intent is ambiguous or could span multiple skills\n- The user asks a broad question like \"help me with my data\" or \"what's going on?\"\n\n## When NOT to activate this skill\n\n- A skill or workflow is already active in the conversation — the active skill owns the conversation, do not intercept\n- The user's message clearly matches a single skill in the CLAUDE.md routing table — route directly, no need for context detection\n- The user is editing a dbt model — defer to the `prevent` skill which auto-activates via hooks\n- The user's message is not data-related at all\n\n---\n\n## Workflow: Reactive Routing\n\nSession-start welcome is handled by the plugin's `welcome` SessionStart hook (bash-side dbt/MC workspace detection). This skill is purely reactive — it activates for ambiguous or multi-step data-related messages and routes them.\n\nFollow these steps in order.\n\n### Step 0: Fast-path clear intent (stop early if matched)\n\nBefore doing anything else, check whether the user's message unambiguously matches a single existing skill. If so, **skip the rest of this workflow** and immediately load that skill — do NOT read `references/signal-definitions.md`, do NOT make API probes.\n\n| Clear user intent | Skill to load immediately |\n|---|---|\n| \"Check health of [named table]\" / \"status of [named table]\" | `../asset-health/SKILL.md` |\n| \"Create a [monitor type] on [named table]\" | `../monitoring-advisor/SKILL.md` |\n| \"Investigate alert on [named table]\" / \"why is [named table] stale/broken?\" | `../incident-response/SKILL.md` |\n| \"What should I monitor?\" / \"where are my coverage gaps?\" | `../proactive-monitoring/SKILL.md` |\n\nContext-detection is for **ambiguous** requests only. If the request is clear, routing through this skill wastes turns and tokens.\n\nIf no clear match, proceed to Step 1.\n\n### Step 1: Categorize intent\n\nRead `references/signal-definitions.md` for the full signal catalog. Determine which category the user's message falls into:\n\n| Category | Signals | Example messages |\n|----------|---------|-----------------|\n| **Specific asset** | User mentions a table name, or has a `.sql` model file open in their IDE | \"what's wrong with stg_payments?\", \"check this table\" |\n| **Active incident** | Keywords: alert, broken, stale, failing, incident, triage, wrong data | \"I have alerts firing\", \"data looks wrong\", \"something broke\" |\n| **Coverage/monitoring** | Keywords: monitor, coverage, gaps, unmonitored, what should I watch | \"what should I monitor?\", \"where are my gaps?\" |\n| **General/exploratory** | No clear category, broad question | \"help me with data quality\", \"what can Monte Carlo do?\" |\n\n### Step 2: Gather scope (only if needed)\n\n- **Specific asset known** (from file context or user mention) → proceed to Step 3\n- **Active incident, no scope** → ask: \"Want me to check recent alerts? Any specific time range or severity?\"\n- **Coverage/monitoring, no scope** → ask: \"Which warehouse should I look at, or should I check across all?\"\n- **General/exploratory** → present the categories: \"I can help with: (1) investigating active alerts or data issues, (2) analyzing monitoring coverage and creating monitors, or (3) checking the health of specific tables. What are you looking for?\"\n\n### Step 3: Scoped API probe (when scope is available)\n\nOnly make API calls when you have enough context to scope them:\n\n- **Specific asset** → call `get_alerts` with the table's MCON or name filter, and `get_monitors` for that table\n- **Active incident with scope** → call `get_alerts` with the user's time range / severity filters\n- **Coverage/monitoring** → skip API probe, route directly to proactive monitoring workflow (it handles its own API calls)\n- **If MCP tool calls fail** (auth not configured) → skip API, fall back to conversation intent alone\n\n**Always scope MCP calls tightly.** Unscoped `get_alerts`, `search`, or `get_monitors` on large accounts can return hundreds of results, overflow the tool-result token limit, spill to disk, and force expensive chunk reads — burning user tokens and risking workflow failure. Minimum scoping:\n\n- `get_alerts` → time filter (`created_after`, default last 7 days) + at least one of `warehouse`, `table_names`, `severity`\n- `search` → needed to resolve a table name to its MCON (`get_table` requires MCON). ALWAYS pass `limit` (e.g. 5), the table name as `query`, and filter by `warehouse_uuid` or `database`/`schema`. `warehouse_types` alone (\"snowflake\") matches thousands of tables. Disambiguation rules when multiple matches return:\n  1. If the user named a warehouse (e.g. \"analytics-snowflake\") → auto-pick the match whose `warehouse_display_name` matches and proceed. Do NOT stop to ask.\n  2. If the user named a database/schema → auto-pick the match in that database/schema.\n  3. If one match is flagged `is_key_asset: true` and others aren't → auto-pick the key asset.\n  4. Only ask the user to disambiguate when none of the above resolve it.\n- `get_monitors` → always filter by `mcons` (table MCON) or `warehouse_uuid`\n\nIf you don't have enough scope, ask the user before calling.\n\n### Step 4: Route\n\nBased on the combined signals from Steps 1-3:\n\n| Combined signals | Confidence | Action |\n|-----------------|------------|--------|\n| Active alerts found + incident intent | High | **Auto-activate** incident response workflow: read and follow `../incident-response/SKILL.md` |\n| Coverage intent + data project detected | High | **Auto-activate** proactive monitoring workflow: read and follow `../proactive-monitoring/SKILL.md` |\n| User asks to create a specific monitor (type + table known) | High | **Auto-activate** monitoring-advisor: read and follow `../monitoring-advisor/SKILL.md` |\n| Table mentioned + \"health\" / \"status\" / \"check\" intent | High | **Auto-activate** asset-health: read and follow `../asset-health/SKILL.md` |\n| Ambiguous or conflicting signals | Low | **Suggest** options and wait for user to choose |\n\n**High confidence = auto-activate.** Load the target skill's SKILL.md and begin executing it immediately. Do not ask for confirmation.\n\n**Low confidence = suggest.** Present 2-3 options with brief descriptions and let the user choose. Example:\n\n> \"Based on what you've described, I can:\n> 1. **Investigate alerts** — triage and fix active data issues (incident response workflow)\n> 2. **Improve monitoring** — find coverage gaps and create monitors (proactive monitoring workflow)\n>\n> Which would be most helpful?\"\n\n### Prevent guardrail\n\nIf the user is **actively editing** a dbt model file (making code changes, not just viewing or asking about it) and the `prevent` skill's hooks are active, do NOT route to any other skill. Instead respond:\n\n> \"The prevent skill will automatically handle impact assessment for dbt model changes via its pre-edit hooks. No additional routing needed.\"","tags":["context","detection","agent","toolkit","monte-carlo-data","agent-observability","agent-skills","ai-agents","claude-code","codex-skills","cursor","data-observability"],"capabilities":["skill","source-monte-carlo-data","skill-context-detection","topic-agent-observability","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-codex-skills","topic-cursor","topic-data-observability","topic-data-quality","topic-mcp","topic-monte-carlo","topic-opencode","topic-skill-md"],"categories":["mc-agent-toolkit"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/monte-carlo-data/mc-agent-toolkit/context-detection","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add monte-carlo-data/mc-agent-toolkit","source_repo":"https://github.com/monte-carlo-data/mc-agent-toolkit","install_from":"skills.sh"}},"qualityScore":"0.488","qualityRationale":"deterministic score 0.49 from registry signals: · indexed on github topic:agent-skills · 76 github stars · SKILL.md body (7,445 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:55:42.156Z","embedding":null,"createdAt":"2026-04-20T19:31:43.335Z","updatedAt":"2026-04-22T06:55:42.156Z","lastSeenAt":"2026-04-22T06:55:42.156Z","tsv":"'-3':906,1020 '/asset-health/skill.md':349,980 '/incident-response/skill.md':368,926 '/monitoring-advisor/skill.md':357,963 '/proactive-monitoring/skill.md':378,942 '0':285 '1':407,409,573,795,905,1039 '2':513,580,823,1019,1051 '3':531,588,601,838 '4':858,896 '5':767 '7':739 'account':701 'across':563 'action':910 'activ':57,95,101,165,174,179,223,265,458,532,575,640,911,919,935,956,973,998,1045,1074,1097 'addit':1126 'advisor':959 'alert':21,116,359,461,471,542,576,625,646,694,732,912,1041 'alon':686,783 'alreadi':173 'alway':687,763,874 'ambigu':32,60,139,267,384,981 'analyt':804 'analytics-snowflak':803 'analyz':581 'anyth':297 'api':331,603,611,657,669,680 'aren':850 'ask':147,536,552,822,860,890,944,1012,1087 'assess':1114 'asset':433,520,622,846,857,975 'asset-health':974 'auth':676 'auto':222,807,831,853,918,934,955,972,997 'auto-activ':221,917,933,954,971,996 'auto-pick':806,830,852 'automat':1111 'avail':608 'back':682 'base':898,1031 'bash':254 'bash-sid':253 'begin':1006 'best':49 'brief':1023 'broad':149,500 'broke':477 'broken':24,462 'burn':722 'call':612,623,644,670,674,690,894 'carlo':3,15,37,45,121,510 'catalog':418 'categor':410 'categori':421,428,499,568 'chang':1082,1118 'check':299,340,455,540,562,589,968 'choos':993,1029 'chunk':720 'claude.md':104,198 'clear':125,191,289,333,391,402,498 'code':1081 'combin':901,907 'confid':909,995,1016 'configur':678 'confirm':1014 'conflict':983 'context':4,38,55,206,380,524,617 'context-detect':379 'convers':177,183,684 'could':141 'coverag':26,118,376,481,583,927,1055 'coverage/monitoring':478,549,655 'creat':350,585,735,946,1058 'current':54 'data':8,23,28,33,66,114,156,233,273,468,473,505,578,929,1046 'data-rel':7,65,232,272 'databas':779 'database/schema':829,837 'day':740 'dbt':213,1077,1116 'dbt/mc':256 'default':737 'defer':215 'definit':83 'describ':1036 'descript':1024 'detect':5,39,207,258,381,931 'determin':42,419 'direct':202,660 'disambigu':789,864 'disk':716 'display':813 'doesn':123 'e.g':766,802 'earli':292 'edit':211,1075,1123 'els':298 'enough':616,888 'exampl':430,1030 'execut':1007 'exist':309 'expens':719 'fail':464,675 'failur':728 'fall':426,681 'fast':287 'fast-path':286 'file':80,88,444,523,1079 'filter':633,654,734,774,875 'find':1054 'fire':472 'fit':50 'fix':1044 'flag':843 'follow':279,925,941,962,979 'forc':718 'found':913 'full':416 'gap':27,377,482,495,1056 'gather':69,514 'general/exploratory':496,565 'get':624,635,645,693,697,731,759,872 'go':160 'guardrail':1069 'handl':245,666,1112 'health':341,591,966,976 'help':152,502,571,1067 'high':916,932,953,970,994 'hook':225,252,1095,1124 'hundr':704 'ide':448 'immedi':320,339,1009 'impact':1113 'improv':1052 'incid':22,117,459,465,533,641,914,920,1048 'instead':1105 'intent':137,290,335,411,685,915,928,969 'intercept':186 'investig':358,574,1040 'issu':579,1047 'key':845,856 'keyword':460,479 'known':521,952 'larg':700 'last':738 'least':742 'let':1026 'like':151 'limit':713,765 'load':321,338,999 'look':474,557,598 'low':985,1015 'make':330,610,1080 'match':126,192,294,306,403,785,793,810,815,834,841 'mcon':630,758,762,877,879 'mcp':672,689 'mention':435,527,965 'messag':68,111,190,229,275,304,425,431 'minimum':729 'model':214,443,1078,1117 'monitor':352,372,480,491,582,586,636,663,698,873,937,949,958,1053,1059,1061 'monitoring-advisor':957 'mont':2,14,36,44,120,509 'monte-carlo-context-detect':1 'multi':63,270 'multi-step':62,269 'multipl':143,792 'name':343,347,355,361,365,438,632,747,755,770,799,814,827 'need':204,518,750,1128 'none':866 'observ':34 'one':743,840 'open':445 'option':987,1021 'order':283 'other':849 'overflow':707 'own':181 'pass':764 'path':288 'payment':454 'pick':808,832,854 'plugin':248 'pre':1122 'pre-edit':1121 'present':566,1018 'prevent':218,1068,1092,1108 'proactiv':662,936,1060 'probe':332,604,658 'proceed':404,528,817 'project':930 'pure':262 'qualiti':29,115,506 'queri':772 'question':150,501 'rang':546,652 'reactiv':58,238,263 'read':89,326,412,721,923,939,960,977 'recent':541 'refer':79 'references/signal-definitions.md':84,327,413 'relat':9,67,85,112,234,274 'request':10,35,385,389 'requir':761 'resolv':752,870 'respond':1106 'respons':921,1049 'rest':315 'result':706,711 'return':703,794 'right':13,75 'risk':726 'rout':6,72,92,105,132,199,201,239,277,392,659,897,1100,1127 'rule':790 'schema':780 'scope':515,535,551,602,606,619,643,688,730,889 'search':695,749 'session':241 'session-start':240 'sessionstart':251 'sever':548,653,748 'side':255 'signal':70,82,417,429,902,908,984 'singl':128,194,308 'skill':16,41,46,76,97,99,129,144,167,169,180,195,219,260,310,323,336,395,1002,1093,1104,1109 'skill-context-detection' 'skill.md':1004 'skip':313,656,679 'snowflak':784,805 'someth':476 'source-monte-carlo-data' 'span':142 'specif':432,519,544,593,621,948 'spill':714 'sql':442 'stale':25,463 'stale/broken':367 'start':242 'status':345,967 'step':64,271,281,284,406,408,512,530,600,895,904 'stg':453 'stop':291,820 'suggest':986,1017 'tabl':106,133,200,344,348,356,362,366,437,457,594,628,639,746,754,760,769,788,878,951,964 'target':1001 'thousand':786 'tight':691 'time':545,651,733 'token':399,712,724 'tool':673,710 'tool-result':709 'topic-agent-observability' 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-codex-skills' 'topic-cursor' 'topic-data-observability' 'topic-data-quality' 'topic-mcp' 'topic-monte-carlo' 'topic-opencode' 'topic-skill-md' 'triag':466,1042 'true':847 'turn':397 'type':353,782,950 'unambigu':305 'unmonitor':483 'unscop':692 'use':19 'user':52,109,135,146,188,209,227,302,334,423,434,526,649,723,798,826,862,892,943,991,1028,1072 'uuid':777,882 've':1035 'via':224,1119 'view':1085 'wait':989 'want':537 'warehous':554,745,776,781,801,812,881 'wast':396 'watch':487 'welcom':243,250 'whether':300 'whose':811 'workflow':18,48,78,171,237,318,664,727,922,938,1050,1062 'workspac':257 'would':1064 'wrong':451,467,475","prices":[{"id":"cc26b026-e9f2-45cf-8fc4-20bbbd9b595a","listingId":"b5fa641c-99e6-4b6e-b881-79d772d3ba76","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"monte-carlo-data","category":"mc-agent-toolkit","install_from":"skills.sh"},"createdAt":"2026-04-20T19:31:43.335Z"}],"sources":[{"listingId":"b5fa641c-99e6-4b6e-b881-79d772d3ba76","source":"github","sourceId":"monte-carlo-data/mc-agent-toolkit/context-detection","sourceUrl":"https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/context-detection","isPrimary":false,"firstSeenAt":"2026-04-20T19:31:43.335Z","lastSeenAt":"2026-04-22T06:55:42.156Z"}],"details":{"listingId":"b5fa641c-99e6-4b6e-b881-79d772d3ba76","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"monte-carlo-data","slug":"context-detection","github":{"repo":"monte-carlo-data/mc-agent-toolkit","stars":76,"topics":["agent-observability","agent-skills","ai-agents","claude-code","codex-skills","cursor","data-observability","data-quality","mcp","monte-carlo","opencode","skill-md","skillsmp","vscode"],"license":"apache-2.0","html_url":"https://github.com/monte-carlo-data/mc-agent-toolkit","pushed_at":"2026-04-22T00:57:31Z","description":"Official Monte Carlo toolkit for AI coding agents. Skills and plugins that bring data and agent observability — monitoring, triaging, troubleshooting, health checks  — into Claude Code, Cursor, and more.","skill_md_sha":"4eec497639dfd5ad76e5a26b30492911449efe18","skill_md_path":"skills/context-detection/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/context-detection"},"layout":"multi","source":"github","category":"mc-agent-toolkit","frontmatter":{"name":"monte-carlo-context-detection","description":"Route data-related requests to the right Monte Carlo skill or workflow. USE WHEN alerts, incidents, data broken, stale, coverage gaps, data quality, or any ambiguous data observability request."},"skills_sh_url":"https://skills.sh/monte-carlo-data/mc-agent-toolkit/context-detection"},"updatedAt":"2026-04-22T06:55:42.156Z"}}