.agents/skills/postgis-skill/SKILL.md
PostGIS-focused SQL tips, tricks and gotchas. Use when in need of dealing with geospatial data in Postgres.
npx skillsauth add HuynhSang2005/delivery-app postgis-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
-- in front of it.st_segmentize -> ST_Segmentize).geom; geography column geog.including on same index for faster lookup.select postgis_full_version(); to see if all upgrades happened successfully.sum(case when A then 1 else 0 end) is just count() filter (where A)row_number() ... = 1 can likely be redone as order by + limit 1 (possibly with distinct on or lateral)exists(select 1 from ...) is just exists(select from ...)tags ->> 'key' = 'value' is just tags @> '{"key": "value"} - works faster for indexesorder bygeometry(multilinestring, 4326)) - use plain geometry or geography instead. This removes clutter of ST_Multi and errors via ST_SetSRID.ST_UnaryUnion(ST_Collect(geom)) is just ST_Union(geom)ST_Buffer(geom, 0) should be ST_MakeValid(geom)select min(ST_Distance(..)) should be select ST_Distance() ... order by a <-> b limit 1 to enable knn gistorder by ST_Distance(c.geog, t.geog) should be order by c.geog <-> t.geogST_UnaryUnion is a sign you're doing something wrongST_MakeValid is a sign you're doing something wrong on the previous stepST_SetSRID: check the actual projection of input data, check if it can be set correctly during input (ST_GeomFromGeoJSON, EWKT-style SRID=4326;POINT(..., EWKB allow that). Check if ST_Transform is needed instead.ST_Intersects to other topology predicatesST_Simplify(geom, 0)ST_ClusterKMeans with k=2 and max_radius set to your distance.ST_AsEWKB for binary representation instead of ST_AsWKB to keep SRID.ST_Hexagon / ST_HexagonGrid use h3 extension.ST_QuantizeCoordinates if precision is known.tools
React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, and useFieldArray. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form handling.
tools
Build type-safe validated forms using React Hook Form v7 and Zod v4. Single schema works on client and server with full TypeScript inference via z.infer. Use when building forms, multi-step wizards, or fixing uncontrolled warnings, resolver errors, useFieldArray issues, performance problems with large forms.
tools
Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.
development
Required reference for Prisma v7 driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter/Transaction interfaces. Contains critical contract details not inferable from code examples — including the transaction lifecycle protocol, error mapping requirements, and verification checklist. Existing implementations do not replace this skill.