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

data-router

Skill78 starsChanged 23 days agoMITView on GitHub

Classify any input path into one of eight modalities and emit a route manifest. First stage of data-master; no statistics, no cleaning.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never load it. For every unknown format, search only public format names.

    line 50
  2. Distinctive:

    do not infer modality from the extension alone.

    line 66
  3. Distinctive:

    do not let a mixed folder collapse into one modality -- route each file, then merge reports.

    line 67
  4. Very specific:

    do not overwrite a user-supplied --modality.

    line 69

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

Stage 1a 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

The moment a user hands over a file, a folder, or a glob. Never skip it: a CSV with a timestamp column and a free-text corpus are both .csv/.txt, and the wrong branch produces a technically valid report about the wrong object.

Inputs

  • a path, folder, or glob
  • an optional --modality override, recorded as origin: user

Outputs

  • outputs/route.json -- one entry per input file: {path, modality, evidence, confidence, branch, alternatives_rejected}

Commands

# inspect what will be routed; prints the decision table without writing anything
python scripts/check_deps.py --explain

# the decision table itself
Get-Content references/modality-routing.md

Gate (default FAIL)

route.json exists and every input file has a modality in {tabular, text-corpus, time-series, image-set, audio-set, geospatial, mixed, unknown}. A file with modality: unknown routes to references/research-protocol.md and stops the automatic branch -- it does not silently fall back to tabular.

Pickle-based serialization (.pkl, .pickle, .joblib, .dill, .pck, .pckl, .pt, .pth) is explicitly blocked with blocked_reason: unsafe_deserialization. Never load it. For every unknown format, search only public format names; keep observed bytes, headers, metadata, paths, and records out of WebSearch and WebFetch.

Failure modes seen in real runs

  • A .csv of free text is routed to tabular, then every column is reported as categorical. Sniff the delimiter and the fraction of unique tokens per row before committing.
  • A timestamped table is routed to tabular, so the trend is reported as a static association. If a column parses as datetime and is monotonic or near-monotonic, route to time-series.
  • A glob silently matching zero files reports "no data" instead of failing the gate. Count matched files and fail loudly on zero.

Do not

  • do not infer modality from the extension alone;
  • do not let a mixed folder collapse into one modality -- route each file, then merge reports;
  • do not overwrite a user-supplied --modality; record it as an override with its evidence.

Upstream / downstream

  • next: ../data-profiler/SKILL.md
  • table: ../../references/modality-routing.md
  • unknown inputs: ../../references/research-protocol.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.

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.