Skip to content

monte-carlo-data/mc-agent-toolkit / skills/analyze-root-cause

monte-carlo-analyze-root-cause

Verified

Investigate data incidents and find root causes using Monte Carlo's observability data. Guides the agent through systematic investigation: alert lookup, lineage tracing, ETL checks, query analysis, and data profiling. Activates when a user asks about data issues, incidents, alerts, or why data looks wrong.

references/schema-investigation.md

View on GitHub
# Schema Investigation Playbook

Use this when columns were added, removed, or had their types changed.

## Investigation steps

### 1. Identify what changed

Call `get_asset(mcon=table_mcon, include=["fields"])` to see the current schema.
Compare against the alert details — what columns were added/removed/modified?

### 2. Check for query changes

Call `get_query_changes` — schema changes almost always come from ETL modifications:
- New SELECT columns → column additions
- Removed SELECT columns → column removals
- CAST or type conversion changes → type modifications
- CREATE TABLE AS SELECT with different schema

### 3. Check downstream impact

Call `get_asset_lineage(mcons=[table_mcon], direction="DOWNSTREAM")`:
- Which downstream tables depend on the changed columns?
- Call `get_field_lineage` to trace exactly which downstream fields are affected

### 4. Check ETL pipeline

Schema changes often happen during deployments:
- Call `get_etl_issues` with `platform="dbt"` — dbt model changes are the most common source
- Call `get_etl_issues` with `platform="airflow"` — pipeline deployment may have changed the schema
- Check `get_change_timeline` for a correlated view

### 5. Check for code changes

If GitHub MCP is available, search for recent PRs that modified:
- dbt models (`.sql` files in `models/`)
- SQL migration scripts
- Schema definition files

If no GitHub MCP, `get_query_changes` will show the SQL modifications.

## Common root causes

- **dbt model change** — column added/removed in a model definition
- **Migration script** — ALTER TABLE or CREATE TABLE AS SELECT with new schema
- **Source schema change** — upstream system changed its schema, propagating downstream
- **Type promotion** — implicit type coercion changed (e.g., INT → FLOAT)
- **Column rename** — a column was renamed, breaking downstream references
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall