Google's official skill for the gws CLI — drive Gmail, Drive, Calendar, Sheets, Docs, Chat and Admin APIs from an agent, with Model Armor screening.
Supabase Postgres Best PracticesSkill
Summary
Supabase's official Postgres skill — eight rule categories ranked by impact, each with wrong-vs-right SQL and EXPLAIN output, for schema, RLS, indexing and query work on Postgres anywhere.
Features
- Eight rule categories ranked from critical to low impact
- Each rule pairs incorrect SQL with the corrected version and an EXPLAIN plan
- Covers RLS policies and the tests that verify tenant isolation
- Diagnostic rules for slow queries, locking, bloat and connection exhaustion
- Applies to Postgres anywhere, with Supabase-specific notes called out separately
- Includes pgvector, pgmq and pg_cron guidance
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Use the supabase-postgres-best-practices skill to review this migration before I run it — check the index choices, the RLS policy and whether the column types will scale.
Description
Supabase maintains this skill for Postgres generally, not only Postgres on Supabase. Its instruction is to load before touching anything that lives in a database — creating or altering a table, picking a column type, writing a migration or a declarative schema file, adding an RLS policy, an index, a trigger, a database function, a queue or a pg_cron job, setting up pgvector search, or restoring a dump.
It is equally the skill to load when something is already wrong: slow queries, high CPU, timeouts, connection exhaustion, locking, bloat, an EXPLAIN plan you cannot read, or rows visible to the wrong tenant.
How the rules are organised
Eight categories, ordered by impact, each with a rule-file prefix:
- Query performance (
query-) — critical - Connection management (
conn-) — critical - Security and RLS (
security-) — critical - Schema design (
schema-) — high - Concurrency and locking (
lock-) — medium-high - Data access patterns (
data-) — medium - Monitoring and diagnostics (
monitor-) — low-medium - Advanced features (
advanced-) — low
Every rule file follows the same shape: why it matters, an incorrect SQL example with an explanation of the damage, the corrected version, EXPLAIN output or a metric where one is illuminating, and Supabase-specific notes where the managed platform changes the answer.
That structure is what makes it useful to an agent rather than a human reading a blog post — a rule is retrievable by prefix, and the wrong/right pair gives the model a concrete pattern to match against the SQL in front of it.
Version 1.1.1, MIT licensed.
Related Skills
Netlify's official skill for zero-config managed Postgres — querying from Functions, Drizzle setup, migrations and per-preview database branches.
Official WordPress skill for Gutenberg block work: block.json, attributes and serialization, dynamic rendering, and the deprecation path that keeps existing content valid.
Persistent cross-session memory for coding agents: hooks capture each session, a local SQLite + vector store compresses it, and a mem-search skill reads it back.
