/portaljs:portaljs-add-geo runs instead · from portaljs
Ingests geospatial files (GeoJSON, Shapefile, etc.) into a PortalJS portal, normalizing CRS to EPSG:4326, deriving PMTiles and GeoParquet tiers, and uploading to Cloudflare R2 via Git LFS.
This skill never runs in Claude Code
It ships in portaljs at skills/, but /portaljs:portaljs-add-geo (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Turn one geospatial upload into a dual-tier PortalJS dataset entirely on the user's machine — no server-side container compute, keeping the zero-backend bet end-to-end. From a single source the skill derives two serverless tiers plus the preserved original:
<MapPreview> renders with MapLibre GL
over HTTP range requests; any dataset size pans and zooms with no tile server.bbox column, Hilbert-sorted)
<GeoQuery> runs spatial SQL over in place via DuckDB-Wasm.All three land on Cloudflare R2 (Git LFS → Giftless), and the skill appends one
datasets.json entry whose resources[] match the shape the showcase auto-renders (the
@reference/world-boundaries demo, PR #1647): pmtiles → <MapPreview>, geoparquet →
<GeoQuery>, original → download. No page edits are needed. It automates the manual
tippecanoe/duckdb recipes in the template README.
portaljs-catalog portal whose template ships components/MapPreview.tsx and
components/GeoQuery.tsx (PR #1647 or later).ogr2ogr, ogrinfo), tippecanoe, and
duckdb (with the spatial extension). macOS: brew install gdal tippecanoe duckdb;
Debian/Ubuntu: apt-get install gdal-bin duckdb + tippecanoe (apt or build from source);
Windows: use 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/portaljs-add-geo.md
— the single source of truth. Read and follow it when executing. Summary:
ogr2ogr, tippecanoe, duckdb + spatial). Any missing →
print the per-OS install and stop..shp.ogr2ogr -t_srs EPSG:4326.tippecanoe -zg --drop-densest-as-needed.duckdb — covering bbox STRUCT + ST_Hilbert order; verify a
range read.data.portaljs.com URLs.datasets.json entry (pmtiles + geoparquet + original resources).npx tsc --noEmit and a Range: 206 check on the R2 URL.data/<slug>.pmtiles, data/<slug>.parquet, data/<slug>.<origext> (all
LFS-tracked → R2); data/<slug>.4326.geojson (intermediate; can be pruned).datasets.json (one dual-tier entry appended); .gitattributes (LFS tracking).npx tsc --noEmit passes; the R2 URLs answer HTTP 206 range reads./@<namespace>/<slug> renders the PMTiles map and the GeoParquet spatial-query
panel together, with no page edits.| Symptom | Cause | Fix |
|---|---|---|
MISSING_TOOLS | ogr2ogr/tippecanoe/duckdb (or duckdb spatial) absent | Print the per-OS install line and stop; re-run after installing. |
UNSUPPORTED_FORMAT | Raster .tif/.tiff (COG tier, later phase) | Use portaljs-add-dataset for tabular; await the COG phase. |
SHAPEFILE_NOT_ZIPPED | Bare .shp with no siblings | Zip the whole .shp/.dbf/.shx/.prj set and pass the .zip. |
MULTI_LAYER | GPKG/KML with more than one layer | List layers and ask which to ingest; pass the layer name. |
REPROJECTION_FAILED | ogr2ogr error, often a missing .prj | Show stderr; re-run with -s_srs EPSG:<code>. |
EMPTY_OUTPUT | Normalized GeoJSON has 0 features | Check the geometry column / CRS of the source. |
TILING_FAILED / GEOPARQUET_FAILED | tippecanoe or duckdb non-zero | Show stderr; for very large inputs see the size escape hatch. |
LFS_PUSH_FAILED | Missing/expired Arc token or unset lfs.url | Re-mint the JWT (see portaljs-deploy); confirm git config lfs.url. |
/portaljs-add-geo source=./data/rivers.geojson name="World Rivers" namespace=reference
/portaljs-add-geo source=https://example.com/admin-boundaries.zip slug=admin-boundaries
/portaljs-add-geo source=./data/census.gpkg slug=census-tracts namespace=statistics
.claude/commands/portaljs-add-geo.mdreferences/reference.mdportaljs-add-dataset, portaljs-add-map, portaljs-add-resource, portaljs-deployWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/arcgis-to-portaljsMigrate 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./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./portaljs-add-mapRender a GeoJSON dataset on an interactive Leaflet map in the Views section of a dataset's showcase. Installs react-leaflet and a Map component, then renders the map for the chosen dataset. Use when a dataset's data is geographic and a map view is needed alongside the showcase's default metadata and download./portaljs-add-resourceAdd another file (resource) to an EXISTING dataset in a PortalJS portal — a data dictionary, methodology, or an additional data file. Turns a single-file dataset into a multi-resource one; the showcase renders a section per resource. Use when a dataset needs a second file, such as a data dictionary, methodology doc, or an additional period's data.2 plugins ship this exact skill · first indexed Jul 9, 2026
npx claudepluginhub datopian/portaljs --plugin portaljsOther plugins' skills for the same job