/portaljs:arcgis-to-portaljs runs instead · from portaljs
Migrates ArcGIS Hub open-data sites to PortalJS Arc portals by harvesting DCAT-US catalog, exporting FeatureService layers via paged REST API, converting to PMTiles/GeoParquet, and publishing to Cloudflare R2.
This skill never runs in Claude Code
It ships in portaljs at skills/, but /portaljs:arcgis-to-portaljs (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Migrate an entire ArcGIS Hub open-data site into a PortalJS Arc portal in one pass.
Every Hub site is machine-readable — a DCAT-US catalog at /data.json, with every dataset
backed by an ArcGIS REST FeatureService — so migration is a harvest → export → convert →
publish → verify pipeline that runs almost fully automated on the operator's machine, no
server-side compute. The tooling is the reusable arcgis-to-portaljs migrator: input is one
Hub URL, output is a ready-to-deploy PortalJS catalog plus a parity report.
The skill is an orchestrator: it reuses the DCAT-US harvest from portaljs-migrate, the
ogr2ogr/tippecanoe/duckdb dual-tier conversion from portaljs-add-geo, and the bulk
Git-LFS → R2 push from portaljs-migrate. Its novel parts are the FeatureService REST export
loop (paged features, not just a link) and the source-vs-derived parity report.
components/MapPreview.tsx and
components/GeoQuery.tsx (PR #1647 or later). Run portaljs-new-portal first if none.ogr2ogr, ogrinfo), tippecanoe, duckdb (with spatial),
and jq. macOS: brew install gdal tippecanoe duckdb jq; Debian/Ubuntu:
apt-get install gdal-bin duckdb jq plus tippecanoe (apt or build from source); Windows via
WSL. The skill hard-stops with the install hint if any is missing.portaljs-deploy resolves), or an OSS
self-hosted Giftless.The canonical, full step-by-step workflow is
.claude/commands/arcgis-to-portaljs.md
— the single source of truth. Read and follow it when executing. Summary:
--limit,
--only, --dry-run, --namespace-mode). Interview if missing; never dead-end.ogr2ogr, tippecanoe, duckdb + spatial, jq). Any missing →
print the per-OS install and stop./data.json (reuse the portaljs-migrate DCAT-US map) and classify each
item: vector (FeatureService), table, or non-data (web map / 3D / imagery → skipped).
Under --namespace-mode owner, resolve namespaces through a publisher-normalization
table with title-prefix fallback for broken {{source}} publishers (multi-publisher
Hubs ship dirty publisher labels). Dedup near-duplicate hosted-view layers — but only
after a mandatory live record-count check on BOTH twins: equal ⇒ dedup (keep the source
layer, log the pair); different ⇒ keep both as distinct datasets. Consolidate per-year
dataset series into one year-partitioned Parquet with legacy per-year view entries. Enrich
from the AGOL item: sanitized metadata (license/description/dates), cleaned display title
(cleanTitle — raw title still drives the slug), category (item categories → meaningful
theme → keyword mapping), and a thumbnail snapshot into public/thumbnails/.query API with resultOffset paging
(f=geojson, outSR=4326); fall back to keyset paging on transfer limits; accept a
customer File Geodatabase dump for very large layers.portaljs-add-geo recipe (PMTiles +
GeoParquet); tabular items to Parquet. Preserve the native-CRS original.datasets.json entries (upsert on (namespace, slug)).arcgis-parity-report.md — record count, extent, attribute schema, and geometry
validity, source vs derived, per dataset, plus the migrated/skipped/failed accounting.data/<namespace>/<slug>.pmtiles, .parquet, and the original per vector
dataset (all LFS-tracked → R2); Parquet + original per table; arcgis-parity-report.md.datasets.json (one dual-tier entry per vector dataset, one resource entry
per table); .gitattributes (LFS tracking)./@<namespace>/<slug> renders <MapPreview> + <GeoQuery> for each vector
dataset with no page edits; the catalog lists everything migrated.| Symptom | Cause | Fix |
|---|---|---|
MISSING_INPUT | No Hub URL provided | Pass the site root (e.g. https://hub-lewisville.opendata.arcgis.com) and retry. |
MISSING_TOOLS | ogr2ogr/tippecanoe/duckdb/jq (or duckdb spatial) absent | Print the per-OS install line and stop; re-run after installing. |
NOT_A_PORTAL | Target dir has no datasets.json / geo components | Run portaljs-new-portal first, then re-run. |
HARVEST_FAILED | /data.json unreachable or not DCAT-US | Confirm the site is an ArcGIS Hub and the feed loads in a browser. |
EXPORT_FAILED | One FeatureService layer errored or hit a hard transfer cap | Logged and skipped; try keyset paging or a customer FGDB dump for that layer. |
LFS_PUSH_FAILED | Missing/expired Arc token or unset lfs.url | Re-mint the JWT (see portaljs-deploy); confirm git config lfs.url. |
/arcgis-to-portaljs https://hub-lewisville.opendata.arcgis.com slug=lewisville
/arcgis-to-portaljs https://streamwaterdata.co.uk --dry-run
/arcgis-to-portaljs https://streamwaterdata.co.uk --only sewer-catchments,water-boundaries --namespace-mode owner
.claude/commands/arcgis-to-portaljs.mdreferences/reference.mdreferences/sync-and-cutover.mdportaljs-migrate, portaljs-add-geo, portaljs-add-dataset, portaljs-deployWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
arcgis, portaljs, migration, geospatial, pmtiles, data-portal
2 plugins ship this exact skill · first indexed Jul 19, 2026
14 skills in this plugin
/portaljs-add-chartAdd a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal. Installs recharts, writes a reusable Chart component, and renders it in the showcase Views section. Use when visualizing a dataset already registered in datasets.json./portaljs-add-datasetAdd a dataset (CSV, TSV, JSON, or GeoJSON) to an existing PortalJS portal. Appends an entry to datasets.json so the catalog and showcase render it automatically; routes the data by source (local file vs remote URL) — R2 via Git LFS by default, remote URLs by passthrough. Use when registering a new dataset in a scaffolded portal./portaljs-add-dcatMake 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. Use when a portal needs to be harvested by data.europa.eu, data.gov, or a national open-data catalog.npx claudepluginhub datopian/portaljs --plugin portaljsOther plugins' skills for the same job