mirror of
https://github.com/supabase/agent-skills.git
synced 2026-01-26 19:09:51 +08:00
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>
1.8 KiB
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
-
Copy template:
cp skills/postgresql-best-practices/rules/_template.md \ skills/postgresql-best-practices/rules/query-your-rule.md -
Edit the file with your rule content
-
Validate & build:
cd packages/postgresql-best-practices-build npm run validate npm run build -
Check
skills/postgresql-best-practices/AGENTS.mdfor 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`