Agent skill

Portaljs Add Geo

by datopian in datopian/portaljs

Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server.

MITAuto-check passedData & Analytics

Install Portaljs Add Geo

skills CLI
$ npx skills add datopian/portaljs --skill portaljs-add-geo -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install datopian/portaljs portaljs-add-geo --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/datopian/portaljs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/portaljs-add-geo .claude/skills/portaljs-add-geo && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
portaljs-add-geo
GitHub stars
2.4k
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
644 words
Files
2 (incl. references)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server.

  • Works in 12 steps: Gather input — source (geo file path or… → Detect the native tools (ogr2ogr,… → Validate the portal directory and… → …
  • The source is a vector geo format that needs a map
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Calls npx, brew and apt-get

What it does

Portaljs Add Geo is an agent skill from datopian/portaljs. Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server. Normalizes CRS to EPSG:4326, derives a PMTiles render tier and a GeoParquet query tier, pushes all three artifacts to Cloudflare R2 via Git LFS, and appends one dual-tier datasets.json entry the showcase auto-renders. Use when the source is a vector geo format that needs a map or spatial-query view.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/reference.md`). Compatibility notes: Claude Code with PortalJS portals (Next.js 14, React 18/19, Node 18+). Requires native GDAL, tippecanoe, and duckdb on the user's machine (macOS or…

It sits in Data & Analytics, covering Geospatial analysis. It works with Git, Cloudflare R2 and DuckDB. The repository describes itself as: 🌀 AI-native framework for building data portals. Scaffold a full portal from a brief and load datasets in minutes with agentic skills — any backend (CKAN, GitHub, Frictionless). The licence is MIT.

When your agent uses it

  • The source is a vector geo format that needs a map
  • Spatial-query view

Example prompts

  • “/portaljs-add-geo”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Claude Code with PortalJS portals (Next.js 14, React 18/19, Node 18+). Requires native GDAL, tippecanoe, and duckdb on the user's machine (macOS or Linux/WSL). Runs from any project via the plugin, a personal ~/.claude/commands install, or a portaljs clone.
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(ogr2ogr:*), Bash(ogrinfo:*), Bash(tippecanoe:*), Bash(duckdb:*), Bash(git:*), Bash(curl:*), Bash(npx:*), Bash(node:*), Bash(mkdir:*), Bash(cp:*), Bash(wc:*), Bash(command:*), WebFetch

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Gather input — source (geo file path or URL), portal directory, namespace. Interview if
  2. Detect the native tools (ogr2ogr, tippecanoe, duckdb + spatial). Any missing →
  3. Validate the portal directory and confirm the geo showcase components exist.
  4. Fetch (if URL) and detect the input format; reject raster and bare .shp.
  5. Preserve the original, then normalize to EPSG:4326 GeoJSON with ogr2ogr -t_srs EPSG:4326.
  6. Apply the size escape hatch (measure normalized-GeoJSON bytes): warn ≥ 500 MB; skip PMTiles
  7. Derive PMTiles with tippecanoe -zg --drop-densest-as-needed.
  8. Derive GeoParquet with duckdb — covering bbox STRUCT + ST_Hilbert order; verify a
  9. Track all three files with Git LFS, mint an Arc JWT, push to R2, prune, and build the
  10. Append one dual-tier datasets.json entry (pmtiles + geoparquet + original resources).
  11. Verify: npx tsc --noEmit and a Range: 206 check on the R2 URL.
  12. Report the tiers, manifest entry, and showcase route.

What it can do on your machine

Read from SKILL.md and the folder at commit d5c096a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(ogr2ogr:*)
    • Bash(ogrinfo:*)
    • Bash(tippecanoe:*)
    • Bash(duckdb:*)
    • Bash(git:*)
    • Bash(curl:*)
    • Bash(npx:*)

    …and 6 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • brew
    • apt-get
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • duckdb.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code with PortalJS portals (Next.js 14, React 18/19, Node 18+). Requires native GDAL, tippecanoe, and duckdb on the user's machine (macOS or Linux/WSL). Runs from any project via the plugin, a personal ~/.claude/commands install, or a portaljs clone.

    From compatibility in the SKILL.md frontmatter.

Context cost

Portaljs Add Geo loads about 1.7k tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 122 tokens; SKILL.md has 644 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~122
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from datopian/portaljs at commit d5c096a, republished under its MIT licence (© datopian). 644 words, ~1,723 tokens.

Download SKILL.mdSave it as .claude/skills/portaljs-add-geo/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
portaljs-add-geo
description
Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server. Normalizes CRS to EPSG:4326, derives a PMTiles render tier and a GeoParquet query tier, pushes all three artifacts to Cloudflare R2 via Git LFS, and appends one dual-tier datasets.json entry the showcase auto-renders. Use when the source is a vector geo format that needs a map or spatial-query view.
allowed-tools
Read, Write, Edit, Bash(ogr2ogr:*), Bash(ogrinfo:*), Bash(tippecanoe:*), Bash(duckdb:*), Bash(git:*), Bash(curl:*), Bash(npx:*), Bash(node:*), Bash(mkdir:*), Bash(cp:*), Bash(wc:*), Bash(command:*), WebFetch
compatibility
Claude Code with PortalJS portals (Next.js 14, React 18/19, Node 18+). Requires native GDAL, tippecanoe, and duckdb on the user's machine (macOS or Linux/WSL). Runs from any project via the plugin, a personal ~/.claude/commands install, or a portaljs clone.
version
1.0.0
author
Datopian <hello@datopian.com>
license
MIT
tags
portaljs, data-portal, geospatial, pmtiles, geoparquet, duckdb

PortalJS — Add Geo

Overview

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:

  • PMTiles (render tier) — a vector-tile archive <MapPreview> renders with MapLibre GL over HTTP range requests; any dataset size pans and zooms with no tile server.
  • GeoParquet (query tier) — a GeoParquet 1.1 file (covering bbox column, Hilbert-sorted) <GeoQuery> runs spatial SQL over in place via DuckDB-Wasm.
  • Original — the untouched upload in its native CRS, kept downloadable.

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.

Prerequisites

  • A scaffolded portaljs-catalog portal whose template ships components/MapPreview.tsx and components/GeoQuery.tsx (PR #1647 or later).
  • Native CLIs on the user's machine: GDAL (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.
  • Arc credentials for the Git-LFS → R2 push (the same token portaljs-deploy resolves), or an OSS self-hosted Giftless.

Instructions

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:

  1. Gather input — source (geo file path or URL), portal directory, namespace. Interview if missing; never dead-end.
  2. Detect the native tools (ogr2ogr, tippecanoe, duckdb + spatial). Any missing → print the per-OS install and stop.
  3. Validate the portal directory and confirm the geo showcase components exist.
  4. Fetch (if URL) and detect the input format; reject raster and bare .shp.
  5. Preserve the original, then normalize to EPSG:4326 GeoJSON with ogr2ogr -t_srs EPSG:4326.
  6. Apply the size escape hatch (measure normalized-GeoJSON bytes): warn ≥ 500 MB; skip PMTiles and emit GeoParquet-only > 2 GB (documented, never silent).
  7. Derive PMTiles with tippecanoe -zg --drop-densest-as-needed.
  8. Derive GeoParquet with duckdb — covering bbox STRUCT + ST_Hilbert order; verify a range read.
  9. Track all three files with Git LFS, mint an Arc JWT, push to R2, prune, and build the absolute data.portaljs.com URLs.
  10. Append one dual-tier datasets.json entry (pmtiles + geoparquet + original resources).
  11. Verify: npx tsc --noEmit and a Range: 206 check on the R2 URL.
  12. Report the tiers, manifest entry, and showcase route.
Show full SKILL.md (228 more words)Show less

Output

  • Created: data/<slug>.pmtiles, data/<slug>.parquet, data/<slug>.<origext> (all LFS-tracked → R2); data/<slug>.4326.geojson (intermediate; can be pruned).
  • Modified: datasets.json (one dual-tier entry appended); .gitattributes (LFS tracking).
  • Verified: npx tsc --noEmit passes; the R2 URLs answer HTTP 206 range reads.
  • Result: /@<namespace>/<slug> renders the PMTiles map and the GeoParquet spatial-query panel together, with no page edits.

Error Handling

SymptomCauseFix
MISSING_TOOLSogr2ogr/tippecanoe/duckdb (or duckdb spatial) absentPrint the per-OS install line and stop; re-run after installing.
UNSUPPORTED_FORMATRaster .tif/.tiff (COG tier, later phase)Use portaljs-add-dataset for tabular; await the COG phase.
SHAPEFILE_NOT_ZIPPEDBare .shp with no siblingsZip the whole .shp/.dbf/.shx/.prj set and pass the .zip.
MULTI_LAYERGPKG/KML with more than one layerList layers and ask which to ingest; pass the layer name.
REPROJECTION_FAILEDogr2ogr error, often a missing .prjShow stderr; re-run with -s_srs EPSG:<code>.
EMPTY_OUTPUTNormalized GeoJSON has 0 featuresCheck the geometry column / CRS of the source.
TILING_FAILED / GEOPARQUET_FAILEDtippecanoe or duckdb non-zeroShow stderr; for very large inputs see the size escape hatch.
LFS_PUSH_FAILEDMissing/expired Arc token or unset lfs.urlRe-mint the JWT (see portaljs-deploy); confirm git config lfs.url.

Examples

Example 1 — Ingest a GeoJSON into both tiers
/portaljs-add-geo source=./data/rivers.geojson name="World Rivers" namespace=reference
Example 2 — Zipped Shapefile from a URL
/portaljs-add-geo source=https://example.com/admin-boundaries.zip slug=admin-boundaries
Example 3 — GeoPackage with an explicit layer and namespace
/portaljs-add-geo source=./data/census.gpkg slug=census-tracts namespace=statistics

Resources

© datopian, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/portaljs-add-geo of datopian/portaljs.

  • SKILL.md
  • references/reference.md

Open the folder on GitHubat commit d5c096a

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in datopian/portaljs, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Portaljs Add Geo next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Portaljs Add Geo compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portaljs Add Geo this skilldatopian/portaljs2.4k1 repos~1.7kAutomated safety check: PassMIT
Spatialduckdb/duckdb-skills6031 repos~1kAutomated safety check: NotesMIT
Excel and CSV Data Analysisbytedance/deer-flow84k4 repos~2.2kAutomated safety check: PassMIT
Antv L7antvis/L74.1k—~1.4kAutomated safety check: PassMIT
GitHub Skill ForgeYuJunZhiXue/github-skill-forge819—~2kAutomated safety check: NotesNone
Dbt Databricks PR Readydatabricks/dbt-databricks380—~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • Spatial

    duckdb/duckdb-skills

    Official

    Answer questions about spatial data using DuckDB. An agent skill from duckdb/duckdb-skills.

    603 GitHub starsUsed in 1 repo~1k tokens
    Backend & APIsAuto-check: notes
  • Excel and CSV Data Analysis

    bytedance/deer-flow

    Analyzes uploaded Excel and CSV files with SQL through DuckDB, producing schema inspections, statistical summaries and exports to CSV, JSON or Markdown.

    84k GitHub starsUsed in 4 repos~2.2k tokens
    Data & AnalyticsAuto-check passed
  • Antv L7

    antvis/L7

    Comprehensive guide for AntV L7 geospatial visualization library.

    4.1k GitHub stars~1.4k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • GitHub Skill Forge

    YuJunZhiXue/github-skill-forge

    一个"制造技能的技能"。这个工具自动化了将任意 GitHub 仓库转换为标准化 Trae 技能的全过程,是扩展 AI Agent 能力的核心工具。

    819 GitHub stars~2k tokensUpdated 8 mo ago
    Data & AnalyticsAuto-check: notes
  • Dbt Databricks PR Ready

    databricks/dbt-databricks

    Official

    A skill your agent uses for an open dbt-databricks pull request, including your own PR or a fork PR, to assess merge readiness and optionally repair selected gaps on the PR head branch.

    380 GitHub stars~2.8k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • S3 Explore

    duckdb/duckdb-skills

    Official

    Explore and query data on S3, Cloudflare R2, GCS, MinIO, or any S3-compatible storage.

    603 GitHub starsUsed in 1 repo~848 tokens
    Backend & APIsAuto-check: notes

More from datopian/portaljs

All 14 skills in this repo
  • Arcgis To Portaljs

    datopian/portaljs

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

    2.4k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Portaljs Add Chart

    datopian/portaljs

    Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal.

    2.4k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Portaljs Add Dataset

    datopian/portaljs

    Add a dataset (CSV, TSV, JSON, or GeoJSON) to an existing PortalJS portal.

    2.4k GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Portaljs Add Dcat

    datopian/portaljs

    Make 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…

    2.4k GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Portaljs Add Map

    datopian/portaljs

    Render a GeoJSON dataset on an interactive Leaflet map in the Views section of a dataset's showcase.

    2.4k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Portaljs Add Resource

    datopian/portaljs

    Add another file (resource) to an EXISTING dataset in a PortalJS portal — a data dictionary, methodology, or an additional data file.

    2.4k GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Portaljs Add Geo

What does Portaljs Add Geo do?

Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server. Portaljs Add Geo is an agent skill from datopian/portaljs. Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server.

When should I use Portaljs Add Geo?

Portaljs Add Geo fits situations like: the source is a vector geo format that needs a map; spatial-query view.

How do I install Portaljs Add Geo in Claude Code?

Run `npx skills add datopian/portaljs --skill portaljs-add-geo -a claude-code`. Or copy the skill folder (skills/portaljs-add-geo in datopian/portaljs) into .claude/skills/portaljs-add-geo in your project. Claude Code loads it when a task matches its description.

How do I install Portaljs Add Geo in Codex?

Run `npx skills add datopian/portaljs --skill portaljs-add-geo -a codex`. Or copy the skill folder (skills/portaljs-add-geo in datopian/portaljs) into .agents/skills/portaljs-add-geo in your project. Codex loads it when a task matches its description.

Can I use Portaljs Add Geo in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add datopian/portaljs --skill portaljs-add-geo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portaljs-add-geo, .gemini/skills/portaljs-add-geo, .github/skills/portaljs-add-geo and .opencode/skills/portaljs-add-geo in your project.

What does Portaljs Add Geo need to run?

Going by SKILL.md and its folder, Portaljs Add Geo needs the command-line tools its instructions call (npx, brew, apt-get and git). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(ogr2ogr:*), Bash(ogrinfo:*), Bash(tippecanoe:*), Bash(duckdb:*), Bash(git:*), Bash(curl:*), Bash(npx:*), Bash(node:*), Bash(mkdir:*), Bash(cp:*), Bash(wc:*), Bash(command:*), WebFetch. Compatibility (from SKILL.md): Claude Code with PortalJS portals (Next.js 14, React 18/19, Node 18+). Requires native GDAL, tippecanoe, and duckdb on the user's machine (macOS or Linux/WSL). Runs from any project via the plugin, a personal ~/.claude/commands install, or a portaljs clone..

Does Portaljs Add Geo access the network?

SKILL.md names 2 domains. As links in the text: github.com and duckdb.org. This is read from the text; nothing was executed.

Is Portaljs Add Geo safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Portaljs Add Geo use?

Portaljs Add Geo is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portaljs Add Geo use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Portaljs Add Geo?

Skills that share tags, products or a category with Portaljs Add Geo: Spatial (duckdb/duckdb-skills, 603 stars), Excel and CSV Data Analysis (bytedance/deer-flow, 84k stars), Antv L7 (antvis/L7, 4.1k stars) and GitHub Skill Forge (YuJunZhiXue/github-skill-forge, 819 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portaljs Add Geo?

datopian (a GitHub organization) maintains it in datopian/portaljs, which has 2,358 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.

Source: datopian/portaljs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.