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-mapWrote 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-map)<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-add-map"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-map.svg" alt="Measured on agentmods" 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.00041 | $0.03463 |
| Opus 5 | $0.00020 | $0.01732 |
| Sonnet 5 | $0.00008 | $0.00693 |
| Haiku 4.5 | $0.00004 | $0.00346 |
Grade A, and why
portaljs-add-map 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 6d 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/MAP_SLUG.geojson How it starts
The opening of the file, as written. The whole thing — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/portaljs-add-map
Add an interactive Leaflet map as a view on a dataset's showcase in a
portaljs-catalog portal. Installs react-leaflet/leaflet (once), generates a reusable
Map component, and renders the map into the Views section of the showcase route
pages/[owner]/[slug].tsx for the chosen GeoJSON dataset.
Use this when a dataset's data is geographic (points, lines, polygons) and you want a map
view in addition to the showcase's default metadata + download. The dataset should already
be registered in datasets.json (e.g. via /portaljs-add-dataset) with format: "geojson"; if
it isn't yet, this skill can copy the file and add the entry first.
Required input — ask, don't error
- Dataset — which dataset to map, by slug. It should be a
geojsonentry indatasets.json. If a source file/URL is given for a not-yet-registered dataset, the skill copies it into/public/data/and appends a manifest entry. - Portal directory — path to the portal project (defaults to current directory).
- Source (only if the dataset isn't registered yet) — a local file path
(
./data/file.geojson) or public URL. Must be GeoJSON (aFeature,FeatureCollection, or geometry object).
If the target dataset isn't specified, ask which one (by name/slug) — never dead-end with a missing-input error.
Steps
1. Gather input from $ARGUMENTS (interview if thin)
Extract:
DATASET— dataset slug (the map target)SOURCE— file path or URL (only needed if the dataset isn't already in the manifest)PORTAL_DIR— portal directory (default:.)MAP_SLUG— slug for a new dataset (default: lowercase hyphenated filename)MAP_NAME— human-readable name (default: derived from filename)NAMESPACE— namespace for a new dataset (default: the catalog's existing namespace)DESCRIPTION— optional one-line description
If neither a dataset nor a source is given, ask and wait. When the user doesn't know
the slug, read PORTAL_DIR/datasets.json and list the GeoJSON datasets so they can pick:
To add a map I need either:
1. Which existing dataset to map? (slug — GeoJSON datasets in your catalog: <name (slug)>, …)
…or a GeoJSON source to add and map:
2. Source: local file path or public URL to a GeoJSON file
3. Portal directory (Enter for current directory)
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.
- 6d ago First seen · 334 lines · 41 tokens per session scan A 2be99b7feece
portaljs-add-map is a command published in the GitHub repository datopian/portaljs (2,349 stars, last pushed 2d ago), licensed MIT. It adds 41 tokens to every session and 3,463 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
beautify
When /beautify is invoked, immediately execute the following steps.
page
Create Next.js page following mirror pattern.
check-cache
Audit caching configuration in $ARGUMENTS for Next.js 15 correctness.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.