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-chartWrote 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-chart)<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-add-chart"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-chart.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.00046 | $0.03523 |
| Opus 5 | $0.00023 | $0.01761 |
| Sonnet 5 | $0.00009 | $0.00705 |
| Haiku 4.5 | $0.00005 | $0.00352 |
Grade A, and why
portaljs-add-chart 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 8d 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.
fetch(url) How it starts
The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/portaljs-add-chart
Add a visualization to a dataset's showcase in a portaljs-catalog portal. Installs
recharts (added directly — not @portaljs/components), writes a reusable
client-side Chart component into the portal's components/, and renders a <Chart />
into the Views section of the showcase route pages/[owner]/[slug].tsx for the chosen
dataset.
Use this after the dataset is registered in datasets.json (e.g. via /portaljs-add-dataset). The
chart reads the same /public/data/<file> the showcase's <Table /> already uses — no
data is duplicated.
Required input — ask, don't error
- Dataset — which dataset to chart, by slug (e.g.
co2-emissions) orslugwithin a namespace. It must already be an entry indatasets.json. - X axis column — the column name for the category/X axis (e.g.
year). - Y axis column(s) — one or more numeric column names to plot (e.g.
populationorimports,exports). - Portal directory — path to the portal project (defaults to current directory).
- Chart type —
line(default),bar,area,pie, orscatter.
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 (required)X— x-axis column name (required)Y— comma-separated y-axis column name(s) (required)TYPE— chart type, one ofline|bar|area|pie|scatter(default:line)PORTAL_DIR— portal directory (default:.)TITLE— chart heading (default: derived from Y columns, e.g. "Population over Year")
If the dataset (or X/Y) is missing, ask and wait. When the user doesn't know the slug,
read PORTAL_DIR/datasets.json and list the available datasets (name → slug) so they
can pick one:
To add a chart I need:
1. Which dataset? (slug — your catalog has: <name (slug)>, …)
2. X axis column (e.g. year)
3. Y axis column(s), comma-separated (e.g. population or imports,exports)
4. Chart type [line] (line|bar|area|pie|scatter)
5. 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.
- 8d ago First seen · 309 lines · 46 tokens per session scan A 28846ae8ef66
portaljs-add-chart is a command published in the GitHub repository datopian/portaljs (2,349 stars, last pushed 4d ago), licensed MIT. It adds 46 tokens to every session and 3,523 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.
retro-learn
Convert delivery findings into skill, eval, workflow, and documentation improvements.
audit-code
When /audit-code [target] is invoked, immediately execute the following steps to analyze code quality, security, and adherence to project standards.
build
Smart build with validation, error detection, and auto-fix.
pre-commit-full
Command: /pre-commit-full Purpose: Comprehensive pre-commit validation orchestrating all error prevention checks.
scan-errors
Command: /scan-errors Purpose: Pattern-based error detection across the entire codebase with bulk auto-fix capabilities.