portaljs-add-dcat
Make a PortalJS portal harvestable by national/EU/US open-data portals — emit standards-compliant DCAT catalog feeds (DCAT 2/3, DCAT-AP, DCAT-US, national profiles) in JSON-LD, Turtle, and RDF/XML at build, with autodiscovery and per-profile conformance checking.
Install / Use
npx skills add datopian/portaljsInstalls into whichever agent you are using.
Claude Commands
Claude Code slash commands
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of portaljs-add-dcat
portaljs-add-dcat scores 94/100 on our quality scale, 515th of 4,698 Development & Engineering skills we index (top 11%).
Its Claude Commands is 16 KB long, well organised into 18 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
With 2,356 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so portaljs-add-dcat is actively maintained.
- Our last check on 2026-11-16 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
portaljs-add-dcat compared with similar skills
All 4 of these similar skills score higher than portaljs-add-dcat; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| portaljs-add-dcat (this skill)by datopian | 94 | 2.4k | 2mo ago | Claude Commands |
| claude-memby thedotmack | 100 | 117.6k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 92.8k | 1d ago | CLAUDE.md |
Frequently asked questions
- How do I install portaljs-add-dcat?
- Run
npx skills add datopian/portaljs. The install tabs above show the steps for each supported agent. - Which AI agents does portaljs-add-dcat work with?
- It is written for Claude Code, as a Claude Commands file. Other agents that read the same format can often use it too.
- Is portaljs-add-dcat safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is portaljs-add-dcat still maintained?
- The repository was last updated about 2 months ago, so portaljs-add-dcat is actively maintained.
Skill content
View source on GitHubdescription: Make a PortalJS portal harvestable by national/EU/US open-data portals — emit standards-compliant DCAT catalog feeds (DCAT 2/3, DCAT-AP, DCAT-US, national profiles) in JSON-LD, Turtle, and RDF/XML at build, with autodiscovery and per-profile conformance checking. allowed-tools: Read, Write, Edit, Bash, WebFetch
/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. |
Add another national profile without code: registerDcatProfile(makeNationalProfile({ id, label, conformsTo, context })) in a small module the app loads, then list its id in dcat.config.json. See lib/metadata/README.md.
GeoDCAT-AP spatial input. Per dataset, add "dcat": { "spatial": { "bbox": "POLYGON((…))" } } (or "geometry", "uri", "spatialResolutionInMeters") to datasets.json; or set a catalog-wide "spatial" in dcat.config.json. WKT strings are serialized as gsp:wktLiteral. A dataset with no spatial coverage is still GeoDCAT-AP-conformant.
Croissant describes datasets for ML tooling (schema.org JSON-LD). It reads the Frictionless Table Schema to emit cr:RecordSet/cr:Field, and stamps a sha256 on each cr:FileObject from the local public/data/<file> bytes (mlcroissant requires a checksum on a hosted file; remote-only files are emitted without one). Because a Croissant document describes a single dataset, the feed is a DataCatalog whose dataset[] entries are each a standalone Croissant Dataset.
Required input — ask, don't error
- Portal directory — path to the portal project (defaults to current directory).
- Profiles — which to emit (default:
dcat-3). For national-portal harvesting the user wantsdcat-ap(EU) ordcat-us(US) + optionally a national profile. - Publisher + contact — DCAT-AP and DCAT-US require
dct:publisheranddcat:contactPoint. If the user picks one of those profiles, ask for the publishing organization (name + homepage) and a contact (name + email). Without them the feed is emitted but fails conformance — the generator will say what's missing. - Site URL — the portal's public origin (e.g.
https://data.example.org), so feed links are absolute. Without it links are root-relative (fine only for same-origin harvest). ReuseSITE_URLif already set for/portaljs-deploy.
If profiles beyond dcat-3 are chosen and publisher/contact are missing, ask (one
focused prompt) and wait:
DCAT-AP / DCAT-US require a publisher and a contact point. I need:
1. Publishing organization: name + homepage URL
2. Contact: name + email
3. Public site URL (Enter to use root-relative links)
You can say "skip" to emit the feed anyway — it will be flagged as non-conformant.
Steps
1. Gather input from $ARGUMENTS (interview if thin)
Extract: PORTAL_DIR (default .), PROFILES (default ["dcat-3"]),
SITE_URL, PUBLISHER (name/homepage), CONTACT (fn/email), LICENSE (default
dataset license URI), THEMES (EU data-theme URIs), LANGUAGES, ACCESS_LEVEL
(DCAT-US, default public).
2. Validate the portal directory
Confirm PORTAL_DIR/datasets.json, PORTAL_DIR/package.json, and
PORTAL_DIR/lib/metadata/ exist. If lib/metadata/ is missing, the portal predates the
metadata contract — tell the user and stop with an ERROR: (this skill builds on it).
3. Ensure the DCAT profile layer is present
Newer scaffolds already ship it. For a portal scaffolded before this skill, check for and
create the modules (copy the canonical versions from examples/portaljs-catalog if you
have the repo, else write them):
PORTAL_DIR/lib/metadata/dcat-profiles.ts— the profile registry +apply().PORTAL_DIR/lib/metadata/dcat-rdf.ts— Turtle + RDF/XML serializers.PORTAL_DIR/lib/metadata/dcat-validate.ts— per-profile mandatory-field check.- Ensure
PORTAL_DIR/lib/metadata/index.tsre-exports them (getDcatProfile,serialize,validateDcat,type DcatConfig,type RdfFormat,type JsonLdNode).
lib/metadata/dcat.ts (the DCAT-3 core) must already exist — it's the base the profiles
augment. If it's missing, the portal predates DCAT interop; stop with an ERROR:.
4. Ensure the multi-profile generator is wired
PORTAL_DIR/scripts/generate-dcat.ts must read dcat.config.json and emit per-profile ×
serialization feeds (the version in examples/portaljs-catalog/scripts/generate-dcat.ts).
If the portal has the old single-file generator (writes only catalog.jsonld), replace it
with the multi-profile version. Confirm package.json has:
"generate:dcat": "tsx scripts/generate-dcat.ts",
"predev": "npm run generate:dcat",
"prebuild": "npm run generate:dcat"
Add tsx to devDependencies if absent.
5. Write dcat.config.json
Create/update PORTAL_DIR/dcat.config.json with the gathered input. Only include
non-empty fields:
{
"profiles": ["dcat-ap", "dcat-us"],
"serializations": ["jsonld", "ttl", "rdf"],
"title": "<catalog title>",
"description": "<catalog description>",
"publisher": { "name": "<org>", "homepage": "<url>" },
"contactPoint": { "fn": "<name>", "email": "<email>" },
"license": "<default license URI>",
"themes": ["http://publications.europa.eu/resource/authority/data-theme/GOVE"],
"languages": ["http://publications.europa.eu/resource/authority/language/ENG"],
"homepage": "<portal homepage>",
"accessLevel": "public"
}
profiles— the ids from Step 1 (order matters: the first profile also gets the canonical un-suffixedcatalog.jsonld/.ttl/.rdf).- Drop
publisher/contactPointonly if the user said "skip" (feed will be non-conformant for AP/US). themesshould be from the EU data-theme vocabulary for DCAT-AP; per-dataset themes can override via a dataset's optionaldcatfield indatasets.json.
6. Add feed autodiscovery
Ensure PORTAL_DIR/pages/_document.tsx <Head> contains:
<link rel="alternate" type="application/ld+json" href="/catalog.jsonld" title="DCAT catalog feed" />
Add it if missing. This is how harvesters discover the feed from any page.
7. Generate the feeds and check conformance
cd PORTAL_DIR
SITE_URL="<site url>" npm run generate:dcat 2>&1 | tee /tmp/portaljs-dcat.log
The generator prints per-profile conformance errors (missing mandatory fields).
If any appear, surface them and offer to fill the gap in dcat.config.json (usually
publisher/contactPoint) before continuing.
8. Verify — parse the RDF and (optionally) validate against SHACL
Always confirm the emitted RDF is well-formed and the three serializations agree. The feeds must parse and yield the same triples in JSON-LD, Turtle, and RDF/XML:
cd PORTAL_DIR
# Quick structural check: valid JSON-LD + non-empty feeds.
node -e "for (const f of require('fs').readdirSync('public').filter(x=>x.endsWith('.jsonld')&&x.startsWith('catalog'))) { JSON.parse(require('fs').readFileSync('public/'+f,'utf8')); console.log('✓ '+f) }"
For a rigorous cross-serialization check (recommended, in a scratch dir — do not add
to the portal's deps): npm i n3 rdfxml-streaming-parser jsonld, parse each
catalog.*.ttl (n3), catalog.*.rdf (rdfxml-streaming-parser) and catalog.*.jsonld
(jsonld → n-quads), and assert the triple counts match per profile.
Authoritative profile validation (SHACL). For DCAT-AP/DCAT-US conformance, validate against the official SHACL shapes or the hosted validators — report the result, don't claim conformance without it. The built-in feeds are validated conformant to DCAT-AP 3.0.1 base (the harvest gate) in all three serializations and DCAT-US 3.0 SHACL; re-run these after changing the mapping:
- DCAT-AP — the EU's official ITB SHACL validator has a REST API (no browser). POST
the RDF and read
sh:conforms.baseis the mandatory harvest gate;fulladds ranges + recommendations (advisory — expect range warnings the validator can't dereference for external vocabularies):
(validation types fromcurl -s https://www.itb.ec.europa.eu/shacl/dcat-ap/api/validate \ -H 'Content-Type: application/json' -H 'Accept: application/ld+json' \ -d "$(python3 -c 'import json,sys;print(json.dumps({"contentToValidate":open("public/catalog.dcat-ap.ttl").read(),"embeddingMethod":"STRING","contentSyntax":"text/turtle","validationType":"dcatap.3_0_1_base"}))')" \ | python3 -c 'import sys,json;g=json.load(sys.stdin);print([n["sh:conforms"] for n in g.get("@graph",[g]) if "sh:conforms" in n])'.../shacl/dcat-ap/api/info; also usable offline viapip install pyshacl+ the DCAT-AP SHACL shapes). - DCAT-US —
pip install pyshacl+ the official DCAT-US 3.0 SHACL shapes:pyshacl -s dcat-us_3.0_shacl_shapes.ttl -a public/catalog.dcat-us.ttl. DCAT-US requires an IRI-identifieddct:publisher— setpublisher.uri(orhomepage) indcat.config.json, else a blank-node publisher is rejected. - GeoDCAT-AP — validates as DCAT-AP for the harvest gate (
validationTypedcatap.3_0_1_baseon the ITB endpoint above, over `pub
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
117.6kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
92.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
