cogine-dev-skillset / supabase-postgres-best-practices
AGENTS.md4 starsChanged 4 months agoApache-2.0View on GitHub
Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design. Reference these guidelines when: - Writing SQL queries or designing schemas - Implementing indexes or query optimization - Reviewing database performance issues - Configuring connection pooling or scaling - Optimizing for Postgres-specific features - Working with Row-Level Security (RLS) Read individual rule files for detailed explanations and SQL examples: Each rule file contains: - Brief…
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Read SKILL.md for the main skill instructions
- Distinctive: line 46
Read individual rule files for detailed explanations and SQL examples:
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Supabase Postgres Best Practices
Structure
supabase-postgres-best-practices/
SKILL.md # Main skill file - read this first
AGENTS.md # This navigation guide
CLAUDE.md # Symlink to AGENTS.md
references/ # Detailed reference filesUsage
- Read
SKILL.mdfor the main skill instructions - Browse
references/for detailed documentation on specific topics - Reference files are loaded on-demand - read only what you need
Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.
When to Apply
Reference these guidelines when:
- Writing SQL queries or designing schemas
- Implementing indexes or query optimization
- Reviewing database performance issues
- Configuring connection pooling or scaling
- Optimizing for Postgres-specific features
- Working with Row-Level Security (RLS)
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
| 1 | Query Performance | CRITICAL | query- |
| 2 | Connection Management | CRITICAL | conn- |
| 3 | Security & RLS | CRITICAL | security- |
| 4 | Schema Design | HIGH | schema- |
| 5 | Concurrency & Locking | MEDIUM-HIGH | lock- |
| 6 | Data Access Patterns | MEDIUM | data- |
| 7 | Monitoring & Diagnostics | LOW-MEDIUM | monitor- |
| 8 | Advanced Features | LOW | advanced- |
How to Use
Read individual rule files for detailed explanations and SQL examples:
references/query-missing-indexes.md
references/query-partial-indexes.md
references/_sections.mdEach rule file contains:
- Brief explanation of why it matters
- Incorrect SQL example with explanation
- Correct SQL example with explanation
- Optional EXPLAIN output or metrics
- Additional context and references
- Supabase-specific notes (when applicable)
References
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository38 other files it gives its agents.
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- skills/supabase-postgres-best-practices/CLAUDE.mdCLAUDE.md
- ai-app-security-auditSkill
- ai-slide-templatesSkill
- backlog-ready-specSkill
- check-compiler-errorsSkill
- clawpackerSkill
- deslopSkill
- devex-reviewSkill
- fix-ciSkill
- fix-merge-conflictsSkill
- founder-office-hoursSkill
- get-cookiesSkill
- get-pr-commentsSkill
- gh-issue-priority-handoffSkill
- image2-with-codexSkill
- investigateSkill
- local-ultra-reviewSkill
- loop-on-ciSkill
- loop-on-pr-review-and-fixSkill
- new-branch-and-prSkill
- npm-release-pipelineSkill
- peer-reviewSkill
- plan-devex-reviewSkill
- planmode-ceoSkill
- planmode-engineerSkill
- qa-onlySkill
- review-and-shipSkill
- run-smoke-testsSkill
- security-best-practicesSkill
- site-design-auditSkill
- site-design-fixSkill
- slow-is-fastSkill
- supabase-postgres-best-practicesSkill
- vercel-react-best-practicesSkill
- xianyu-api-client-skillSkill
- xianyu-automation-skillSkill
- xianyu-product-manager-skillSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

