Design PostGIS Tables

PostGIS spatial schema reference: geometry vs geography, SRIDs, GiST indexing

Tested · Works

Test report

Verdict
Tested · Works
Score
9.2/10
Tested
Jul 17, 2026
Environment
Claude Code 2.x (agent harness)
Upstream re-checked
Aug 10, 2026 · d882db4

Ran both schemas against a live PostGIS 3.6 instance: the skill's GEOGRAPHY + ST_DWithin design returned the correct 375 restaurants within 2km via a GiST bitmap index scan (cost 7919), while the naive geometry(4326) baseline query returned all 5000 rows because ST_Distance measured degrees not meters, and did it with a full sequential scan (cost 62613). A measured correctness-and-performance win, not just style advice.

Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works

  • Installs cleanly 5/5
  • Triggers reliably 5/5
  • Output vs. baseline 8/10
  • Docs & honesty 5/5

What Design PostGIS Tables does

A comprehensive PostGIS reference for designing spatial tables: GEOMETRY vs GEOGRAPHY, SRID choice, GiST/BRIN/SP-GiST indexing, ST_DWithin performance patterns, and validity constraints. Triggers when designing spatial tables or geo queries for location-based apps in PostgreSQL.

How to install Design PostGIS Tables

git clone https://github.com/timescale/pg-aiguide.git
mkdir -p ~/.claude/skills
cd pg-aiguide && cp -r skills/design-postgis-tables ~/.claude/skills/design-postgis-tables

Skills live in ~/.claude/skills/ (global) or .claude/skills/ (per-project). Restart Claude Code after installing.

Commands — how to trigger Design PostGIS Tables

  • /design-postgis-tables PostGIS spatial schema reference: geometry vs geography, SRIDs, GiST indexing

It also activates on plain-language prompts like these:

  • Design a PostGIS schema for restaurants and delivery zones
  • How should I index driver GPS pings for fast radius queries?
  • Should I use geometry or geography for a nearby-restaurants query?

Frequently asked questions

Is the Design PostGIS Tables skill free?
Yes. The skill itself is free from timescale/pg-aiguide. SkillProof publishes the install command and an independent test verdict at no cost.
Does Design PostGIS Tables work with Claude Code?
We tested it with Claude Code 2.x (agent harness) on Jul 17, 2026. Verdict: Tested · Works. Ran both schemas against a live PostGIS 3.6 instance: the skill's GEOGRAPHY + ST_DWithin design returned the correct 375 restaurants within 2km via a GiST bitmap index scan (cost 7919), while the naive geometry(4326) baseline query returned all 5000 rows because ST_Distance measured degrees not meters, and did it with a full sequential scan (cost 62613). A measured correctness-and-performance win, not just style advice.
What is the Design PostGIS Tables SkillProof Score?
9.2/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 8/10, docs & honesty 5/5.
How do I install Design PostGIS Tables?
Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
Can I use Design PostGIS Tables with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.