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.
npx skills add datopian/portaljs --skill portaljs-define-schema --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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, resolve
- Overview
- Prerequisites
- Instructions
- Output
- Error Handling
- Examples
- Example 1 — Default L0 schema for a CSV dataset
- Example 2 — Metadata only for a GeoJSON dataset
- Example 3 — Custom L2 profile with its own validation
- Resources
What does the portaljs-define-schema skill do?
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.
How do I install it?
Run `npx skills add datopian/portaljs --skill portaljs-define-schema --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From datopian/portaljs, a repository with 2,337 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
