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
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/datopian/portaljs/portaljs-define-schemagit clone --depth 1 https://github.com/datopian/portaljsWrote 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-define-schema)<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-define-schema"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-define-schema.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.00057 | $0.02951 |
| Opus 5 | $0.00028 | $0.01476 |
| Sonnet 5 | $0.00011 | $0.00590 |
| Haiku 4.5 | $0.00006 | $0.00295 |
Grade A, and why
portaljs-define-schema scanned grade A with 0 findings 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/portaljs-define-schema
The authoring skill for the metadata-profile contract (lib/metadata). Where
/portaljs-add-dataset registers that a dataset exists, this skill
describes what its data means: it infers a Frictionless Table Schema (fields, types,
constraints) from the data, adds the Data Package descriptor fields a catalog surfaces
(title, licenses, sources, keywords), and writes them onto the dataset's entry in
datasets.json. The showcase at /@<namespace>/<slug> then renders a typed
column/description table instead of a bare preview.
The model is Frictionless-native. DCAT / DCAT-AP is a serialization layer on top
(designed-in at lib/metadata/dcat.ts, built in the later DCAT-interop phase) — this
skill authors the native model, not the export.
The skill is interactive and never dead-ends: if the brief is thin it interviews in short rounds, infers sensible defaults from the data, echoes the schema for confirmation, and lets you reply "use defaults" to accept the inferred schema as-is.
See lib/metadata/README.md
for the contract and the L0→L3 ladder.
The profile ladder — pick a level
Most datasets want L0. Reach for higher levels only when you actually need them.
| Level | What it is | When |
|---|---|---|
| L0 | Use the default frictionless-tabular profile as-is; just declare the dataset's schema + metadata. |
Default. Tabular CSV/TSV with the standard Frictionless types. |
| L1 | Extend L0 — same default profile, plus a few extra package fields you care about. | You need extra descriptive metadata but standard validation is fine. |
| L2 | A fully custom profile (your own schema template + validate()), registered in lib/metadata. |
A dataset type with validation rules L0 doesn't express. |
| L3 | Multiple profiles in the registry, resolved per dataset by its profile field. |
A portal mixing dataset types, each with its own profile. |
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 · 236 lines · 57 tokens per session scan A 225190ea898d
portaljs-define-schema is a command published in the GitHub repository datopian/portaljs (2,349 stars, last pushed 2d ago), licensed MIT. It adds 57 tokens to every session and 2,951 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
vlm-ocr
Run the vlm-ocr skill on the task below. It has three phases: evaluate (compare candidate OCR systems against stratified human ground truth and pick one on measured CER/WER), run (build and execute the production VLM-OCR pipeline — model selection, image handling, prompts, architecture, batching, accuracy evaluation…
docai-classify
Build and use a Document Intelligence classifier — train a classifier to identify document types and split multi-document files.
docai-custom-model
Build a custom Document Intelligence extraction model — prepare training data, label fields, train, evaluate accuracy, and deploy for production use.
docai-batch
Batch analyze multiple documents with Document Intelligence — process entire Blob containers, monitor batch jobs, and retrieve results at scale.
dejavu-docs
Search project documentation embeddings via dejavu (docs-only).
documenter
Documentation with batch file operations for comprehensive docs.