Portaljs Add Dataset logo

Portaljs Add Dataset

OrganizationPopular
datopian
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.

Overview

Publisherdatopian
Repositoryportaljs
Skill nameportaljs-add-dataset
Stars
2.4K
Forks
332
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by datopian on GitHub. Read the source before you install it.

Installation

Install the Portaljs Add Dataset AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/datopian/portaljs.git /tmp/portaljs
mkdir -p .claude/skills
cp -r /tmp/portaljs/skills/portaljs-add-dataset .claude/skills/portaljs-add-dataset
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Portaljs Add Dataset in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Portaljs Add Dataset on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Portaljs Add Dataset is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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. Append one entry to datasets.jsonslug, namespace, name, description, file (the routed path/URL), format — keeping (namespace, slug) unique.
  6. Verify the build with npx next build; fix errors (commonly malformed JSON) before reporting success.
  7. Report the route taken, the manifest change, and the showcase URL.

Output

  • Modified: datasets.json (one entry appended).
  • Created (route-dependent): data/<slug>.<ext> tracked via Git LFS (R2 default), or public/data/<slug>.<ext> (inline exception). Nothing is created for remote passthrough.
  • Verified: npx next build passes.
  • Result: the dataset appears in /search and renders at /@<namespace>/<slug>.

Error Handling

SymptomCauseFix
Fetch fails for a URL sourceNon-200 status or unreachable hostReport the HTTP status and ask the user to confirm the URL is publicly accessible.
"Not a portaljs-catalog portal"datasets.json missingThis is an older single-page template; ask the user how to proceed rather than failing silently.
Unsupported formatExtension/content-type isn't csv/tsv/json/geojsonAsk the user to convert the source before continuing.
git lfs push has nothing to streamgit lfs install --local never ran, so raw bytes were committed instead of a pointerRun git lfs install --local before git lfs track, re-add and re-commit the file.
R2 PUT returns 400A broad http.extraHeader was set and replayed onto the presigned URLUse the _jwt Basic-auth piggyback in lfs.url only — never a global http.extraHeader.
(namespace, slug) clashAnother entry already uses that pairAsk the user for a different slug or namespace.
next build failsMalformed JSON in datasets.jsonPrint the build log, fix the JSON, rebuild before reporting success.

Examples

Example 1 — Local CSV, default R2 route

/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.

Example 2 — Remote URL, passthrough (no download)

/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.

Example 3 — GeoJSON adopted into R2

/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).

Example 4 — Bundled sample data, inline exception

/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.

Resources

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Portaljs Add Dataset AI skill do?

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 use Portaljs Add Dataset on TypingMind?

Because you install it once and use it with any model. Portaljs Add Dataset is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Portaljs Add Dataset in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/datopian/portaljs/tree/main/skills/portaljs-add-dataset. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Portaljs Add Dataset?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Portaljs Add Dataset?

As many as you like. As long as a model supports skills, you can use Portaljs Add Dataset with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Portaljs Add Dataset AI skill free?

Yes. It is published on GitHub by datopian under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇