# Supabase Postgres Best Practices

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-drubleat-mobile-stack-skills-supabase-postgres-best-practices`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [drubleat](https://agentstack.voostack.com/s/drubleat)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [drubleat](https://github.com/drubleat)
- **Source:** https://github.com/drubleat/mobile-stack-skills/tree/main/supabase-postgres-best-practices

## Install

```sh
agentstack add skill-drubleat-mobile-stack-skills-supabase-postgres-best-practices
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Supabase Postgres Best Practices

20+ production rules organized by category. Each rule file has an `impact` rating — load CRITICAL and HIGH rules first for any task, then drill into specifics.

## Rule categories

| Prefix | Category | Load when… |
|---|---|---|
| `query-*` | Query performance | Writing or reviewing SQL queries |
| `conn-*` | Connection management | Configuring clients or seeing connection errors |
| `security-*` | RLS + auth security | Writing RLS policies or auth logic |
| `schema-*` | Table & index design | Designing or altering tables |
| `lock-*` | Concurrency & locking | Seeing deadlocks or migration issues |
| `monitor-*` | pg_stat diagnostics | Investigating slow queries or high load |
| `ext-*` | Extensions (pgvector, pg_cron, pg_net, pgmq) | Using Postgres extensions |

## Quick routing

- **Slow query** → [query-indexes.md](rules/query-indexes.md), [query-rls-performance.md](rules/query-rls-performance.md), [monitor-pg-stat.md](rules/monitor-pg-stat.md)
- **Connection errors / pooling** → [conn-pooling.md](rules/conn-pooling.md), [conn-client-config.md](rules/conn-client-config.md)
- **RLS / security** → [security-rls-patterns.md](rules/security-rls-patterns.md), [security-auth-uid.md](rules/security-auth-uid.md), [security-service-key.md](rules/security-service-key.md)
- **Schema / migrations** → [schema-conventions.md](rules/schema-conventions.md), [schema-indexes.md](rules/schema-indexes.md), [lock-migrations.md](rules/lock-migrations.md)
- **Vector search** → [ext-pgvector.md](rules/ext-pgvector.md)
- **Scheduled jobs** → [ext-pg-cron.md](rules/ext-pg-cron.md)
- **HTTP from Postgres** → [ext-pg-net.md](rules/ext-pg-net.md)
- **Message queues** → [ext-pgmq.md](rules/ext-pgmq.md)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [drubleat](https://github.com/drubleat)
- **Source:** [drubleat/mobile-stack-skills](https://github.com/drubleat/mobile-stack-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-drubleat-mobile-stack-skills-supabase-postgres-best-practices
- Seller: https://agentstack.voostack.com/s/drubleat
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
