Agent skill · software engineering · jeremylongshore

portaljs-define-schema

Define a dataset's metadata profile — infer a Frictionless Table Schema from its data, add Data Package metadata (license, sources, keywords), and write it into datasets.json so the showcase renders a typed field table. Extend or customize via the L0-L3 profile ladder. Use when a registered dataset needs field types, constraints, or catalog metadata before publishing.

Why this skill is useful

Adds specific commands for inferring Frictionless Table Schema and writing metadata that the AI wouldn't reliably generate on its own.

What it needs

Requires node installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

PortalJS — Define Schema Overview Define a dataset's metadata profile — the authoring skill for the metadata-profile contract (lib/metadata). Where portaljs-add-dataset registers that a dataset exists, this skill describes what its data means: infer a Frictionless Table Schema (fields, types, constraints) from sampled data, add the Data Package fields a catalog surfaces (title, licenses, sources, keywords), and write them onto the dataset's entry in datasets.json. The showcase at /@<namespace>/<slug> then renders a typed field table instead of a bare preview. The model is Frictionless-native; DCAT is a serialization layer built on top later, not authored here. The skill runs on a profile ladder — reach for higher levels only when needed: Level What it is When --- --- --- L0 Default frictionless-tabular profile; declare schema + metadata. Default. Standard tabular CSV/TSV. L1 L0 plus extra descriptive package fields. Extra metadata, standard validation is fine. L2 Fully custom profile (own schema template + validate()). A dataset type needing custom validation rules. L3 Multiple registered profiles, resolved per dataset. A portal mixing dataset types. The skill is interactive and never dead-ends: if input is thin it interviews in short rounds, infers defaults from the data, echoes the schema for confirmation, and accepts "use defaults" to proceed with the inferred schema as-is. Prerequisites A scaffolded PortalJS portal with the metadata contract (lib/metadata/types.ts, pages/[owner]/[slug].tsx); see portaljs-new-portal. The target dataset already registered in datasets.json (see portaljs-add-dataset). For tabular schema inference, the dataset's CSV/TSV file present under PORTALDIR/public/data/. JSON/GeoJSON datasets get package metadata only — no fields. Node 18+; tsx optional, used for the schema-validation check. Instructions The canonical, full step-by-step workflow is .claude/commands/portaljs-define-schema.md — the single source of truth. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/portaljs-define-schema

View the source on GitHub

Browse the @skills marketplace