agentleFS
datasetsdatasets/datapressr/skills/validate/SKILL.md

validate

Skill6 starsChanged 2 months agoMITView on GitHub

Use this skill to check a dataset's datapackage.json and its CSV data for common issues before pushing to DataHub — missing/invalid fields, unsafe name, empty or broken resources, missing schema/licenses/sources, and CSV values that don't match the declared schema (types, dates, primary keys, row width). Runs the deterministic dependency-free validator script. Invoked as `/validate` in Claude Code, or by name; operates on the dataset in the current directory.

76 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use policy-init, secure and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • open-coder-aiSkill

    policy-init

    Create conformant Chock policy from request. args(request, target_path,

    Also in 3 projects that use this

  • uac-opsSkill

    secure

    Threat-model the product, run an OWASP-style pass, and lock down secrets before going live. Use when COMPANY.md Stage is secure, or the user says "security review", "is this secure", "threat model", "secrets", "auth review", or "OWASP".

    Also in 3 projects that use this

  • ORBWEVASkill

    retention

    Customer retention and lifecycle skill. Use when user needs lifecycle email sequences, NPS/CSAT survey design, cohort analysis, or churn reduction strategies. Triggers on "retention", "lifecycle email", "NPS", "CSAT", "customer success", "onboarding emails", "win-back", or /retain commands.

    Also in 3 projects that use this

  • MicrosoftSkill

    create

    Also in 4 projects that use this

  • HermeticOrmusSkill

    close

    End-of-session ritual. Captures session state, updates auto-memory, writes a session summary, then exits the session cleanly.

    Also in 4 projects that use this

  • Hugging FaceSkill

    sprint

    Work on a batch of GitHub issues in parallel using Agent Teams. Creates one worktree per issue with TDD enforcement, coordinates via a lead agent, then produces stacked PRs.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 66 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If scripts/validate-datapackage.mjs exists in the current directory (it's copied in by the init skill), run it and print its output …

    line 10
  2. Very specific:

    If the dataset has no scripts/validate-datapackage.mjs (an older dataset, or one not scaffolded by init), run the copy that ships with this …

    line 21
  3. Very specific:

    If neither copy exists, download …

    line 27
  4. Very specific:

    Every resource path exists on disk

    line 33

“Common” is measured: kept by at least 6 in 10 of the 66 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

Validate: check datapackage.json and its data before pushing

Validate the dataset in the current directory.

  1. If scripts/validate-datapackage.mjs exists in the current directory (it's copied in by the init skill), run it and print its output verbatim:

    node scripts/validate-datapackage.mjs .

    This is a deterministic, dependency-free script — same checks every time, not re-derived by reasoning about the JSON each run. It exits non-zero if there are errors.

    It checks two layers by default: the metadata in datapackage.json, and the values in every CSV resource against that resource's schema. The value checks cover UTF-8 without BOM, LF line endings and a trailing newline, RFC 4180 quoting, a header matching schema.fields in order, row width, the types string, integer, number, boolean, date (a real calendar date), year, yearmonth and datetime, constraints.required and constraints.enum, primaryKey fields non-empty and unique, and same-package foreignKeys. Empty cells (or schema.missingValues) are missing and skip the type check. Any other type, or a non-default format, is a "not checked" warning rather than a silent pass. Each finding names the resource, line and value; repeated findings are capped at five plus a "more of the same" line. --metadata-only skips the value checks (for a file too big to read); --json prints {errors, warnings, notes, stats}.

  2. If the dataset has no scripts/validate-datapackage.mjs (an older dataset, or one not scaffolded by init), run the copy that ships with this skill, in scripts/validate-datapackage.mjs under this skill's own directory (the folder holding this SKILL.md), and print its output verbatim:
    node <this skill's directory>/scripts/validate-datapackage.mjs .
    Then offer to copy that file into the dataset's scripts/ so future runs don't depend on the skill being installed.
  3. If neither copy exists, download https://raw.githubusercontent.com/datasets/datapressr/main/skills/validate/scripts/validate-datapackage.mjs into the dataset's scripts/ and run it as in step 1. Only if that fails too, fall back to checking by hand, and say that you did:

    Errors (must fix before pushing):

    • datapackage.json exists and is valid JSON
    • name is present and URL-safe (lowercase, hyphens only — no spaces, dots, or uppercase)
    • resources array is present and non-empty (not required while status is capture or stub)
    • Every resource path exists on disk
    • README.md, if present, compiles as DataHub MDX: no <https://...> autolinks, HTML comments, stray < or {, or unclosed <br>/<img> (DataHub otherwise shows only "Error parsing MDX")

    Warnings (ok to push, worth fixing):

    • title is present (see Notes for a blank "" at capture/stub)
    • description is present (likewise)
    • Files exist in data/ that are not listed in resources (dotfiles such as .gitkeep are ignored)
    • Any resource file is very large (>50MB) — flag as approaching the small-data ceiling this workflow assumes
    • status is not set or is not a lifecycle stage (capture, stub, archived, structured, enriched, monitored); either way the dataset is treated as past stub
    • licenses is missing or empty (required once status is past stub — see AGENTS.md)
    • sources is missing or empty (required once status is past stub)
    • Any resource has no schema, or a schema with fields missing a type
    • A resource has the same name as the package while others exist (DataHub then shows only that resource)
    • A resource with an obvious identifying column (e.g. named id, or the first column) has no schema.primaryKey declared

    Values (errors unless marked, for each CSV resource with a schema):

    • UTF-8 without BOM; LF line endings and a trailing newline (warnings); RFC 4180 quoting
    • Header row equals schema.fields names in order; every row has that many cells
    • Each non-empty cell parses as its field's type: integer, number (plain decimal, no 1,000), boolean, date (YYYY-MM-DD, a real day), year; string cells with leading/trailing spaces are a warning
    • primaryKey cells are non-empty and the key is unique; foreignKeys point at existing rows

    Notes (don't count as warnings):

    • title or description is the blank "" placeholder /init scaffolds, while status is capture or stub

    Print a clear summary with ✓ for passing checks, ✗ for errors, ⚠ for warnings and · for notes.

Commons datasets: the dataset standard

A dataset going into the Commons (github.com/datasets/<name>, shown at datahub.io/core/<name>) must also pass the Commons dataset standard (docs/dataset-standard.md): open licence, clear source, upkeep declared, a "What stands out" README section, git-sync exclusions and a check-on-push workflow. From a DataPressr checkout: node scripts/dataset-check.mjs <dir> --new --prepublish before the first publish, and --live after. It builds on this validator, so a pass there includes everything above.

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.