
GeoSQL
Skill帮 agent 为 PostGIS、DuckDB、BigQuery、Snowflake 写地理空间 SQL,先查表结构、控制查询费用,再把结果渲染成交互地图回看校正,适合选址与设施覆盖分析。需要 Python 和自己的数据库或数仓,出图用 Dekart(可本地 Docker 部署)。
GeoSQL
Claude Code, Codex, GitHub Copilot, OpenCode, and Mistral Vibe skill for data scientists and analysts working with geospatial data on PostGIS, BigQuery, Snowflake, and Wherobots.
Note: No SaaS account needed. Works 100% locally or self-hosted.

4x improvement on geospatial tasks with map in the loop.

Quick Start
With Python (interactive mode):
pip install geosql && geosql
GeoSQL first installs the skill into your detected agent. It then checks whether the optional Dekart CLI is ready and, only when needed, asks before installing or initializing it. The prompt shows the exact commands and defaults to the recommended install option.
After installing, prompt your agent like this:
/geosql Show EV charger density along major roads and render a map
How to update
Upgrade GeoSQL in the Python environment where it is installed:
pip install --upgrade geosql
If you use the optional Dekart CLI, update it too:
pip install --upgrade dekart
Then rerun the installer so the latest GeoSQL skill and references are copied to your detected agent:
geosql
Version telemetry
GeoSQL sends a best-effort version check with its package version and an opaque random installation ID. GeoSQL and Dekart CLI share the ID at ${XDG_CONFIG_HOME:-~/.config}/dekart/installation_id; deleting that file resets it. Set DO_NOT_TRACK=1 (or DNT=1) to disable the version check before an ID is created. CI sends a reserved non-persisted test ID.
Example prompts to try in your agent:
Real estate analysis:
/geosql Show buildings with low school accessibility in Ottawa, render as a map
Site selection:
/geosql Find the top 10 locations for Sporting Goods Store in Seattle based on POI co-location and distance to the nearest competitor. Create a map.
EV charging infrastructure:
/geosql create map EV charger density along major Romanian roads, highlighting how many charging stations are within 5 km of each motorway, trunk, or primary road segment.
How it works
GeoSQL runs an agent loop with a map in it.

- Discovery. The skill explores your warehouse metadata (tables, columns, types) instead of guessing schemas. Works with Overture Maps shares on BigQuery and Snowflake, and your private tables on PostGIS, BigQuery, Snowflake, or Wherobots.
- SQL. The agent writes spatial SQL using the right functions for your engine (
ST_INTERSECTS,ST_DISTANCE, H3, bbox overlap for partition pruning, and so on). - Cost check. On BigQuery, every query is dry-run first to estimate bytes scanned. A 10 GiB billing cap is enforced by default. Over-budget queries get rewritten cheaper (tighter bbox, lower H3 resolution, more filters) instead of executed.
- Geometry validation. The agent computes total area (polygons) or total length (lines) as a sanity check, and cross-checks against domain knowledge.
- Map feedback. When available, the agent renders the result through Dekart, looks at the rendered image, and corrects geometry mistakes the text-only loop would miss. This is the loop that gets the 4x improvement.
The skill uses your local CLI authentication (bq, snow, dekart), so warehouse credentials never go to the agent.
Benchmarks
GeoSQL ships with a reproducible eval suite under evals/. Each case asserts specific behaviors (cost guardrails, validation steps, correct result), not just "did the agent answer."
Current results on the included suite:
| Case | Assertions | Pass rate |
|---|---|---|
london-boroughs | 4 | 100% |
berlin-create-map | 3 | 100% |
paris-boundaries | 1 | 100% |
| Total | 8 | 100% |
Average: 3,085 tokens per turn, 72 s duration per turn.
The 4x improvement chart above compares the same task set with and without the map-in-loop step. Without maps, the agent's text-only validation misses geometry-class errors (mistaking a neighborhood polygon for a metro-area perimeter, double-counting overlapping features, picking the wrong join key on coordinate-reference systems). Adding the rendered map as a tool call lets the agent see those mistakes and self-correct.
Run the suite yourself:
python evals/run.py
See evals/RUNBOOK.md for setup and how to add new cases. PRs with new evals welcome.
相关资源

SQL Queries
SkillAnthropic 官方数据技能,指导 agent 在 Snowflake、BigQuery、Databricks、PostgreSQL 等主流数仓方言下编写、翻译和优化 SQL,涵盖 CTE、窗口函数与聚合分析查询。
anthropics/knowledge-work-plugins37.4k
BigQuery Basics
Skill用 bq 与 gcloud 命令行管理 BigQuery 的数据集、表与作业,运行 SQL 查询并导入数据,附客户端库、MCP 与 Terraform 参考。Google 官方技能,需要 Google Cloud 项目。
google/skills25.3k
DuckDB Skills
SkillDuckDB 官方技能合集:用 SQL 或自然语言查询本地与 S3 上的 CSV、Parquet、Excel、JSON 文件,挂载数据库、转换格式、分析空间数据、检索文档。需要 DuckDB 命令行,仅在 macOS 与 Linux 上测试过。
duckdb/duckdb-skills623
3DCityDB MCP Server
MCP慕尼黑工业大学地理信息教研室(3DCityDB 共同开发方)出品,用自然语言查询 3DCityDB v5 中的 CityGML 三维城市模型,空间与语义属性都能查,SQL 只读执行。需要已部署的 3DCityDB 数据库和 Python,在放有连接配置 .env 的目录注册。
tum-gis/3dcitydb-mcp-server23
DuckDB
CLI进程内分析型 SQL 数据库,命令行可直接用 SQL 查询 CSV、Parquet、JSON 文件,无需导入或启动服务,适合 agent 抽样与聚合大文件。官方维护。
duckdb/duckdb43.5k
Data
Plugin数据分析插件:按各家 SQL 方言写查询、探查数据集、做统计检验、用 Python 出图并搭建交互式 HTML 看板,分享前复核方法与结论。可连接 Snowflake、BigQuery 等数仓。Anthropic 官方。
anthropics/knowledge-work-plugins37.5k