Skip to content
Agentmart
Submit a tool

postgres

Postgres and Supabase.

Skill by ronnnerr

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ronnnerr-postgres

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Postgres and Supabase. Use when writing SQL, migrations, row level security, or indexes, and when diagnosing a slow query.

Use cases: backend, security, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/postgres

What's inside

Skill name
postgres
Description
Postgres and Supabase. Use when writing SQL, migrations, row level security, or indexes, and when diagnosing a slow query.
License
MIT
Instructions
49 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# postgres

Use this for Postgres and Supabase. A local SQLite app is a different problem, do not apply this file to it.

## Critical

**Queries**
- Index what you filter and join on. If `EXPLAIN` says Seq Scan on a hot path, fix it.
- Select the columns you need. No `select *` in app queries.
- Pagination with a stable key (`id` / `(created_at, id)`), not giant `OFFSET`.
- Don't wrap indexed columns in functions (`where lower(email) =` without an expression index).

**Connections**
- App traffic through the pooler. Don't open a new client per request.
- Serverless: transaction mode. Session features (prepared statements, advisory locks) need session mode or a sticky connection.
- Time out idle transactions. They hold locks and eat the pool.

**Security / RLS**
- RLS on every table that a client can touch. Default deny.
- Policies must be indexed or they become seq scans per row.
- Test as two users. "It works in the SQL editor as postgres" is not a test.
- Service role bypasses RLS. Never expose it to the browser.

## High

**Schema**
- `uuid` or `bigint` PKs. Don't use sequential ints if the client can see them and enumerate.
- `timestamptz`, not `timestamp`.
- `text` + check, not `varchar(255)` theater.
- Foreign keys. Soft deletes need an index on `(deleted_at)` or a partial `where deleted_at is null`.

**Locks**
- Short transactions. No HTTP inside a transaction.
- Add columns as nullable first. Backfill. Then constrain.
- `create index concurrently` on live tables.

## Operator overlays

- One product's data does not belong in another product's database. Project isolation is a schema decision.
- Migrations live in the repo and run in CI. Don't "just fix prod."
- After a policy change, prove it with two roles. Then `verify`.

## Don't

- Enable Realtime on a table to debug. You'll leak rows.
- Store secrets in Postgres. That's what the vault / env is for.
- Invent RLS that "should" work. Run it.

From ronnnerr/norstack, MIT.

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Aug 28, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ronnnerr

Cite this page

postgres skill. Agent Mart. https://agentmart.dev/skills/ronnnerr-postgres (last updated 2026-10-24)