Files
supabase-postgres-best-prac…/GETTING_STARTED.md
Pedro Rodrigues 0a543e1b4a Initial setup: PostgreSQL best practices repository
Skeleton structure for Supabase PostgreSQL experts to add performance
optimization rules. Modeled after Vercel's react-best-practices-build.

Includes:
- Build system (parser, validator, builder)
- Skill manifest and metadata
- Rule templates and writing guidelines
- CI workflow for validation
- Getting started guide for Postgres team

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:52:32 +07:00

1.8 KiB

Getting Started - Postgres Team

Quick guide to start adding PostgreSQL best practice rules.

Setup

cd packages/postgresql-best-practices-build
npm install

Add a Rule

  1. Copy template:

    cp skills/postgresql-best-practices/rules/_template.md \
       skills/postgresql-best-practices/rules/query-your-rule.md
    
  2. Edit the file with your rule content

  3. Validate & build:

    cd packages/postgresql-best-practices-build
    npm run validate
    npm run build
    
  4. Check skills/postgresql-best-practices/AGENTS.md for output

File Prefixes → Sections

Prefix Section
query- 1. Query Performance (CRITICAL)
conn- 2. Connection Management (CRITICAL)
schema- 3. Schema Design (HIGH)
lock- 4. Concurrency & Locking (MEDIUM-HIGH)
security- 5. Security & RLS (MEDIUM-HIGH)
data- 6. Data Access Patterns (MEDIUM)
monitor- 7. Monitoring & Diagnostics (LOW-MEDIUM)
advanced- 8. Advanced Features (LOW)

Rule Structure

---
title: Action-Oriented Title
impact: CRITICAL|HIGH|MEDIUM-HIGH|MEDIUM|LOW-MEDIUM|LOW
impactDescription: 10x faster queries
tags: indexes, performance
---

## Title

Brief explanation.

**Incorrect (why it's bad):**
```sql
-- Bad pattern

Correct (why it's better):

-- Good pattern

Supabase Note: Optional platform guidance.

Reference: Link


## Key Files

| File | Purpose |
|------|---------|
| `rules/_template.md` | Copy this to create new rules |
| `rules/_contributing.md` | Writing guidelines |
| `rules/_sections.md` | Section definitions (editable) |
| `AGENTS.md` | Generated output (don't edit directly) |

## Questions?

- Writing guidelines: `rules/_contributing.md`
- Full contributor guide: `skills/postgresql-best-practices/README.md`