
ArcGIS to PortalJS
FreeMigrate ArcGIS Hub sites to PortalJS seamlessly.
Free · Opens the source repo
What ArcGIS to PortalJS does
The ArcGIS to PortalJS skill provides a streamlined solution for migrating entire ArcGIS Hub open-data sites into PortalJS Arc portals. This process is designed to be efficient, utilizing a fully automated pipeline that requires minimal manual intervention. By leveraging the machine-readable DCAT-US catalog available at /data.json, the skill orchestrates a series of steps: harvesting data, exporting FeatureService layers, converting them to a serverless dual-tier format, and finally publishing the results to Cloudflare R2. The end result is a ready-to-deploy PortalJS catalog along with a detailed parity report that ensures data integrity.
The migration process begins with the collection of necessary inputs, such as the Hub URL and portal directory. The skill checks for the presence of required native tools like GDAL, tippecanoe, and duckdb, ensuring that the environment is correctly set up before proceeding. Once validated, it harvests the data from the specified Hub, classifies the datasets, and exports each vector layer using the ArcGIS REST API. This includes handling large datasets efficiently through paging and alternative formats when needed.
After exporting, the skill converts each dataset into a dual-tier format, combining PMTiles for rendering and GeoParquet for querying. This conversion preserves the original coordinate reference system and prepares the data for publication. The skill then tracks the datasets using Git LFS and pushes them to Cloudflare R2, while also updating the datasets.json file to reflect the new entries. Finally, it generates a comprehensive parity report, comparing the migrated datasets against the original FeatureServices to verify accuracy and completeness.
This skill is particularly useful for city planners, data scientists, and organizations looking to transition their open-data initiatives from ArcGIS Hub to PortalJS without the need for extensive server-side resources. It simplifies the migration process, making it accessible for users who may not have deep technical expertise in geospatial data handling.
When to use it
Use this skill when you need to migrate an entire ArcGIS Hub site to PortalJS efficiently and with minimal manual effort.
When not to use it
This skill is not suitable for users without the required native tools installed or those needing to migrate non-ArcGIS Hub data.
What you can build with it
Migrate a City Hub
Easily transfer an entire city’s open-data portal from ArcGIS Hub to PortalJS with a single command.
Dry Run Migration
Test the migration process without making changes to plan for the actual migration.
Subset Migration
Migrate specific datasets from an ArcGIS Hub site while organizing them by namespace.
How to install ArcGIS to PortalJS
View source1. Install with the skills CLI
npx skills add jeremylongshore/claude-code-plugins-plus-skills/arcgis-to-portaljs --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 jeremylongshoreArcGIS Hub → PortalJS
Overview
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.
Prerequisites
- A scaffolded PortalJS portal whose template ships
components/MapPreview.tsxandcomponents/GeoQuery.tsx(PR #1647 or later). Runportaljs-new-portalfirst if none. - Native CLIs: GDAL (
ogr2ogr,ogrinfo), tippecanoe, duckdb (withspatial), and jq. macOS:brew install gdal tippecanoe duckdb jq; Debian/Ubuntu:apt-get install gdal-bin duckdb jqplus tippecanoe (apt or build from source); Windows via WSL. The skill hard-stops with the install hint if any is missing. - Arc credentials for the Git-LFS → R2 push (the token
portaljs-deployresolves), or an OSS self-hosted Giftless.
Instructions
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:
- Gather input — Hub URL, portal directory, project slug, optional flags (
--limit,--only,--dry-run,--namespace-mode). Interview if missing; never dead-end. - Check native tools (
ogr2ogr,tippecanoe,duckdb+spatial,jq). Any missing → print the per-OS install and stop. - Validate the portal directory and confirm the geo showcase components exist.
- Harvest the Hub
/data.json(reuse theportaljs-migrateDCAT-US map) and classify each item: vector (FeatureService), table, or non-data (web map / 3D / imagery → skipped). - Export each vector layer through the ArcGIS REST
queryAPI withresultOffsetpaging (f=geojson,outSR=4326); fall back to keyset paging on transfer limits; accept a customer File Geodatabase dump for very large layers. - Convert each layer to the dual tier via the
portaljs-add-georecipe (PMTiles + GeoParquet); tabular items to Parquet. Preserve the native-CRS original. - Publish — bulk Git-LFS track + one push to R2 through Giftless, then append dual-tier
datasets.jsonentries (upsert on(namespace, slug)). - Write
arcgis-parity-report.md— record count, extent, attribute schema, and geometry validity, source vs derived, per dataset, plus the migrated/skipped/failed accounting. - Report the inventory, migrated datasets, R2 push, and parity summary.
Output
- Created:
data/<namespace>/<slug>.pmtiles,.parquet, and the original per vector dataset (all LFS-tracked → R2); Parquet + original per table;arcgis-parity-report.md. - Modified:
datasets.json(one dual-tier entry per vector dataset, one resource entry per table);.gitattributes(LFS tracking). - Verified: the parity report compares each derived artifact to the live FeatureService.
- Result:
/@<namespace>/<slug>renders<MapPreview>+<GeoQuery>for each vector dataset with no page edits; the catalog lists everything migrated.
Error Handling
| 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. |
Examples
Example 1 — Migrate a City Hub (Lewisville)
/arcgis-to-portaljs https://hub-lewisville.opendata.arcgis.com slug=lewisville
Example 2 — Dry-run inventory + plan only (no writes)
/arcgis-to-portaljs https://streamwaterdata.co.uk --dry-run
Example 3 — Migrate a subset, one namespace per publisher
/arcgis-to-portaljs https://streamwaterdata.co.uk --only sewer-catchments,water-boundaries --namespace-mode owner
Resources
- Full workflow:
.claude/commands/arcgis-to-portaljs.md - REST export, classification, parity, and phasing details:
references/reference.md - Related skills:
portaljs-migrate,portaljs-add-geo,portaljs-add-dataset,portaljs-deploy - ArcGIS REST query API: https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/ · tippecanoe: https://github.com/felt/tippecanoe · DuckDB spatial: https://duckdb.org/docs/extensions/spatial
Frequently asked questions about ArcGIS to PortalJS
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.
