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.
npx skills add https://github.com/datopian/portaljs --skill portaljs-add-dataset
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.
portaljs-new-portal) with datasets.json,package.json, and pages/[owner]/[slug].tsx present.
git and git-lfs installed, and an Arc account token(or an OSS Giftless key) to mint a push-scoped LFS credential.
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:
$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.
datasets.json, package.json, andpages/[owner]/[slug].tsx exist.
Content-Type header(CSV, TSV, JSON array, or GeoJSON); reject anything else and ask for a conversion.
local file → R2 via Git LFS (default) or inline into public/data/ (fenced exception for
bundled samples or an OSS-no-R2 fallback).
datasets.json — slug, namespace, name, description, file(the routed path/URL), format — keeping (namespace, slug) unique.
npx next build; fix errors (commonly malformed JSON) beforereporting success.
datasets.json (one entry appended).data/<slug>.<ext> tracked via Git LFS (R2 default), orpublic/data/<slug>.<ext> (inline exception). Nothing is created for remote passthrough.
npx next build passes./search and renders at /@<namespace>/<slug>.| Symptom | Cause | Fix |
| --- | --- | --- |
| Fetch fails for a URL source | Non-200 status or unreachable host | Report the HTTP status and ask the user to confirm the URL is publicly accessible. |
| "Not a portaljs-catalog portal" | datasets.json missing | This is an older single-page template; ask the user how to proceed rather than failing silently. |
| Unsupported format | Extension/content-type isn't csv/tsv/json/geojson | Ask the user to convert the source before continuing. |
| git lfs push has nothing to stream | git lfs install --local never ran, so raw bytes were committed instead of a pointer | Run git lfs install --local before git lfs track, re-add and re-commit the file. |
| R2 PUT returns 400 | A broad http.extraHeader was set and replayed onto the presigned URL | Use the _jwt Basic-auth piggyback in lfs.url only — never a global http.extraHeader. |
| (namespace, slug) clash | Another entry already uses that pair | Ask the user for a different slug or namespace. |
| next build fails | Malformed JSON in datasets.json | Print the build log, fix the JSON, rebuild before reporting success. |
/portaljs-add-dataset ./data/co2-emissions.csv namespace=climate
Moves the file into data/, tracks it with Git LFS, pushes it to R2, and appends a manifest
entry whose file is the resulting https://data.portaljs.com/... URL.
/portaljs-add-dataset https://example.org/open-data/trade.csv namespace=trade
Detects the format from the response headers and records the URL as-is in datasets.json —
no bytes are copied.
/portaljs-add-dataset https://example.org/boundaries.geojson namespace=reference adopt=true
Downloads the file, then routes it as a local file through the Git LFS → R2 path so it is
hosted and versioned under the portal (useful when in-browser range queries are needed).
/portaljs-add-dataset ./samples/demo.csv namespace=reference
When the portal has no R2 credentials (OSS self-host) or the file is bundled sample data,
the skill copies it into public/data/ instead, per the .gitattributes inline fence.
.claude/commands/portaljs-add-dataset.mdreferences/reference.mdportaljs-new-portal, portaljs-add-chart, portaljs-add-map, portaljs-define-schemaConvert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.
Statistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use statistical-analysis.
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Create an llms.txt file from scratch based on repository structure following the llms.txt specification at https://llmstxt.org/
Use when working directly with the `esm` Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.
Modal is a serverless cloud platform for running Python on demand, including on-demand GPUs. Use when deploying or serving AI/ML models, running GPU-accelerated workloads (training, fine-tuning, inference), serving web endpoints, scheduling batch jobs, or scaling Python code to cloud containers with the Modal SDK.
Use Therapeutics Data Commons through the PyTDC Python package for registry discovery, approved dataset access, task-aware splits, evaluator metrics, benchmark groups, and bounded molecular-oracle workflows.
Take datopian/portaljs-add-dataset from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.