data-quality-investigation
Skill3 starsChanged 31 days agoMITView on GitHub
Investigates data-quality incidents through scoped hypotheses, evidence, status updates, and controlled next tests. Use when metrics drift, data is missing/duplicated/stale, tests fail, or a pipeline output appears wrong.
In this repository24 other files it gives its agents.
- analytics-requirementsSkill
- api-pipelineSkill
- bi-modelSkill
- build-modelSkill
- data-model-reviewSkill
- data-profileSkill
- dbt-healthSkill
- explain-data-codeSkill
- freshness-investigationSkill
- incremental-modelSkill
- metric-definitionSkill
- migration-planSkill
- model-documentationSkill
- model-testsSkill
- project-profileSkill
- pr-reviewSkill
- refactor-modelSkill
- rename-modelSkill
- semantic-layerSkill
- source-setupSkill
- sql-reviewSkill
- trace-lineageSkill
- validate-dbtSkill
- yaml-maintenanceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 15 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use a hypothesis/evidence/status/next-test workflow.
- Distinctive: line 17
Use for diagnosis; do not implement remediation unless the user asks.
- Distinctive: line 27
Default silently to Work mode and minimize impact and time-to-evidence.
- Distinctive: line 32
Verify the symptom independently using the safest existing artifact or bounded check.
- Distinctive: line 35
Create ranked hypotheses. For each, record:
- Distinctive: line 41
Run or propose one discriminating, bounded test at a time.
- Distinctive: line 42
Consider source, ingestion, orchestration, transformation, storage, semantic, and consumption layers.
- Distinctive: line 46
Read-only local inspection may proceed.
- Distinctive: line 63
Do not use “root cause” for correlation, temporal proximity, or absence of another explanation.
- Distinctive: line 91
Check affected and unaffected cohorts/partitions.
- Distinctive: line 93
After recovery, verify completeness, uniqueness, freshness, reconciliation, and downstream consumers.
- Distinctive: line 94
Ensure prevention tests detect the demonstrated failure mechanism.
- Distinctive: line 98
Prefer metadata, aggregates, bounded partitions, and read replicas.
- Distinctive: line 99
Never expose credentials, personal data, or raw incident payloads unnecessarily.
- Distinctive: line 100
Do not backfill, rerun, delete, overwrite, pause, or message external channels without explicit approval.
- Distinctive: line 105
Do not assume the latest change caused the incident, monitoring is complete, timestamps align, retries are idempotent, upstream data is …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Generated by scripts/build_targets.py from src/skills. Edit the source and rebuild; changes made here are overwritten. -->Self-contained install.
<skill-dir>is the directory holding this file: substitute its absolute path in the commands below and run them from the repository root. Read<skill-dir>/references/operating-rules.mdbefore acting; it holds the toolkit's always-on rules, which this install cannot load on its own. This install has no safety hooks, so the approvals those rules describe rest on you and the agent rather than on an enforced gate.
Data Quality Investigation
Use a hypothesis/evidence/status/next-test workflow. Never declare root cause without supporting evidence.
When to use
- Investigate missing, duplicate, stale, delayed, malformed, inconsistent, or unexpectedly changed data.
- Triage failed data tests, dashboard discrepancies, metric breaks, and pipeline incidents.
- Use for diagnosis; do not implement remediation unless the user asks.
Required context
Obtain:
- Symptom, reporter, first observation, expected versus actual result, affected asset/metric, and business impact.
- Time window, environment, recent known changes, pipeline lineage, owners, and available logs/tests/artifacts.
- Access and privacy boundaries plus incident urgency.
Default silently to Work mode and minimize impact and time-to-evidence. In Learn mode, explain hypothesis testing and evidence quality. In Assessment mode, evaluate the learner's submitted hypotheses and tests without revealing the investigation answer.
Inspection procedure
- Open an incident record with symptom, scope, impact, timing, and current confidence.
- Verify the symptom independently using the safest existing artifact or bounded check; preserve exact timestamps and definitions.
- Bound the incident by start/end time, entities, partitions, sources, consumers, and environments. Distinguish event time from processing time.
- Build a lineage and recent-change timeline from read-only evidence.
- Create ranked hypotheses. For each, record:
- Hypothesis
- Evidence for
- Evidence against
- Status:
UNTESTED,TESTING,SUPPORTED,WEAKENED,REJECTED, orCONFIRMED - Next test and expected discriminating outcomes
- Run or propose one discriminating, bounded test at a time. Update the record after every result.
- Consider source, ingestion, orchestration, transformation, storage, semantic, and consumption layers; do not anchor on the latest deploy.
- Recommend containment separately from root-cause remediation.
- Declare root cause only when evidence establishes the causal mechanism, affected path, and observed symptom. Otherwise report the leading hypothesis and uncertainty.
Read-only local inspection may proceed. Connected observability, warehouse, orchestrator, ticketing, or communication functionality requires an explicit user trigger. Costly queries, reruns, backfills, mutations, or outbound updates require approval.
Decision framework
Prioritize tests by:
- Ability to discriminate among hypotheses.
- Safety, privacy, scan cost, and reversibility.
- Time to result and incident impact.
- Proximity to the first known bad boundary.
Confidence states:
- Confirmed root cause — causal mechanism reproduced or directly evidenced, with alternatives materially ruled out.
- Leading hypothesis — best current explanation, but a named causal test remains.
- Unknown — evidence is insufficient or contradictory.
Do not use “root cause” for correlation, temporal proximity, or absence of another explanation.
Failure modes
- Jumping from a failed downstream metric to a source-system blame statement.
- Running broad warehouse scans before bounding partitions and columns.
- Changing code or rerunning pipelines during diagnosis without preserving evidence.
- Treating recovery as proof of root cause.
- Ignoring time zones, late data, backfills, retries, or semantic-layer changes.
- Posting unsupported conclusions as incident status.
Evidence required
Maintain an evidence ledger with timestamp, source, scope, query/command or artifact, result, and interpretation. Preserve the distinction between raw observation and inference. A confirmed root cause requires:
- First bad boundary or causal change.
- Mechanism linking it to the symptom.
- Reproduction, counterfactual, or equivalent direct evidence.
- Scope consistent with affected and unaffected data.
- Contradictory hypotheses addressed.
Output contract
Return # Data Incident Investigation with: Observed symptom; Most likely causes; Evidence checked; Ruled-out hypotheses; Remaining hypotheses; Root cause, if proven; Recommended fix; Prevention; Tests/alerts to add. Preserve a Hypothesis / Evidence / Status / Next test ledger in the report.
Verification
- Reproduce or independently confirm the symptom.
- Check affected and unaffected cohorts/partitions.
- Validate time zones, run IDs, code revisions, and artifact freshness.
- After recovery, verify completeness, uniqueness, freshness, reconciliation, and downstream consumers.
- Ensure prevention tests detect the demonstrated failure mechanism.
Safety/privacy
- Prefer metadata, aggregates, bounded partitions, and read replicas.
- Never expose credentials, personal data, or raw incident payloads unnecessarily.
- Do not backfill, rerun, delete, overwrite, pause, or message external channels without explicit approval.
- Preserve forensic evidence before potentially state-changing actions.
What not to assume
Do not assume the latest change caused the incident, monitoring is complete, timestamps align, retries are idempotent, upstream data is correct, one symptom has one cause, restored data is complete, or correlation proves causation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

