agentleFS
ianshankianshank/Agents/skills/dataset-lint/SKILL.md

dataset-lint

Skill1 starsChanged 59 days agoApache-2.0View on GitHub

Validate an existing evaluation dataset (JSONL/JSON/CSV) for structural correctness, duplicate IDs, missing required fields, and encoding issues — without regenerating it. Use when the user has a dataset from an external source, a Langfuse/BrainTrust export, or a manually-authored eval corpus and wants to lint, validate, check, or verify it before running evaluations.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    If the input file is not found or is a directory, the command exits with exit code 2.

    line 55
  2. Distinctive:

    If lines are not valid JSON or CSV rows, the linter records an error for that line and continues parsing rather than crashing.

    line 56

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

dataset-lint — portable dataset validator

Validate an existing evaluation dataset (JSONL, JSON array, or CSV) for structural correctness, duplicate record IDs, missing required fields, and encoding anomalies — without altering or regenerating the source files.

1. Preconditions (input contract)

  • An input dataset file (.jsonl, .json, or .csv) exists at the specified path.
  • The file is readable and uses UTF-8 encoding.
  • Required fields for an evaluation item (like id or inputs) should be present on each record.
  • Python 3.10+ (stdlib-only; no external dependencies are required).

2. Procedure (the E2E steps)

python scripts/lint_dataset.py --in <path-to-dataset> --out <path-to-report> [--strict] [--format {json,text}]
  1. Invoke scripts/lint_dataset.py with the path to the dataset.
  2. Review the output report. In standard mode:
    • Duplicate IDs or structural errors are flagged as errors.
    • Missing optional fields or empty strings are flagged as warnings.
    • With --strict, warnings are promoted to errors, failing the validation.
  3. Verify the output report file format (JSON by default, human-readable text if selected).

3. Output contract (postconditions — what "done" means)

  • A report is written to the specified --out path (or printed to stdout if omitted).
  • The report includes:
    • file: absolute path of the linted file.
    • total_records: count of parsed records.
    • passed: true if no errors were found, false otherwise.
    • errors: a sorted list of errors (stable key ordering, no timestamps).
    • warnings: a sorted list of warnings.
  • The execution is deterministic and byte-stable (re-running on the same file yields the identical report).
  • The linter exits:
    • 0: if validation passed (no errors).
    • 1: if validation failed (errors found).
    • 2: if a precondition failed (e.g. file missing, invalid arguments).

4. Failure handling

  • If the input file is not found or is a directory, the command exits with exit code 2.
  • If lines are not valid JSON or CSV rows, the linter records an error for that line and continues parsing rather than crashing.

5. Validation gate (before declaring success)

You are not done until this exits 0:

python scripts/validate_skill.py --skill . --tier structural,behavioral

6. Examples

Example 1 — linting a clean dataset

python scripts/lint_dataset.py --in dataset.jsonl --out report.json

Creates report.json with "passed": true, "total_records": 100, "errors": [], and "warnings": [].

Example 2 — linting a broken dataset with duplicate IDs

python scripts/lint_dataset.py --in broken.jsonl --out report.json

Exits with 1. report.json contains "passed": false, and details about duplicate id values in errors.

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.