decision-labs/geobase-skills/geobase-worker-archive-to-pmtiles
Claude Code and agent skill by decision-labs/geobase-skills
- community
Checking that the SKILL.md file is still in the repository.
Create and validate archiveToPmtiles worker jobs. Triggers on PMTiles export, PostGIS table archive, vector tile snapshot to Storage bucket pmtiles.
Install
npx vskill@latest install decision-labs/geobase-skills/geobase-worker-archive-to-pmtilesSKILL.md
Worker: Archive to PMTiles
When to use this skill
- Export one PostGIS table to a PMTiles archive in project Storage via
archiveToPmtiles - Create a durable vector-tile snapshot of a table (offline maps, sharing, or serving outside live tileserver)
- Studio path: Tile Server → Tables → Archive to PMTiles
- Not for live vector tiles from PostGIS (
@geobase-tileserver), local file import (@geobase-project-db-data-import), or AOI imports (@geobase-worker-osm-import,@geobase-worker-overture-import)
Public guide: https://docs.geobase.app/guides/gis-analyst/archive-to-pmtiles OpenAPI: {origin}/worker/doc and {origin}/worker/ui.
Secrets (human in the loop)
Worker HTTP needs `GEOBASE_SERVICE_ROLE_KEY`. Agents cannot obtain it. Ask the user to put it in a gitignored `.env.secrets`. Do not paste keys in chat. See @geobase → Secrets (human in the loop).
Shared worker pool callers also need an org Services API key plus a projectTarget object (Studio injects this).
Required inputs
@geobase→ private-beta / Studio path if CLI unavailableproject_refGEOBASE_SERVICE_ROLE_KEYin local secrets (or org Services key for shared pool)- Storage bucket `pmtiles` must already exist (v1 does not auto-create)
- Payload JSON:
table(required) —^[A-Za-z_][A-Za-z0-9_]*$schema(optional; defaultpublic)minZoom/maxZoom(optional; default1/15)
Storage layout
| Object | Role | |
|---|---|---|
pmtiles/{table}.pmtiles | Archive (overwrite on re-run) | |
pmtiles/{table}.snapshot.json | Snapshot metadata (overwrite with archive) |
On success, snapshot fields are mirrored on job metadata.snapshot.
Size guards (fail fast)
Errors start with [pmtiles size guard]. Env 0 disables that check.
| Env | Default | |
|---|---|---|
PMTILES_MAX_ROWS | 500000 | |
PMTILES_MAX_RELATION_BYTES | 536870912 (512 MiB) | |
PMTILES_MAX_ZOOM | 15 | |
PMTILES_MAX_ZOOM_SPAN | 15 | |
PMTILES_MAX_OUTPUT_BYTES | 536870912 (512 MiB) |
Confirm table row count and relation size before submit. Prefer smaller tables or lower maxZoom on first run.
Procedure
- Session / project:
geobase-cli whoami,geobase-cli projects refs(or Studioproject_ref). - Env:
geobase-cli projects env <ref> --persona web --format dotenvfor non-secrets; user sources.env.secretsfor service role. - Human checkpoint: confirm Storage bucket
pmtilesexists and table is within size guards. - Validate identifiers:
tableand optionalschemamatch^[A-Za-z_][A-Za-z0-9_]*$. - Verify table exists and has geometry suitable for vector tiles.
- Submit:
POST https://${GEOBASE_PROJECT_REF}.geobase.app/worker/jobs/archiveToPmtiles- headers:
apikey+Authorization: Bearer= service role;Content-Type: application/json - Studio proxy (when available):
POST /api/projects/{ref}/jobs/archiveToPmtiles - shared pool:
POST https://services.geobase.app/worker/jobs/archiveToPmtileswith org Services key +projectTarget
- Poll:
GET .../worker/jobs/archiveToPmtiles/<job_id>— 5s then backoff (10s / 20s / 30s). - On
success: verifymetadata.snapshot(path,url,bytes,rows,sha256) and Storage objects underpmtiles/.
Multi-table Studio selection runs one job per table (client loop).
Example payload
With optional zoom bounds:
Submit rule (mandatory)
Only submit when bucket pmtiles exists, identifiers are valid, and the table is within fleet size guards (or user approved limit changes). Re-runs overwrite {table}.pmtiles and {table}.snapshot.json.
Failure handling
- Auth → refresh service role or org Services key in
.env.secrets - Missing bucket → create Storage bucket
pmtilesbefore retry [pmtiles size guard]→ fewer rows, lowermaxZoom, or raise env limits with user approvalUnable to find driver 'PMTiles'→ worker image needs GDAL ≥ 3.8 with PMTiles driver (fleet ops; not fixable from payload)- Preserve failed
job_idand truncatedresultfor debugging
Related skills
@geobase-tileserver— live vector MVT from PostGIS tables@geobase-project-db-data-import— load local files into Postgres first@geobase-worker-osm-import/@geobase-worker-overture-import— populate tables before archiving@geobase— secrets, project ref, routing
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/geobase-worker-archive-to-pmtiles/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/decision-labs/geobase-skills/geobase-worker-archive-to-pmtiles)