agentleFS
MAGA2010MAGA2010/data-master/skills/data-profiler/SKILL.md

data-profiler

Skill78 starsChanged 23 days agoMITView on GitHub

Profile a dataset without changing it: shape, dtypes, missingness, duplicates, distributions, anomalies, candidate group/target/time columns. Emits profile.json.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After routing, before any cleaning plan exists.

    line 17
  2. Very specific:

    Every column carries dtype, n_missing, n_unique and the raw text evidence for its role.

    line 41
  3. Distinctive:

    do not modify the file being profiled.

    line 58
  4. Very specific:

    do not sample silently -- sampled: true must appear in the profile and the report.

    line 59
  5. Distinctive:

    do not use the profiler's dtype guess as the final dtype.

    line 60

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

data-profiler

Stage 1b of the data-master pipeline. The router in ../../SKILL.md owns the end-to-end run; this skill owns one stage and one gate. Read the parent contract before changing anything here: the invariants in ../../SKILL.md (additive-only, types decided once, default-FAIL gates, three-part provenance) are not restated, they are inherited.

When to invoke

After routing, before any cleaning plan exists. The profile is the only artifact the rest of the pipeline is allowed to use to decide what a column is.

Inputs

  • the raw file, read as text for tabular formats (read_mode="text")
  • route.json from data-router

Outputs

  • analysis/profile.json for tabular: schema_version, source, modality, sampled, read_mode, shape, columns, column_roles, anomalies, target_candidate, group_candidate, timeseries_candidate, independent_unit_hint
  • per-modality profiles for text / time-series / image-set / audio-set / geospatial

Commands

python scripts/profile_tabular.py --in <raw.csv> --out outputs/analysis/profile.json

Gate (default FAIL)

Every column carries dtype, n_missing, n_unique and the raw text evidence for its role. group_candidate.rejected must explain every rejected column -- including the ones rejected for having fewer than two observed levels.

Failure modes seen in real runs

  • An all-null column wins the grouping score. With n_unique = 0, a naive balance metric returns 1.0 and an entropy term divided by max(nu,1) returns 2.0 -- the highest score in the table. Reject n_unique < 2 before scoring.
  • A numeric-looking code is profiled as a measurement. species_code is a numeric restatement of species; profiling it as an outcome produces a duplicate test. The structural restatement check must catch it.
  • Reading with inferred dtypes destroys the evidence. 02134 becomes 2134 before the profiler can see it.

Do not

  • do not modify the file being profiled;
  • do not sample silently -- sampled: true must appear in the profile and the report;
  • do not use the profiler's dtype guess as the final dtype; the cleaning plan decides.

Upstream / downstream

  • previous: ../data-router/SKILL.md
  • next: ../data-cleaner/SKILL.md
  • contract: ../../references/workflow-contract.md

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.