.github/skills/postgres-best-practices/SKILL.md
Postgres performance optimization and best practices from Supabase, adapted to EquipQR's Supabase (Postgres + RLS) workflow. Use when editing SQL, migrations, indexes, or RLS policies.
npx skillsauth add Columbia-Cloudworks-LLC/EquipQR postgres-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
EquipQR uses Supabase Postgres. When applying these rules in this repo:
supabase/migrations/*.sql (follow our migration standards: timestamped filenames, enable RLS by default, avoid overly complex RLS joins, etc.).service_role only in narrowly scoped, backend-only functions where you (1) validate the JWT, (2) enforce organization_id scoping on every query, and (3) perform explicit permission checks at least as strict as equivalent RLS policies. Never use service_role as a shortcut to bypass RLS.Reference these guidelines when:
| 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- |
Read individual rule files for detailed explanations and SQL examples:
rules/query-missing-indexes.md
rules/schema-partial-indexes.md
rules/_sections.md
Each rule file contains:
For the complete guide with all rules expanded: AGENTS.md
development
React performance optimization guidelines from Vercel Engineering, with EquipQR-specific mappings (Vite + React Router + TanStack Query). Use when writing, reviewing, or refactoring React code in this repo, especially around waterfalls, bundle size, and re-renders.
development
Applies EquipQR's brand colors and design-system tokens to any artifact that should match EquipQR's look-and-feel. Use it when brand colors, style guidelines, visual formatting, or EquipQR design standards apply.
development
Use when auditing dependency health, API contract consistency, shared data shapes, or brittle integration seams between modules, services, and packages.
development
Use when aligning current repository state with roadmap priorities, reconciling GitHub issues or organization project items with what exists in the codebase, or deriving next steps across code, docs, and EquipQR work tracking.