agentleFS
saksham10arora-dotcomsaksham10arora-dotcom/quant-skills/skills/data-quality-audit/SKILL.md

data-quality-audit

Skill0 starsChanged 3 months agoMITView on GitHub

Systematically audit a dataset before modeling: nulls, leakage, duplicates, dtype lies, target contamination. Use when the user loads a new dataset, mentions cleaning data, or before any ML/analysis task on unfamiliar data.

8 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this audit BEFORE any modeling conversation gets serious.

    line 8
  2. Distinctive:

    Never silently drop or impute without reporting which rows/columns were affected.

    line 34

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Data Quality Audit

Run this audit BEFORE any modeling conversation gets serious. Work through the phases; report findings as a table at the end.

Phase 1: Shape and identity

  • Rows x columns; do they match the user's expectation?
  • Primary key exists? Duplicated keys?
  • Date ranges: gaps, duplicates, future dates
  • Grain check: is each row really one entity-time unit? Aggregate and count to verify

Phase 2: Dtype lies

Print dtypes and challenge them:

  • Numeric columns loaded as object (commas, currency symbols, whitespace)
  • IDs and zip codes as integers (leading zeros destroyed)
  • Dates as strings with mixed formats in one column
  • Booleans as 0/1/2

Fix dtype issues before computing anything else; null-rate statistics lie otherwise.

Phase 3: Missingness forensics

For every column with any nulls:

  • Null rate
  • Is missingness correlated with the target? (compute it; if yes, the missingness IS signal)
  • Structured missing vs random: sort by another column and look for runs

Never silently drop or impute without reporting which rows/columns were affected.

Phase 4: Leakage scan

The highest-value phase:

  • Any column that could not be known at prediction time? Flag it
  • Aggregates computed over periods overlapping the label window?
  • Target-derived features disguised (ratios containing the outcome)?
  • Post-outcome statuses (charge-offs, cancellations) present as features?

Phase 5: Distribution shocks

  • Train/test drift on numeric features (report top 5 by KS-statistic)
  • Categorical cardinality explosions between splits
  • Constant or near-constant columns
  • Extreme outliers: count beyond 5 sigma per column; ask if they are errors before winsorizing

Report format

AUDIT: <dataset name>
Rows: N | Cols: M | Memory: X
BLOCKERS: [issues that invalidate modeling until fixed]
WARNINGS: [issues that bias results]
OK: [what was checked and passed]

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.