Browse 354 rules, 42 knowledge articles, and 28 prompt templates across security, performance, architecture, and quality.
81 rules matching filters
Run EXPLAIN on slow or important queries to confirm indexes are used and scans are bounded.
BeforeMerge scans your pull requests against these rules automatically. Get actionable feedback before code ships to production.
Choose an isolation level (e.g. READ COMMITTED) that matches your concurrency and consistency needs.
Add indexes on columns that appear in join conditions, filters, and sort clauses.
Avoid wrapping indexed columns in functions so the optimizer can use the index.
Compare columns against values of the same type to avoid silent casts that disable indexes.
Configure statement_timeout and idle_in_transaction_session_timeout so stuck queries and orphaned transactions are killed automatically.
Track connection count against max_connections and capture slow queries (e.g. via pg_stat_statements) with alerting thresholds.
Match instance class and storage to actual load, and alert on CPU, IOPS, and free-storage thresholds before they are hit.
Set a lock_timeout, split steps, and add columns nullable-then-backfill to keep migration locks short.
Add FK and CHECK constraints as NOT VALID, then VALIDATE CONSTRAINT separately to avoid a long blocking scan.
Index only the rows or computed expressions your queries actually filter on to cut index size and speed lookups.
Tune autovacuum per-table on high-churn tables so dead tuples and bloat don't degrade performance.
Store JSON documents as jsonb to get binary storage, indexing, and efficient operators.
Inspect the query plan with EXPLAIN ANALYZE to find sequential scans and missing indexes.
Fetch related data with a join or a single batched query instead of one query per row.
Reuse database connections through a pool instead of opening a new connection per request.
Paginate with a WHERE filter on the last seen key rather than OFFSET on deep pages.
Load analytics, chat, and third-party scripts with defer/async so they never block rendering.
Warm up DNS/TLS for required cross-origin hosts early with preconnect or dns-prefetch.
Serve hashed assets with long-lived immutable cache headers and enable Brotli/gzip compression.
Dynamically import below-the-fold and rarely-used components so the initial bundle stays small.
Self-host fonts, preload critical ones, and use font-display: swap to avoid invisible or shifting text.
Use the framework Image component with srcset and AVIF/WebP so each device downloads an appropriately sized, well-compressed image.
Break up long tasks and minimize hydration so the page responds quickly to clicks and taps.