---
name: "duckdb-spatial-geoparquet-ext"
description: "Perform spatial GIS queries and geometry analytics at extreme speed with DuckDB Spatial."
metadata:
  author: "DuckDB"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "run spatial query duckdb"
  - "query geoparquet duckdb"
  - "calculate distance st_dwithin duckdb"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# DuckDB Spatial Extension for GeoParquet

Executes spatial SQL queries using DuckDB spatial extension: ST_Point, ST_Intersects, ST_DWithin, reading GeoParquet, Shapefiles, and GeoJSON with GDAL drivers without installing heavy PostGIS.

## When to Invoke
Invoke this skill whenever you need to:
- run spatial query duckdb
- query geoparquet duckdb
- calculate distance st_dwithin duckdb

## Execution SOP & Rules
1. Install and load extension with INSTALL spatial; LOAD spatial;.
2. Construct geometries with ST_Point(lon, lat) and transform projections with ST_Transform.
3. Perform spatial joins using spatial predicates: WHERE ST_Intersects(points.geom, polygons.geom).
4. Read vector formats using ST_Read('boundaries.geojson') or direct GeoParquet reader.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
