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/portaljsInstalls into whichever agent you are using.
Claude Commands
Claude Code slash commands
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of portaljs-add-resource
portaljs-add-resource scores 93/100 on our quality scale, 699th of 4,698 Development & Engineering skills we index (top 15%).
Its Claude Commands is 6.1 KB long, well organised into 12 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 | Claude Commands |
| claude-memby thedotmack | 100 | 117.6k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 92.8k | 1d ago | CLAUDE.md |
Frequently asked questions
- How do I install portaljs-add-resource?
- Run
npx skills add datopian/portaljs. 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 Claude Commands 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 GitHubdescription: 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. allowed-tools: Read, Write, Edit, Bash, WebFetch
/portaljs-add-resource
Add a resource (an additional file) to a dataset that already exists in a
portaljs-catalog portal. Use this when a dataset is more than one file — data + a data
dictionary + a methodology doc, or quarterly/yearly files under one dataset. Where
/portaljs-add-dataset creates a new dataset (one file), this adds
a file to an existing one.
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 is migrated to resources[] automatically the first time
you add a second file — no data is lost.
Required input — ask, don't error
- Target dataset — which dataset to add to, by
slug(ornamespace/slug). - Source — a local file path or a public URL for the new resource.
- Portal directory — defaults to the current directory.
- Resource name/title (optional) — a short id + human title for the resource.
Supported formats: CSV, TSV, JSON (array), GeoJSON (same as /portaljs-add-dataset).
If the target dataset or source is missing, ask — never dead-end. When the user
doesn't know the slug, read datasets.json and list the datasets so they can pick.
Steps
1. Gather input from $ARGUMENTS (interview if thin)
Extract:
DATASET— target dataset slug (ornamespace/slug).SOURCE— file path or URL of the new resource.PORTAL_DIR— portal directory (default:.).RESOURCE_NAME— short id within the dataset (default: lowercase-hyphenated filename stem; must be unique among the dataset's resources).RESOURCE_TITLE— human title (default: derived from the filename).DESCRIPTION— optional one-line description of the resource.
If DATASET or SOURCE is missing, ask (listing existing datasets from datasets.json
when the slug is unknown) and wait.
2. Validate the portal + locate the dataset
Confirm PORTAL_DIR/datasets.json, PORTAL_DIR/package.json, and
PORTAL_DIR/pages/[owner]/[slug].tsx exist (the catalog template). Find the dataset entry
by slug (and namespace if given). If it doesn't exist, tell the user and offer to
create it with /portaljs-add-dataset instead.
3. Detect format and copy/fetch the file
Same as /portaljs-add-dataset step 3: detect format from extension/Content-Type
(csv/tsv/json/geojson), fetch a URL (check HTTP status) or check a local path
exists, then copy into the portal:
mkdir -p PORTAL_DIR/public/data
cp SOURCE PORTAL_DIR/public/data/RESOURCE_NAME.EXT
# or for URLs: curl -L SOURCE -o PORTAL_DIR/public/data/RESOURCE_NAME.EXT
Pick a filename that won't collide with an existing file in /public/data.
4. Add the resource to the dataset entry
Open PORTAL_DIR/datasets.json and update the target dataset, matching the Dataset /
Resource shape in lib/providers/types.ts:
-
If the dataset has no
resourcesyet (it's a single-file dataset with top-levelfile/format/schema), migrate it first: move the existing file into aresourcesarray as the first resource, then remove the now-redundant top-levelfile/format(and top-levelschema, which becomes that resource's schema). Preserve the existing data — this is a lossless transform:// before { "slug": "orders", "name": "Orders", "file": "orders.csv", "format": "csv", "schema": { ... } } // after (migrated) + new resource appended { "slug": "orders", "name": "Orders", "resources": [ { "name": "data", "path": "orders.csv", "format": "csv", "title": "Orders", "schema": { ... } }, { "name": "RESOURCE_NAME", "path": "RESOURCE_NAME.EXT", "format": "<detected>", "title": "RESOURCE_TITLE", "description": "DESCRIPTION" } ] } -
If the dataset already has
resources, just append the new resource object. Ensurenameis unique within the array (the showcase uses it as the section key/anchor).
Keep all package-level fields (description, keywords, licenses, sources, version,
…) on the dataset. Drop description on the resource only if there genuinely is none.
That is the entire registration — getResources() (lib/datasets.ts) reads the
resources array and the showcase renders a section per resource automatically.
5. Verify the build
cd PORTAL_DIR
npx next build > /tmp/portaljs-add-resource-build.log 2>&1
BUILD_EXIT=$?
tail -20 /tmp/portaljs-add-resource-build.log
The common failure is malformed JSON in datasets.json. Fix and rebuild before reporting
success.
6. Report
✓ 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[] (no data lost).
Notes
- One source of truth. Resources live on the dataset's
datasets.jsonentry. No page edits — the showcase loopsgetResources(dataset). - Per-resource schema. Describe a resource's fields with
/portaljs-define-schema— its Frictionless Table Schema renders under that resource's section. - Single-file stays simple. Datasets with one file keep the plain
file/formatshape; migration toresources[]only happens when a second file is added.
Example
/portaljs-add-resource orders ./data/orders-data-dictionary.csv (title: "Data dictionary")
Adds a data dictionary to the existing orders dataset: if orders was a single CSV, it's
migrated to a two-resource dataset (the data + the dictionary), and its showcase now shows
a section for each. With no arguments, the skill lists your datasets and asks which one.
Related Skills
claude-mem
117.6kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
92.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
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.
