PortalJS is a framework for building data portals that present searchable datasets through a home page, catalog, and dataset showcase. It is for teams that want to choose a data backend, scaffold a Next.js portal, load CSV or JSON data, connect services such as CKAN, and deploy the result. The catalogue entries are agent commands, skills, instructions, and a plugin that guide portal creation and data loading.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/datopian/portaljsnpx agentmods add commands/datopian/portaljs/portaljs-add-resourceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/datopian/portaljs/portaljs-add-resource)<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-add-resource"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-resource/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-add-resource"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-resource.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01598 |
| Opus 5 | $0.00024 | $0.00799 |
| Sonnet 5 | $0.00010 | $0.00320 |
| Haiku 4.5 | $0.00005 | $0.00160 |
Grade A, and why
portaljs-add-resource scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
# or for URLs: curl -L SOURCE -o PORTAL_DIR/public/data/RESOURCE_NAME.EXT How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/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
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 140 lines · 48 tokens per session scan A b084556192e3
portaljs-add-resource is a command published in the GitHub repository datopian/portaljs (2,349 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,598 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
verify-bug
Post-merge UAT verification workflow. Walks JIRA reproduce steps, performs comparative audits (Before/After), attaches evidence to JIRA, and transitions status on PASS.
code-review
Run an AI-assisted PR code review using multi-layer lenses with confidence scoring.
retro-learn
Convert delivery findings into skill, eval, workflow, and documentation improvements.
plan
PM planning workflow that gathers requirements, decomposes them into prioritized tasks, defines API contracts, and produces both a machine-readable plan and a human-readable tracker in docs/plans/.
design
Design workflow that creates design systems, DESIGN.md, and design tokens with anti-pattern enforcement and accessibility checks.
tools
Manage MCP tools with natural language commands to list, enable, and disable tools and tool groups.