# Arcgis To Portaljs

Migrate a whole ArcGIS Hub site into a PortalJS Arc portal end-to-end.

- Repository: https://github.com/datopian/portaljs (2370 stars)
- Category: DevOps
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add datopian/portaljs --skill arcgis-to-portaljs -g -a claude-code -y`
Codex: `npx skills add datopian/portaljs --skill arcgis-to-portaljs -g -a codex -y`
Cursor: `npx skills add datopian/portaljs --skill arcgis-to-portaljs -g -a cursor -y`
Gemini CLI: `npx skills add datopian/portaljs --skill arcgis-to-portaljs -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add datopian/portaljs`

## Description

Migrate a whole ArcGIS Hub site into a PortalJS Arc portal end-to-end. Harvests the Hub /data.json (DCAT-US) inventory, exports every FeatureService layer through the ArcGIS REST query API with resultOffset paging, converts each to the serverless dual tier (PMTiles render + GeoParquet query) with tabular items to Parquet, pushes everything to Cloudflare R2 via Git LFS, appends dual-tier datasets.json entries, and writes a source-vs-derived parity report. Use to move a City or sector ArcGIS Hub open-data portal onto PortalJS with no server-side compute.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# ArcGIS 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.tsx` and
  `components/GeoQuery.tsx` (PR #1647 or later). Run `portaljs-new-portal` first if none.
- Native CLIs: **GDAL** (`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.
- Arc credentials for the Git-LFS → R2 push (the token `portaljs-deploy` resolves), or an OSS
  self-hosted Giftless.

## Instructions

The canonical, full step-by-step workflow is
[`.claude/commands/arcgis-to-portaljs.md`](https://github.com/datopian/portaljs/blob/main/.claude/commands/arcgis-to-portaljs.md), the single source of truth. Read and follow it when executing. Summary:

The rest: https://github.com/datopian/portaljs/blob/HEAD/skills/arcgis-to-portaljs/SKILL.md
