Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/duckdb/duckdb-skills/spatialnpx skills add duckdb/duckdb-skills --skill spatialgit clone --depth 1 https://github.com/duckdb/duckdb-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/duckdb/duckdb-skills/spatial)<a href="https://agentmods.dev/skills/duckdb/duckdb-skills/spatial"><img src="https://agentmods.dev/badge/skills/duckdb/duckdb-skills/spatial.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00115 | $0.01013 |
| Opus 5 | $0.00057 | $0.00507 |
| Sonnet 5 | $0.00023 | $0.00203 |
| Haiku 4.5 | $0.00012 | $0.00101 |
Grade A, and why
spatial scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are answering spatial questions using DuckDB's spatial extension and, when needed, Overture Maps as a free global data source.
Question or file: $0
Additional context: ${1:-}
Step 1 — Understand what the user needs
Classify the question:
| Pattern | Data source | Key functions |
|---|---|---|
| "Find X near Y" (no user file) | Overture Maps on S3 | ST_Distance_Spheroid, bbox filtering |
| "How far between A and B" | Geocode or user data | ST_Distance_Spheroid |
| "Which points fall inside polygons" | User files | ST_Contains |
| "Analyze this GeoJSON/Shapefile/GPX" | User file | ST_Read, measurement functions |
| "Show density/hotspots" | User or Overture data | H3 hex binning |
| "Convert to GeoJSON/GeoPackage" | User file | COPY TO (FORMAT GDAL) |
| "Count buildings/roads in area" | Overture Maps | bbox filtering + aggregation |
If the question involves real-world places, POIs, buildings, roads, or boundaries and the user hasn't provided a file, use Overture Maps — read references/overture.md for S3 paths and schema.
For spatial function syntax, read references/functions.md.
Step 2 — Write and run the query
Always start with:
LOAD spatial;
SET geometry_always_xy = true;
Add extensions as needed:
- Overture/remote data:
LOAD httpfs; CREATE SECRET (TYPE S3, PROVIDER config, REGION 'us-west-2'); - H3 hex binning:
INSTALL h3 FROM community; LOAD h3;
Key principles
bbox filtering first — When querying Overture, always filter on bbox.xmin/xmax/ymin/ymax before any spatial function. This uses Parquet predicate pushdown and avoids downloading the full dataset.
Always set geometry_always_xy = true — This ensures all spatial functions interpret coordinates as longitude, latitude (the standard for Overture, GeoJSON, and most data sources). Without it, spheroid functions assume latitude first and return wrong results.
Use spheroid functions for real-world distances — ST_Distance_Spheroid returns meters on the WGS84 ellipsoid. Plain ST_Distance uses planar coordinates and gives meaningless results for lat/lng. Important: spheroid functions (ST_Distance_Spheroid, ST_Area_Spheroid, etc.) require POINT_2D inputs, not generic GEOMETRY. Overture geometry columns are typed GEOMETRY('OGC:CRS84') and cannot be cast directly. Extract coordinates first:
ST_Point(ST_X(geometry), ST_Y(geometry))::POINT_2D
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 84 lines · 115 tokens per session scan A b016c8355524
spatial is a skill published in the GitHub repository duckdb/duckdb-skills (538 stars, last pushed 4mo ago), licensed MIT. It adds 115 tokens to every session and 1,013 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
lamindb
Use when working with LaminDB, the open-source lineage-native lakehouse for biological datasets and models. Covers setup, artifact registration, query/search, lineage tracking, validation, ontology-backed annotation with Bionty, collections, branches, storage, and workflow integrations.
tiledbvcf
Efficient storage and retrieval of genomic variant data using TileDB. Scalable VCF/BCF ingestion, incremental sample addition, compressed storage, parallel queries, and export capabilities for population genomics.
defining-cohort-phenotypes
Authors computable phenotype and cohort definitions in the OHDSI ATLAS / CIRCE style over the OMOP CDM, combining standard concept sets with NLP-derived features that OpenMed extracts. Use when the user wants to define a patient cohort, write a computable phenotype, reuse PheKB or OHDSI Phenotype Library logic, build…
benchling-integration
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
chembl-database
Query the ChEMBL database for bioactive molecules, drug targets, bioactivity data, approved drugs, and chemical structures. Use when the user asks about compounds, targets, IC50/Ki values, drug mechanisms, or structure searches.
nvalchemi-data-storage
How to write, read, compose, and load atomic data using nvalchemi's composable Zarr-backed storage pipeline (Writer, Reader, Dataset, MultiDataset, DataLoader). Use when saving simulation outputs or trajectories to disk, converting structures (e.g. ASE / extxyz) into Zarr stores, assembling datasets for training or…