Skip to content
Agentmart
Submit a tool

postgres-review

Postgres schema, RLS, indexing and SQL review rules.

Skill by vancourse

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/vancourse-postgres-review

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 schema, RLS, indexing and SQL review rules. Load the rule file for the task at hand.

Use cases: backend, productivity

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-review

What's inside

Skill name
postgres-review
Description
Postgres schema, RLS, indexing and SQL review rules. Load the rule file for the task at hand.
License
MIT
Instructions
65 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • schema-design.md · rules/

SKILL.md (first lines)

# Postgres Review Rules

Generic, cross-project PostgreSQL rules. Read only the rule file(s) matching
the current task — do not load all of them.

This skill covers **Postgres-internal** concerns, starting with schema design.
Indexing, migrations, transactions + locking, and observability are planned
rule files (see 'Coming next' below). For **RLS and multi-tenant isolation**,
invoke `rails:multi-tenancy` directly. For **ORM / Python-side** concerns
(N+1, connection pooling, cache deduplication, idempotency tests, pagination),
load `rails:python-review/rules/db-and-sql.md` instead. The skills are designed
to be loaded together when a change crosses the boundary.

## Routing table

| Task touches...                                                                                                              | Read                                              |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| Column data types, constraints, generated columns, JSONB strategy, primary keys, composite-UNIQUE-as-FK-enforcer pattern   | `rules/schema-design.md`                          |
| **Multi-tenant isolation** (Postgres RLS policies, schema-per-tenant, DB-per-tenant, app-layer filtering, tenant-context propagation, cross-tenant FK enforcement) | invoke **`rails:multi-tenancy`**                   |
| **PR-time security audit** (secrets / authn+authz / input val + output enc / dep vuln + supply chain / audit log)          | invoke **`rails:security-review`**                 |
| **Design-phase threat modeling** (STRIDE against the feature's attack surface)                                             | invoke **`rails:threat-model`**                    |
| **Architecture-level persistence + tenancy decision** (which role model, which RLS strategy, which migration tool)         | invoke **`rails:architecture-design`** Pass 2      |

## Coming next (planned)

The skill is being expanded incrementally. Planned rule files, with the
topics they will cover:

- `rules/indexing.md` — B-tree / GIN / GiST / BRIN / partial / covering index choice, `EXPLAIN (ANALYZE, BUFFERS)` reading, join + CTE strategy.
- `rules/migrations.md` — migration ordering, expand/contract, online DDL, backfill discipline, idempotent SQL.
- `rules/transactions-locking.md` — isolation levels, advisory locks, `FOR UPDATE SKIP LOCKED`, deadlock patterns, statement timeouts.
- `rules/observability.md` — `pg_stat_statements`, `auto_explain`, slow-query log, vacuum + autovacuum tuning.

Until those land, defer to `rails:python-review/rules/db-and-sql.md` for the
Python-side patterns that touch the same topics (pagination, N+1, pooling),
and to `rails:architecture-design` Pass 2 for foundational decisions.

## When this fires

Currently (`rules/schema-design.md` is the only rule file today):
- Designing or reviewing a new table / column / constraint / index
- Writing hand-rolled SQL beyond ORM convenience methods

Planned (once additional rule files land):
- Authoring or reviewing a migration → `rules/migrations.md`
- Investigating a slow query, deadlock, or vacuum issue → `rules/observability.md`, `rules/transactions-locking.md`

For RLS and multi-tenant isolation, invoke **`rails:multi-tenancy`** directly.

## When this does NOT fire

- `session.query(Foo).filter_by(...)` and similar ORM helpers — load
  `rails:python-review/rules/db-and-sql.md` instead.
- Routine CRUD the ORM handles trivially.

## Project-specific overlays

Project-specific Postgres rules — tenant role names, GUC names, the canonical
session helper, the explicit RLS-protected table list, the composite-FK
patterns that are load-bearing in *your* schema — belong in a per-repo
overlay loaded **in addition** to this skill. Example path:
`.claude/skills/<project>-pre-pr-check/rules/postgres-specifics.md`
(see your project's pre-PR skill).

From vancourse/apex, MIT.

Signals

Stars
1
Forks
1
Open issues
9
Last commit (this folder)
Oct 6, 2026 (23 days ago)
Last release
Aug 13, 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 vancourse

Cite this page

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