# Supabase Rls Policy Designer

> Use when a Supabase app needs Row Level Security policies for multi-tenant access, ownership checks, roles, service paths, or safe data exposure. Trigger on requests to design or review Supabase RLS and SQL authorization logic.

- Skill: `saranskumar/supabase-rls-policy-designer` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds add saranskumar/supabase-rls-policy-designer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/saranskumar/supabase-rls-policy-designer/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: saranskumar (https://skillmd.com/u/saranskumar)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/saranskumar/supabase-rls-policy-designer

---


# Goal
Design RLS policies that make data access safe, explainable, and testable.

# When to Use
- Tables are known and access rules must be enforced.
- A Supabase feature involves user-owned or workspace-owned data.
- Existing policies are confusing or unsafe.

# Instructions
1. Identify the actor, table, action, and ownership rule.
2. Map policies for `select`, `insert`, `update`, and `delete` separately.
3. Prefer membership and ownership checks over ad hoc role strings.
4. Call out service-role-only paths and backend bypass rules.
5. Use `references/rls-patterns.md` for common patterns and `examples/` for shape.

# Constraints
- Never rely on the frontend as the only access control layer.
- Do not write one giant permissive policy for all cases.
- Keep policy assumptions explicit and tied to schema.

# Output Format
- Access model summary
- Policy matrix
- SQL policy drafts
- Edge cases and tests

# Examples
- "Design RLS for workspace members and admins."
- "Review these Supabase policies for unsafe access."

