Skip to content

jacob-balslev/skill-graph / examples/projects/saas-stripe-postgres/skills/postgres-rls-pattern

postgres-rls-pattern

Verified

Use when writing or reviewing Postgres queries in a multi-tenant SaaS where every table row must be scoped to a single organization. Enforces the FORCE ROW LEVEL SECURITY + USING + WITH CHECK triple on every tenant-bound table, and wraps application queries in an `orgQuery(orgId)` helper that sets `app.current_org_id` before each statement. Do NOT use for cross-org system queries such as billing cron jobs or admin panels (those bypass RLS intentionally via the service role); use a service-role query wrapper instead.

FileKindSize
SKILL.mdskill md10.4 KB
audit-state.jsonconfig349 B

audit-state.json

View on GitHub
{
  "schema_version": 8,
  "version": "0.1.0",
  "owner": "saas-stripe-postgres-example",
  "freshness": "2026-05-18",
  "drift_check": {
    "last_verified": "2026-05-18"
  },
  "eval_artifacts": "none",
  "eval_state": "unverified",
  "routing_eval": "absent",
  "lifecycle": {
    "stale_after_days": 180,
    "review_cadence": "quarterly"
  }
}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall