arcgis-to-portaljs

arcgis-to-portaljs is a skill for Claude Code from datopian/portaljs. It costs 134 tokens per session (2,114 once invoked), scanned A, original, MIT.

A migration tool that copies an ArcGIS Hub open-data site into a PortalJS map portal. ArcGIS Hub publishes datasets, while PortalJS is a deployable portal for browsing and querying them.

In plain words
What is it for?
Use it to migrate a complete ArcGIS Hub site, export its FeatureService layers, create PMTiles and GeoParquet data, publish the PortalJS catalogue, and produce a parity report.
Why use it?
It automates collecting the catalogue, exporting map layers, converting them into display and query formats, publishing them, and checking that the results match.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the portaljs plugin — 14 skills, 25 commands shipped together

Good fit Use it to migrate a complete ArcGIS Hub site, export its FeatureService layers, create PMTiles and GeoParquet data, publish the PortalJS catalogue, and produce a parity report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datopian/portaljs/arcgis-to-portaljs
About the project

PortalJS is a framework for building data portals that present searchable datasets through a home page, catalog, and dataset showcase. It is for teams that want to choose a data backend, scaffold a Next.js portal, load CSV or JSON data, connect services such as CKAN, and deploy the result. The catalogue entries are agent commands, skills, instructions, and a plugin that guide portal creation and data loading.

datopian/portaljs · 2,350 stars · on GitHub · portaljs.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add datopian/portaljs --skill arcgis-to-portaljs
Clone the repo
git clone --depth 1 https://github.com/datopian/portaljs

Made for: Claude Code.

Or install portaljs, the plugin that ships this one along with the rest of its 14 skills, 25 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for arcgis-to-portaljs

README.md
[![agentmods](https://agentmods.dev/badge/skills/datopian/portaljs/arcgis-to-portaljs/github.svg)](https://agentmods.dev/skills/datopian/portaljs/arcgis-to-portaljs)
Your own site
<a href="https://agentmods.dev/skills/datopian/portaljs/arcgis-to-portaljs"><img src="https://agentmods.dev/badge/skills/datopian/portaljs/arcgis-to-portaljs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for arcgis-to-portaljs

Your own site · 80×15
<a href="https://agentmods.dev/skills/datopian/portaljs/arcgis-to-portaljs"><img src="https://agentmods.dev/badge/skills/datopian/portaljs/arcgis-to-portaljs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00134 $0.02114
Opus 5 $0.00067 $0.01057
Sonnet 5 $0.00027 $0.00423
Haiku 4.5 $0.00013 $0.00211

Measured 12d ago against content hash 3034dc54ee0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

arcgis-to-portaljs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Read, Write, Edit, Bash(ogr2ogr:*), Bash(ogrinfo:*), Bash(tippecanoe:*), Bash(duckdb:*), Bash(git:*), Bash(curl:*), Bash(jq:*), Bash(npx:*), Bash(node:*), Bash(mkdir:*), Bash(cp:*), Bash(wc:*), Bash(comman
skills/arcgis-to-portaljs/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 — the single source of truth. Read and follow it when executing. Summary:

  1. Gather input — Hub URL, portal directory, project slug, optional flags (--limit, --only, --dry-run, --namespace-mode). Interview if missing; never dead-end.
  2. Check native tools (ogr2ogr, tippecanoe, duckdb + spatial, jq). Any missing → print the per-OS install and stop.
  3. Validate the portal directory and confirm the geo showcase components exist.
  4. Harvest the Hub /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/.
  5. Export each vector layer through the ArcGIS REST 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.
  6. Convert each layer to the dual tier via the portaljs-add-geo recipe (PMTiles + GeoParquet); tabular items to Parquet. Preserve the native-CRS original.
  7. Publish — bulk Git-LFS track + one push to R2 through Giftless, then append dual-tier datasets.json entries (upsert on (namespace, slug)).
  8. Write arcgis-parity-report.md — record count, extent, attribute schema, and geometry validity, source vs derived, per dataset, plus the migrated/skipped/failed accounting.
  9. Report the inventory, migrated datasets, R2 push, and parity summary.

Read the full file on GitHub · 126 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 126 lines · 134 tokens per session scan A 3034dc54ee0a

Subscribe to this mod's changes

arcgis-to-portaljs is a skill published in the GitHub repository datopian/portaljs (2,350 stars, last pushed 4d ago), licensed MIT. It adds 134 tokens to every session and 2,114 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.