Skip to content
Back to skills

Pyodide Workers

ASecurity

Browser-side GIS in Web Workers: Pyodide protocol, progress, memory limits, when to use pure JS.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsgobackend

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add Adilmunawar/ZD-claude-plugin --skill pyodide-workers --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pyodide Workers?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pyodide Workers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adilmunawar-pyodide-workers/badge)](https://www.skillsdirectory.com/skills/adilmunawar-pyodide-workers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pyodide-workers
paths: ["public/workers/**", "src/workers/**"]
description: Browser-side GIS in Web Workers: Pyodide protocol, progress, memory limits, when to use pure JS.
---

- Worker files live in `public/workers/<name>Worker.js` and are loaded with `new Worker('/workers/<name>Worker.js')`.
- Pyodide: `importScripts(pyodide.js)`, `loadPyodide()`, `loadPackage(['pandas','geopandas','shapely'])` once, cached in a promise. First load is 20–40 s and ~150 MB — show a status message and reuse the worker across actions.
- Protocol: `postMessage({ action, payload })` in; `{ status: 'info'|'progress'|'done'|'error', message, data, pct }` out. Always end with `done` or `error`.
- Pass data as JSON strings via `pyodide.globals.set`; return results with `.toJs()` or JSON. Avoid transferring > 50 MB; chunk large feature collections.
- Use pure JS (`@turf/turf`, `shpjs`, `tokml`, `jszip`) when the operation is simple (bbox, area, union of a few polygons, shapefile parse) — no Pyodide cost.
- Memory: Pyodide workers cannot exceed browser tab limits; for province-scale layers send the job to the backend instead.
- Never import Firebase in a worker; the main thread persists results.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…