
PortalJS DCAT Integration
FreeMake your PortalJS portal harvestable by open data catalogs.
Free · Opens the source repo
What PortalJS DCAT Integration does
PortalJS DCAT Integration is designed to transform an existing PortalJS portal into a compliant data catalog suitable for harvesting by national and international open data portals. By leveraging the Data Catalog Vocabulary (DCAT), this skill enables the emission of standards-compliant DCAT catalog feeds in multiple formats including JSON-LD, Turtle, and RDF/XML. This process occurs at build time, ensuring that your datasets are readily accessible to external catalogs such as data.europa.eu and data.gov without requiring additional runtime configurations.
The skill operates by selecting one or more DCAT application profiles and mapping the metadata of each dataset accordingly. It requires a scaffolded PortalJS portal with specific files in place, including datasets.json and lib/metadata/. Furthermore, users must ensure that the DCAT core is already integrated into their portal. Once set up, the skill generates static feed files and performs conformance checks to validate that the emitted feeds meet the necessary standards.
This tool is particularly useful for developers and data managers who need to publish datasets in a way that aligns with open data initiatives. It simplifies the process of preparing datasets for harvesting, allowing users to focus on content rather than compliance. With built-in error handling and validation steps, users can quickly identify and resolve issues during the setup and build process, ensuring a smooth transition to a harvestable data catalog.
Whether you're working with EU, US, or national profiles, PortalJS DCAT Integration provides a robust solution for making your datasets discoverable and interoperable across various open data platforms.
When to use it
Use this skill when you have a PortalJS portal and need to make its datasets harvestable by open data platforms like data.europa.eu or data.gov.
When not to use it
This skill is not suitable for portals that do not have the required metadata structure or for datasets that do not need to comply with DCAT standards.
What you can build with it
EU Data Portal Compliance
Use this skill to prepare your PortalJS portal for harvesting by the EU's open data portal, ensuring compliance with DCAT-AP.
US Federal Data Harvesting
Implement this skill to enable your datasets to be harvested by US federal open data catalogs, adhering to DCAT-US standards.
Multi-Profile Data Cataloging
Utilize this skill to generate multiple DCAT feeds from a single PortalJS portal, accommodating various national profiles.
How to install PortalJS DCAT Integration
View source1. Install with the skills CLI
npx skills add jeremylongshore/claude-code-plugins-plus-skills/portaljs-add-dcat --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by jeremylongshorePortalJS — Add DCAT
Overview
Turn an existing PortalJS (portaljs-catalog) portal into a harvestable data catalog.
PortalJS is Frictionless-native — a dataset is a Data Package (see
portaljs-define-schema) — and 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 time — JSON-LD, Turtle, and RDF/XML — so external catalogs
(data.europa.eu, data.gov, national portals) can harvest the datasets automatically,
on any static host, with no runtime.
Prerequisites
- A scaffolded PortalJS portal with
datasets.json,package.json, andlib/metadata/(the metadata-profile contract) present. lib/metadata/dcat.ts(the DCAT-3 core) already in place — profiles augment it.- Node 18+ and npm available in the portal directory.
- For DCAT-AP / DCAT-US: a publishing organization (name + homepage) and a contact
(name + email) — both profiles require
dct:publisheranddcat:contactPoint. - Optional but recommended: network access to run SHACL conformance checks against the
official EU ITB validator or
pyshacl.
Instructions
The canonical, full step-by-step workflow is
.claude/commands/portaljs-add-dcat.md —
the single source of truth. Read and follow it when executing. Summary:
- Gather input from
$ARGUMENTS(interview if thin): portal directory (default.), profiles (default["dcat-3"]), site URL, publisher, contact, license, themes, languages, access level. - Validate the portal directory: confirm
datasets.json,package.json, andlib/metadata/exist; stop with anERROR:if the metadata contract is missing. - Ensure the DCAT profile layer is present —
dcat-profiles.ts,dcat-rdf.ts,dcat-validate.ts— copying canonical versions fromexamples/portaljs-catalogif the portal predates this skill. - Ensure
scripts/generate-dcat.tsis wired topredev/prebuildand emits per-profile x serialization feeds fromdcat.config.json. - Write
dcat.config.jsonwith the gathered profiles, publisher, contact, license, themes, and access level. - Add feed autodiscovery: a
<link rel="alternate" type="application/ld+json">topages/_document.tsxpointing at/catalog.jsonld. - Generate the feeds and check conformance: run
npm run generate:dcatand surface any missing mandatory fields. - Verify the RDF: confirm the JSON-LD parses, and cross-check that JSON-LD, Turtle,
and RDF/XML agree; run SHACL validation (ITB for DCAT-AP,
pyshaclfor DCAT-US) when network/tooling allow. - Verify the build with
npx next build; fix errors before reporting success. - Report the profiles emitted, feed paths, conformance status, and next steps
(register with the harvester, run
portaljs-deploy).
Output
- Created/modified:
dcat.config.json(committed config). - Generated (build artifacts, gitignored):
public/catalog.jsonld/.ttl/.rdf(canonical feed),public/catalog.<profile>.{jsonld,ttl,rdf}per configured profile,public/catalog-feeds.json(feed index). - Modified:
pages/_document.tsx(autodiscovery<link>),package.json(generate:dcatscript wired topredev/prebuild). - Verified: feeds are valid JSON-LD/Turtle/RDF-XML, conformance status reported,
npx next buildpasses.
Error Handling
| Symptom | Cause | Fix |
|---|---|---|
NO_METADATA_CONTRACT | lib/metadata/ not found | Portal predates the metadata-profile contract; scaffold with portaljs-new-portal or add lib/metadata first. |
NO_DCAT_CORE | lib/metadata/dcat.ts not found | The DCAT-3 core is missing; update the portal template before adding profiles. |
BAD_CONFIG | dcat.config.json is not valid JSON | Fix the syntax and re-run npm run generate:dcat. |
UNKNOWN_PROFILE | Profile id not in the registry | Use one of dcat-2, dcat-3, dcat-ap, dcat-us, geodcat-ap, croissant, dcat-ap-se, dcat-ap-ch, dcat-ap-de, or register a national profile first. |
| Feed flagged non-conformant | publisher/contactPoint missing for DCAT-AP or DCAT-US | Ask the user for the publishing organization and contact, add to dcat.config.json, regenerate. |
| DCAT-US SHACL rejects the publisher | Publisher has no IRI (blank node) | Set publisher.uri (or homepage) in dcat.config.json. |
next build fails after config change | Malformed JSON in dcat.config.json or datasets.json | Print the build log, fix the JSON, rebuild before reporting success. |
Examples
Example 1 — Default DCAT-3 feed, no national harvesting
/portaljs-add-dcat
Emits the canonical public/catalog.jsonld/.ttl/.rdf under the default dcat-3
profile, adds autodiscovery to _document.tsx, and wires generate:dcat into
predev/prebuild. No publisher/contact required.
Example 2 — EU harvesting via DCAT-AP
/portaljs-add-dcat profiles=dcat-ap site=https://data.example.org
Prompts for publisher (name + homepage) and contact (name + email) since DCAT-AP
requires both, writes them into dcat.config.json, and emits
public/catalog.dcat-ap.{jsonld,ttl,rdf} plus the canonical feed with absolute links.
Example 3 — US federal harvesting via DCAT-US
/portaljs-add-dcat profiles=dcat-us site=https://data.example.gov
Requires an IRI-identified publisher (publisher.uri) for SHACL conformance; emits
catalog.dcat-us.{jsonld,ttl,rdf} and validates against the DCAT-US 3.0 SHACL shapes
with pyshacl when available.
Example 4 — Multiple profiles plus a national extension
/portaljs-add-dcat profiles=dcat-ap,dcat-ap-de site=https://daten.example.de
Emits both catalog.dcat-ap.* and catalog.dcat-ap-de.* feeds from one config; the
first profile listed also becomes the canonical, un-suffixed catalog.jsonld/.ttl/.rdf.
Resources
- Full workflow:
.claude/commands/portaljs-add-dcat.md - Profile registry, serialization formats, and validator details:
references/reference.md - Related skills:
portaljs-define-schema,portaljs-new-portal,portaljs-deploy,portaljs-migrate - DCAT specification: https://www.w3.org/TR/vocab-dcat-3/
Frequently asked questions about PortalJS DCAT Integration
Similar skills
Single-Cell RNA-seq QC
Automate quality control for single-cell RNA-seq data.
Instrument Data to Allotrope Converter
Standardize lab data for seamless integration.
SQL Server Table Reconciliation
Efficiently compare SQL Server tables across instances.
Data Cleaning and Variable Screening
Streamline credit risk data preprocessing for modeling.
Arize Dataset
Manage and query Arize datasets efficiently.
Spreadsheet Management
Efficiently create, edit, and analyze spreadsheet files.
