agentleFS
analyticsengineeringanalyticsengineering/ae-toolkit/skills/data-quality-investigation/SKILL.md

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.

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
  1. Very specific:

    Use a hypothesis/evidence/status/next-test workflow.

    line 11
  2. Distinctive:

    Use for diagnosis; do not implement remediation unless the user asks.

    line 17
  3. Distinctive:

    Default silently to Work mode and minimize impact and time-to-evidence.

    line 27
  4. Distinctive:

    Verify the symptom independently using the safest existing artifact or bounded check.

    line 32
  5. Distinctive:

    Create ranked hypotheses. For each, record:

    line 35
  6. Distinctive:

    Run or propose one discriminating, bounded test at a time.

    line 41
  7. Distinctive:

    Consider source, ingestion, orchestration, transformation, storage, semantic, and consumption layers.

    line 42
  8. Distinctive:

    Read-only local inspection may proceed.

    line 46
  9. Distinctive:

    Do not use “root cause” for correlation, temporal proximity, or absence of another explanation.

    line 63
  10. Distinctive:

    Check affected and unaffected cohorts/partitions.

    line 91
  11. Distinctive:

    After recovery, verify completeness, uniqueness, freshness, reconciliation, and downstream consumers.

    line 93
  12. Distinctive:

    Ensure prevention tests detect the demonstrated failure mechanism.

    line 94
  13. Distinctive:

    Prefer metadata, aggregates, bounded partitions, and read replicas.

    line 98
  14. Distinctive:

    Never expose credentials, personal data, or raw incident payloads unnecessarily.

    line 99
  15. Distinctive:

    Do not backfill, rerun, delete, overwrite, pause, or message external channels without explicit approval.

    line 100
  16. Distinctive:

    Do not assume the latest change caused the incident, monitoring is complete, timestamps align, retries are idempotent, upstream data is …

    line 105

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- 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.md before 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

  1. Open an incident record with symptom, scope, impact, timing, and current confidence.
  2. Verify the symptom independently using the safest existing artifact or bounded check; preserve exact timestamps and definitions.
  3. Bound the incident by start/end time, entities, partitions, sources, consumers, and environments. Distinguish event time from processing time.
  4. Build a lineage and recent-change timeline from read-only evidence.
  5. Create ranked hypotheses. For each, record:
    • Hypothesis
    • Evidence for
    • Evidence against
    • Status: UNTESTED, TESTING, SUPPORTED, WEAKENED, REJECTED, or CONFIRMED
    • Next test and expected discriminating outcomes
  6. Run or propose one discriminating, bounded test at a time. Update the record after every result.
  7. Consider source, ingestion, orchestration, transformation, storage, semantic, and consumption layers; do not anchor on the latest deploy.
  8. Recommend containment separately from root-cause remediation.
  9. 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.

Download now (ZIP)

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.