portaljs-add-dcat

portaljs-add-dcat is a command for Claude Code from datopian/portaljs. It costs 69 tokens per session (4,472 once invoked), scanned A, original, MIT.

A PortalJS command that publishes DCAT catalog feeds, which are standard descriptions of datasets used by data portals to find and import open data.

In plain words
What is it for?
Use it to generate DCAT 2/3, DCAT-AP, DCAT-US, or national-profile feeds in JSON-LD, Turtle, and RDF/XML during a PortalJS build.
Why use it?
It removes the need to prepare several metadata files by hand and helps external catalogs harvest a portal's datasets automatically.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the portaljs plugin — 14 skills, 25 commands shipped together

Good fit Use it to generate DCAT 2/3, DCAT-AP, DCAT-US, or national-profile feeds in JSON-LD, Turtle, and RDF/XML during a PortalJS build.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/datopian/portaljs/portaljs-add-dcat
About the project

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.

datopian/portaljs · 2,349 stars · on GitHub · portaljs.com

Install

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.

Clone the repo
git clone --depth 1 https://github.com/datopian/portaljs

Made for: Claude Code.

Or install portaljs, the plugin that ships this one along with the rest of its 14 skills, 25 commands.

Wrote 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.

agentmods badge for portaljs-add-dcat

README.md
[![agentmods](https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-dcat/github.svg)](https://agentmods.dev/commands/datopian/portaljs/portaljs-add-dcat)
Your own site
<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-add-dcat"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-dcat/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.

agentmods 80×15 button for portaljs-add-dcat

Your own site · 80×15
<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-add-dcat"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-add-dcat.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,472 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.04472
Opus 5 $0.00034 $0.02236
Sonnet 5 $0.00014 $0.00894
Haiku 4.5 $0.00007 $0.00447

Measured 9d ago against content hash 4fb9e47c0cee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

portaljs-add-dcat 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.

curl -s https://www.itb.ec.europa.eu/shacl/dcat-ap/api/validate \
.claude/commands/portaljs-add-dcat.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/portaljs-add-dcat

Turn an existing PortalJS (portaljs-catalog) portal into a harvestable data catalog: emit standards-compliant DCAT metadata feeds so external catalogs and government data portals (data.europa.eu, data.gov, national portals) can harvest its datasets automatically.

PortalJS is Frictionless-native (a dataset is a Data Package — see /portaljs-define-schema); DCAT is the serialization + harvest layer on top (lib/metadata/dcat.ts + lib/metadata/dcat-profiles.ts). This skill selects one or more DCAT application profiles, maps every dataset's metadata to them, and writes static feed files at build so they harvest on any host (static Cloudflare Pages, a CDN, a Worker) — no runtime.

What it produces

Wired into predev/prebuild via scripts/generate-dcat.ts, so the feeds are always fresh:

File What
public/catalog.jsonld · catalog.ttl · catalog.rdf Canonical feed (first profile) in JSON-LD, Turtle, RDF/XML — the stable autodiscovery targets
public/catalog.<profile>.{jsonld,ttl,rdf} One feed per configured profile × serialization (e.g. catalog.dcat-ap.ttl)
public/catalog-feeds.json Machine-readable index of every emitted feed
<link rel="alternate" type="application/ld+json" href="/catalog.jsonld"> in _document.tsx Autodiscovery — how harvesters find the feed

Config lives in dcat.config.json at the portal root (created/updated by this skill). All feeds regenerate from datasets.json + this config.

Supported profiles

Profiles are a pluggable registry (lib/metadata/dcat-profiles.ts) — national profiles are config/data, not hardcoded, and multiple can be emitted at once.

id Profile Notes
dcat-3 DCAT 3 (W3C) Default. conformsTo DCAT-3.
dcat-2 DCAT 2 (W3C) Same core subset stamped as DCAT-2.
dcat-ap DCAT-AP (data.europa.eu) EU profile: adds foaf/vcard, publisher, contactPoint, dcat:theme (EU data-theme vocab).
dcat-us DCAT-US 3.0 (data.gov) US federal / Project Open Data: adds publisher, contactPoint, dct:accessLevel.
geodcat-ap GeoDCAT-AP (spatial / INSPIRE) DCAT-AP + spatial coverage: dct:spatial (bbox/geometry as gsp:wktLiteral) + dcat:spatialResolutionInMeters from each dataset's dcat.spatial (or the catalog-wide spatial config).
croissant Croissant (MLCommons / schema.org) ML-dataset metadata: a schema.org DataCatalog of Croissant Datasets with cr:FileObject distributions + cr:RecordSet/cr:Field mapped from the Frictionless Table Schema. JSON-LD only.
dcat-ap-se · dcat-ap-ch · dcat-ap-de National (Sweden / Switzerland / Germany) DCAT-AP + national conformsTo; examples of the plug mechanism.

Read the full file on GitHub · 276 lines

Changes

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.

  1. 9d ago First seen · 276 lines · 69 tokens per session scan A 4fb9e47c0cee

Subscribe to this mod's changes

portaljs-add-dcat is a command published in the GitHub repository datopian/portaljs (2,349 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 4,472 once invoked, about $0.0003 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.