ivanshamaev/de-agent-skills/de-rca
Claude Code and agent skill by ivanshamaev/de-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
DE pipeline root cause analysis — failure taxonomy, lineage tracing, upstream/downstream impact, log analysis patterns, Airflow/Spark/dbt failure diagnosis, data quality anomaly RCA, 5-Whys template, incident timeline reconstruction, runbook-style investigation checklists
Install
npx vskill@latest install ivanshamaev/de-agent-skills/de-rcaSKILL.md
The same SKILL.md was published earlier as ivanshamaev/de-agent-skills/de-rca.
DE Root Cause Analysis
When to Use
Load this skill when the user needs to:
- Triage a failing or stuck data pipeline (Airflow DAG, Spark job, dbt run)
- Investigate a data quality incident — wrong numbers, missing rows, duplicates, nulls
- Analyze an SLA breach — pipeline ran but finished too late
- Respond to a production incident — unexpected data anomaly reported by stakeholders
- Trace blast radius — which downstream tables/dashboards/jobs are affected by a bad upstream table
- Write an RCA document or post-mortem after resolving an incident
- Build investigation checklists and runbooks for on-call engineers
1. Failure Taxonomy
Correctly classifying the failure type determines the fastest investigation path. Misclassifying (e.g., treating a logic bug as an infrastructure problem) wastes hours.
1.1 Infrastructure Failures
| Symptom | Likely Cause | First Check | |
|---|---|---|---|
java.lang.OutOfMemoryError: Java heap space | Executor OOM | Spark executor memory, data skew | |
Container killed by YARN for exceeding memory limits | Cluster container eviction | spark.executor.memoryOverhead, partition count | |
No space left on device | Disk full on worker or shuffle dir | /tmp usage, shuffle spill, HDFS quota | |
Connection refused / Connection timed out | Network partition, service down | VPC routing, security groups, DNS | |
Task preempted | Cluster eviction (spot/preemptible) | Cloud provider events, spot interruption notices | |
Disk I/O error | Storage hardware failure | Cloud disk health, HDFS block scan |
1.2 Data Failures
| Symptom | Likely Cause | First Check | |
|---|---|---|---|
| Row count dropped 50%+ vs yesterday | Missing source data, source job failed | Source system logs, upstream DAG status | |
| Unexpected NULLs in non-nullable columns | Schema drift in source, ETL bug | Source schema changelog, sample the staging table | |
| Primary key violations | Duplicate data at source, re-ingestion overlap | Dedup logic, incremental filter range | |
| Referential integrity broken (FK mismatches) | Out-of-order load, missing dimension row | Dimension load order, late-arriving dims | |
| Volume 10x larger than normal | Re-ingestion of historical data, filter removed | Source query, watermark/cursor value |
1.3 Logic Failures
| Symptom | Likely Cause | First Check | |
|---|---|---|---|
| Off-by-one in daily partition | Date filter uses < today instead of <= yesterday | Check WHERE clause boundary conditions | |
| Wrong aggregation totals | Join fan-out (many-to-many producing extra rows) | Count rows before/after join | |
| Timezone mismatch | Pipeline runs in UTC, business logic expects local time | CONVERT_TZ, AT TIME ZONE, DST transitions | |
| Incorrect incremental logic | is_incremental() filter reads wrong watermark column | dbt model SQL, max(updated_at) vs max(created_at) | |
| Negative revenue, impossible values | Sign inversion, unit mismatch (cents vs dollars) | Compare raw source values vs transformed |
1.4 Dependency Failures
| Symptom | Likely Cause | First Check | |
|---|---|---|---|
Task stuck in queued state for hours | Upstream DAG not finished; ExternalTaskSensor waiting | Parent DAG run status in Airflow UI | |
| Empty table after successful run | Upstream API returned 200 but empty payload | API response sample, rate-limit headers | |
| Kafka consumer 6h behind | Producer spike or consumer slowdown | Consumer lag (kafka-consumer-groups.sh), topic throughput | |
| API call returns 503/429 | External service overloaded or rate-limited | HTTP response codes in logs, Retry-After header |
1.5 Configuration Failures
| Symptom | Likely Cause | First Check | |
|---|---|---|---|
OperationalError: could not connect to server | Wrong host/port in connection string | Airflow connection ID value, env var override | |
KeyError: 'DB_PASSWORD' | Missing environment variable in deployed environment | Secret manager, Kubernetes secret mount | |
AnalysisException: Table not found | Wrong schema/database prefix, wrong environment | spark.catalog.currentDatabase(), connection config | |
| Wrong partition overwritten | Partition key column name changed | partitionBy argument vs actual column name | |
| Wrong S3 bucket (dev data in prod) | Environment variable not injected | Compare ENVIRONMENT env var with actual path |
1.6 Concurrency Failures
| Symptom | Likely Cause | First Check | |
|---|---|---|---|
| Duplicate rows after concurrent runs | Two DAG runs writing same partition simultaneously | Airflow max_active_runs, file-level locking | |
LockWaitTimeout / DeadlockDetected | Two writers competing on same table/row | PostgreSQL pg_locks, transaction isolation level | |
| Partial data after apparent success | Race between writer and reader on non-ACID storage | Use ACID table format (Delta/Iceberg), two-phase write | |
| XCom overwritten by parallel task | Two tasks pushing to the same XCom key | Unique XCom keys per task instance |
2. Investigation Framework — 5-Step RCA Process
Step 1: Timeline Reconstruction
The timeline is the foundation of all RCA. Establish three timestamps first:
- Event time — when did the bad data/failure actually occur in the data?
- Detection time — when did a monitor, alert, or human notice?
- Impact time — when did downstream consumers first see the problem?
Step 2: Blast Radius Assessment
Before digging into root cause, know what is broken. This prevents partial fixes and missed downstream alerts.
Step 3: Evidence Collection
Collect evidence before forming hypotheses — evidence is objective, hypotheses are not.
Checklist:
- [ ] Task/job logs (full log, not just last N lines)
- [ ] Row counts before and after the failing step
- [ ] Sample of affected rows (5-20 rows is usually enough)
- [ ] Metric graphs for the failure window (Grafana, CloudWatch, Datadog)
- [ ] Schema of source and target tables at failure time
- [ ] Git history of pipeline code — any deploy in the last 24h?
- [ ] Infrastructure change log — cluster resize, config push, dependency upgrade?
- [ ] Upstream system status page or on-call contact
Step 4: Hypothesis Generation and Elimination
Form hypotheses from the failure taxonomy (Section 1), then eliminate them systematically with evidence.
Good elimination requires a binary question: "If hypothesis X is true, what observable artifact would exist?" If that artifact is absent, eliminate X.
Step 5: Root Cause Statement and Contributing Factors
A root cause statement is a single sentence using the because chain:
"The orders dashboard showed zero revenue on 2024-06-01 because thefact_ordersdbt model produced zero rows because the incremental filter usedupdated_at > '{{ ds }}'withdsin UTC while source timestamps are in US/Eastern, excluding all rows written after 19:00 UTC the previous day."
Contributing factors are conditions that made the root cause possible or worse:
- No data volume alert on
fact_ordersto catch the zero-row scenario - Timezone assumption was undocumented in the model's description
- The issue was not caught in staging because the staging run uses a small sample
3. Airflow Failure Diagnosis
3.1 Task Log Location and Key Patterns
Structured log patterns to search (JSON logs):
3.2 Task Instance State Machine
| State | Meaning | Next action | |
|---|---|---|---|
running | Actively executing | Wait; check for hangs (no log output > 10 min) | |
failed | Raised an exception, no retries left | Check logs; fix and clear to re-run | |
up_for_retry | Failed but retries remain | Wait for retry; check transient vs permanent | |
upstream_failed | A task this depends on failed | Fix the upstream task first; then clear downstream | |
skipped | Upstream used BranchOperator and chose a different path | Expected behavior; verify branch logic | |
up_for_reschedule | Sensor in reschedule mode, condition not met yet | Check sensor poke condition; may need to investigate source | |
deferred | Task deferred to triggerer (async sensor) | Normal for deferrable operators; check triggerer logs | |
zombie | Worker died without updating state | Scheduler detects and marks failed; check worker health |
3.3 DagBag Import Errors
DagBag errors prevent the DAG from appearing in the UI at all — the scheduler silently skips broken DAGs.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/de_rca/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ivanshamaev/de-agent-skills/de-rca)