Tooluck logoTooluck
SKILL.md

portaljs-add-map

Agent skill fromdatopian/portaljs

Render 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.

How to install portaljs-add-map

install portaljs-add-map
# install the portaljs pack with the skills CLI
npx skills add datopian/portaljs

# or add only this skill to Claude Code: copy the folder

skills/portaljs-add-map/

# into

~/.claude/skills/portaljs-add-map/ (all projects)

.claude/skills/portaljs-add-map/ (one project)

skills/portaljs-add-map/SKILL.md

MITFull file
1# PortalJS — Add Map
2
3## Overview
4
5Add an interactive Leaflet map as a view on a dataset's **showcase** in a
6`portaljs-catalog` portal. The skill installs `react-leaflet`/`leaflet` (added directly —
7never `@portaljs/components`), writes a reusable `Map` component split across
8`MapView.tsx` (the Leaflet code) and `Map.tsx` (a `dynamic(..., { ssr: false })` wrapper,
9since Leaflet touches `window` at module load), and renders `<Map />` into the **Views**
10section of the showcase route `pages/[owner]/[slug].tsx` for one chosen GeoJSON dataset.
11The dataset should already carry `format: "geojson"` in `datasets.json`; if it doesn't
12exist yet, the skill can copy the file and register it first.
13
14## Prerequisites
15
16- A scaffolded PortalJS portal (see `portaljs-new-portal`).
17- The target dataset registered in `datasets.json` with `format: "geojson"` (see
18 `portaljs-add-dataset`), or a GeoJSON source file/URL to register.
19- Node 18+ and npm available in the portal directory.
20
21## Instructions
22
23The canonical, full step-by-step workflow is
24[`.claude/commands/portaljs-add-map.md`](https://github.com/datopian/portaljs/blob/main/.claude/commands/portaljs-add-map.md) — the
25single source of truth. Read and follow it when executing. Summary:
26
271. Gather input — dataset slug (or a GeoJSON source to register), portal directory. If any
28 is missing, interview the user; never dead-end on a missing value.
292. Validate the portal directory (`datasets.json`, `package.json`,
30…

Excerpt shown under the repository's MIT license.

More skills in portaljs

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates