--- name: inspect-data description: Inspect a data file (JSONL, JSON, Parquet, HDF5, or NetCDF) or a HuggingFace dataset to understand its structure. Usage: /inspect-data [additional instructions] --- Inspect a data file or a HuggingFace dataset to understand its structure. The argument is either a local file path or a HuggingFace dataset identifier, optionally followed by additional instructions. Parse the argument string: the first token is the path or dataset id; everything after is additional instructions (may be empty). **First — decide whether the target is a local file or a HuggingFace dataset:** - If the argument looks like a dataset id (no file extension and either (a) contains `/` like `allenai/c4`, or (b) is a bare name like `squad` that does not exist as a local path), treat it as a HuggingFace dataset and follow the HuggingFace section below. - Otherwise, treat it as a local file and follow the per-extension steps. **Preliminary step for local files — check file size:** Before inspecting, run `ls -l` on the file to get its size. If the file is **larger than 100 MB**, set a `large_file` flag and pass `--large` to the inspection script (which reads only a small sample instead of the full file). The inspection scripts live in `scripts/` next to this skill: - `scripts/json_inspector.py` - `scripts/parquet_inspector.py` - `scripts/hdf5_inspector.py` - `scripts/nc_inspector.py` - `scripts/hf_inspector.py` Each script uses `uv`'s inline script metadata to pull its own dependencies. Run them with `uv run