Agent skill · Design & Presentation

design-postgis-tables

Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications

Tiger Data1,796★ · +6/wk · 1 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add timescale/pg-aiguide --skill design-postgis-tables --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 17 KB
Bundled scripts: none
Declared author: tigerdata
Requires: Requires PostgreSQL 15+ with the PostGIS extension
Path: skills/design-postgis-tables/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,806 · +10 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# PostGIS Spatial Table Design ## Before You Start (5 Questions) 1. What is the geographic scope (single city/region vs global)? 2. What are your primary query patterns (within-radius, bbox, intersects, nearest-neighbor)? 3. What units do you need for distance/area (meters vs CRS units), and how accurate must they be? 4. What is the expected scale (rows, write rate), and is the data mostly append-only? 5. Do you need 3D (Z) or measures (M), or is 2D enough? **SQL injection note:** When turning these patterns into application code, use parameterized queries for user-provided values (WKT/WKB, coordinates, IDs, radii). Avoid string-concatenating untrusted input into SQL; for dynamic identifiers, use safe identifier quoting/whitelisting. ## Core Rules - **Always use PostGIS geometry/geography types** instead of PostgreSQL's built-in geometric types (`POINT`, `LINE`, `POLYGON`, `CIRCLE`). PostGIS types provide true spatial capabilities. - **Choose between GEOMETRY and GEOGRAPHY** based on your use case: GEOMETRY for projected/local data with Cartesian math; GEOGRAPHY for global data requiring accurate spherical calculations. - **Always specify SRID** (Spatial Reference Identifier) when

What's inside
Steps it walks through
  1. Before You Start (5 Questions)
  2. Core Rules
  3. Geometry vs Geography
  4. When to Use GEOMETRY
  5. When to Use GEOGRAPHY
  6. Comparison Table
  7. Geometry Types
  8. Point Types
  9. Line Types
  10. Polygon Types
  11. Generic Types
  12. Coordinate Systems (SRID)
  13. Common SRIDs
  14. SRID Best Practices
More from pg-aiguide
All skills →
About this skill
What does the design-postgis-tables skill do?

Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications

How do I install it?

Run `npx skills add timescale/pg-aiguide --skill design-postgis-tables --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From timescale/pg-aiguide, a repository with 1,806 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going