portaljs-add-resource
Add another file (resource) to an EXISTING dataset in a PortalJS portal — a data dictionary, methodology, or an additional data file. Turns a single-file dataset into a multi-resource one; the showcase renders a section per resource
Install / Use
npx skills add datopian/portaljs --skill portaljs-add-resourceInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of portaljs-add-resource
portaljs-add-resource scores 93/100 on our quality scale, 701st of 4,700 Development & Engineering skills we index (top 15%).
Its SKILL.md is 6.1 KB long, well organised into 11 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
With 2,356 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so portaljs-add-resource is actively maintained.
- Our last check on 2026-10-26 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-30. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
portaljs-add-resource compared with similar skills
All 4 of these similar skills score higher than portaljs-add-resource; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| portaljs-add-resource (this skill)by datopian | 93 | 2.4k | 2mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install portaljs-add-resource?
- Run
npx skills add datopian/portaljs --skill portaljs-add-resource. The install tabs above show the steps for each supported agent. - Which AI agents does portaljs-add-resource work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is portaljs-add-resource safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is portaljs-add-resource still maintained?
- The repository was last updated about 2 months ago, so portaljs-add-resource is actively maintained.
Skill content
View source on GitHubname: portaljs-add-resource description: Add another file (resource) to an EXISTING dataset in a PortalJS portal — a data dictionary, methodology, or an additional data file. Turns a single-file dataset into a multi-resource one; the showcase renders a section per resource. Use when a dataset needs a second file, such as a data dictionary, methodology doc, or an additional period's data. allowed-tools: Read, Write, Edit, Bash(npm:), Bash(curl:), Bash(mkdir:), Bash(cp:), WebFetch version: 1.0.0 author: Datopian hello@datopian.com license: MIT compatibility: Claude Code with PortalJS portals (Next.js 14, React 18, Node 18+). Runs from any project via the plugin, a personal ~/.claude/commands install, or a portaljs clone. tags:
- portaljs
- data-portal
- resource
- data-dictionary
- metadata
- catalog
PortalJS — Add Resource
Overview
Add a resource — an additional file — to a dataset that already exists in a
portaljs-catalog portal. Where /portaljs-add-dataset creates a new dataset
(one file), this skill adds a file to an existing one: a data dictionary, a
methodology document, or another data file (e.g. a second year's figures).
Mirrors the Frictionless Data Package model: a dataset holds a resources[] array,
and the showcase at /@<namespace>/<slug> renders one section per resource (preview,
schema, download). A single-file dataset migrates to resources[] automatically the
first time a second file is added — no data is lost.
Prerequisites
- An existing PortalJS portal (
portaljs-catalogtemplate) withdatasets.json,package.json, andpages/[owner]/[slug].tsxpresent. - The target dataset already registered in
datasets.json. - The new resource's source: a local file path or a public URL, in CSV, TSV, JSON (array), or GeoJSON format.
- Node 18+ installed to run
npx next buildfor verification.
Instructions
The canonical, full step-by-step workflow lives in
.claude/commands/portaljs-add-resource.md
in this repository — that file is the single source of truth. Read and follow it. Summary:
- Gather input (interview if thin):
DATASET(slug ornamespace/slug),SOURCE(path or URL),PORTAL_DIR(default.),RESOURCE_NAME,RESOURCE_TITLE,DESCRIPTION. IfDATASETorSOURCEis missing, list datasets fromdatasets.jsonand ask. - Validate the portal and locate the dataset entry by slug (and namespace, if
given). If the dataset does not exist, offer
/portaljs-add-datasetinstead. - Detect the format from extension/Content-Type, fetch (check HTTP status) or
confirm the local path exists, then copy into
PORTAL_DIR/public/data/under a non-colliding filename. - Update
datasets.json: if the dataset has noresourcesyet, migrate its top-levelfile/format/schemainto the first resource (lossless), then append the new resource; ifresourcesalready exists, just append, keepingnameunique within the array. - Verify the build with
npx next build, capturing output to a log file; fix malformed JSON before reporting success. - Report the outcome (see Output below).
Output
✓ Resource added to DATASET: RESOURCE_TITLE (RESOURCE_NAME.EXT)
- Data file: public/data/RESOURCE_NAME.EXT
- Manifest: datasets.json (dataset now has <n> resources)
- Showcase: /@<namespace>/<slug> renders a section per resource
If this was the first migration to multi-resource, note that the dataset's single
file was moved into resources[] with no data lost.
Error Handling
| Symptom | Cause | Fix |
|---|---|---|
| "Dataset not found" | DATASET slug/namespace doesn't match any entry in datasets.json | List datasets from datasets.json and ask the user to pick, or run /portaljs-add-dataset to create it |
| npx next build fails with a JSON parse error | Manually edited datasets.json has a trailing comma or unescaped character | Re-open the file, fix the JSON, and rebuild before reporting success |
| Resource file fails to fetch (non-2xx) | SOURCE URL is wrong, private, or the host is down | Confirm the URL in a browser or with curl -I SOURCE; ask for a corrected URL or a local path |
| New resource's filename collides with an existing one in /public/data | Auto-derived RESOURCE_NAME matches an existing file stem | Pick a distinct RESOURCE_NAME, or let the skill append a numeric suffix |
| Showcase doesn't render the new section after build | name in the new resource object duplicates an existing resource's name | Rename the resource's name to something unique within that dataset's resources[] |
Examples
Example 1 — Add a data dictionary to a single-file dataset
/portaljs-add-resource orders ./data/orders-data-dictionary.csv --title "Data dictionary"
orders was a single CSV. It is migrated to a two-resource dataset (the original
data plus the dictionary), and its showcase now renders a section for each.
Example 2 — Add a resource by URL to a dataset that already has resources
/portaljs-add-resource climate-observations https://example.org/data/methodology.json --name methodology --title "Methodology notes"
The skill fetches the URL, checks the HTTP status, copies it to
public/data/methodology.json, and appends it to the existing resources[] array.
Example 3 — Run with no arguments (interview mode)
/portaljs-add-resource
With no arguments, the skill lists datasets from datasets.json, asks which one to
extend and for the new file's path or URL, then proceeds through steps 2-6 above.
Resources
.claude/commands/portaljs-add-resource.md— canonical workflow this skill followsreferences/reference.md— resource entry fields, single-to-multi-resource layout, troubleshooting- Related skills:
/portaljs-add-dataset(create a new dataset),/portaljs-define-schema(describe a resource's fields) - Frictionless Data — Data Package resources — the data model this feature mirrors
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
