Agent skill · software engineering · jeremylongshore

portaljs-add-dataset

Add a dataset (CSV, TSV, JSON, or GeoJSON) to an existing PortalJS portal. Appends an entry to datasets.json so the catalog and showcase render it automatically; routes the data by source (local file vs remote URL) — R2 via Git LFS by default, remote URLs by passthrough. Use when registering a new dataset in a scaffolded portal.

Why this skill is useful

Adds a script that automates the dataset registration process in PortalJS, including routing and validation steps that are not commonly documented.

What it needs

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

What this skill does

PortalJS — Add Dataset Overview Register a dataset in a PortalJS (portaljs-catalog) portal. The skill appends one entry to datasets.json — the single source of truth for the catalog — and routes the underlying bytes by source first, then size: a local file defaults to R2 via Git LFS, a remote URL defaults to passthrough (no copy). No per-dataset page is created; the catalog at /search lists the new entry and the dynamic showcase route pages/[owner]/[slug].tsx renders it automatically at /@<namespace>/<slug>. Supported formats for the showcase preview: CSV, TSV, JSON (array), and GeoJSON. Prerequisites A scaffolded PortalJS portal (see portaljs-new-portal) with datasets.json, package.json, and pages/[owner]/[slug].tsx present. The source data: a local file path or a publicly reachable URL. For the R2/Git LFS default route: git and git-lfs installed, and an Arc account token (or an OSS Giftless key) to mint a push-scoped LFS credential. Node 18+ and npm available in the portal directory. Instructions The canonical, full step-by-step workflow is .claude/commands/portaljs-add-dataset.md — the single source of truth. Read and follow it when executing. Summary: 1. Gather input from $ARGUMENTS — source (file path or URL), portal directory (default .), dataset name/slug, description, namespace. If the source is missing, interview the user; never dead-end. 2. Validate the portal directory: confirm datasets.json, package.json, and pages/[owner]/[slug].tsx exist. 3. Detect the format from the file extension, URL extension, or Content-Type header (CSV, TSV, JSON array, or GeoJSON); reject anything else and ask for a conversion. 4. Route the data by source: remote URL → passthrough (default) or adopt into R2 (opt-in); local file → R2 via Git LFS (default) or inline into public/data/ (fenced exception for bundled samples or an OSS-no-R2 fallback). 5. …

How to use it

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

@skills jeremylongshore/portaljs-add-dataset

View the source on GitHub

Browse the @skills marketplace