Geosql: A Claude/Codex skill for geospatial data
TL;DR Highlight
Adding map rendering to the agent loop reportedly gives 4x improvement on geospatial tasks
Who Should Read
Data developers who run spatial SQL on PostGIS, BigQuery or Snowflake and struggle with geometry errors from LLM agents
Core Mechanics
- The map is part of the agent loop
- GeoSQL renders results as a map image through Dekart.
- The agent looks at the image and corrects its own geometry mistakes.
- Schema is discovered, not guessed
- It reads warehouse metadata for tables, columns and types first.
- It supports Overture Maps shares on BigQuery and Snowflake, plus private tables on PostGIS and Wherobots.
- BigQuery cost is checked before running
- Every query is dry-run first to estimate bytes scanned.
- Over the default 10 GiB billing cap, the query is rewritten with a tighter bbox, lower H3 resolution or more filters.
- Geometry is validated with area and length
- Polygons get a total area and lines a total length, cross-checked against domain knowledge.
- The README says text-only validation misses some errors that a map catches.
- Maps catch specific error classes
- Mistaking a neighborhood polygon for a metro perimeter is one.
- Double-counting overlapping features and picking the wrong join key on coordinate reference systems are others.
- Credentials stay out of the agent
- It uses your local CLI auth (bq, snow, dekart).
- No SaaS account is needed; it runs locally or self-hosted.
Community Reactions
- Opinion that the chart and eval table disagree
- A commenter noted the chart seems to show task success rising from 2% to 8%.
- The evals section shows 100% everywhere, so the real effectiveness is unclear from the README.
- Question about how the map feedback actually works
- A commenter asked what the agent reads back from Dekart each round.
- The README only says the agent looks at the rendered image.
- Experience from a French mapping agency
- A commenter said they are building MCPs for their own data.
- They shared the ignfab/geocontext repo and a beta MCP instance.
- The author joined the thread
- The author said the repo passed 400 stars in a week and offered to answer questions.
How to Apply
- Run the eval suite first
- After installing, run python evals/run.py and read which assertions it checks.
- Copy that case structure to add one or two assertions for your own queries, such as cost cap and validation steps.
- Add a dry-run guard to BigQuery queries
- Dry-run every agent-written query to check bytes scanned before executing.
- If it exceeds a cap such as 10 GiB, make the agent rewrite it with bbox, H3 resolution or filters.
- Add area/length validation to geo results
- Compute total area for polygons or total length for lines and compare with expected values.
- Make this a required step in your prompt or pipeline.
- Render results as a map and show the agent
- Generate a map image at the end of the agent loop and feed it back as input.
- Have the agent fix boundary errors or double counting it sees.
Try It
pip install geosql && geosql
# After install, call it from Claude Code or another agent like this
# /geosql Show {{analysis target}} density in {{region}} and render a map
# Example: /geosql Show EV charger density along major roads and render a map
# Run the eval suite: python evals/run.pyTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques