> Supabase Row Level Security
Secure Supabase data with PostgreSQL Row Level Security policies.
fetch
$
curl "https://skillshub.wtf/skillshub-team/catalog-batch5/supabase-rls?format=md"SKILL.md•Supabase Row Level Security
Supabase RLS
Enable RLS
ALTER TABLE posts ENABLE ROW LEVEL SECURITY;
-- Users can only read published posts
CREATE POLICY "Public posts" ON posts FOR SELECT USING (published = true);
-- Users can only edit their own posts
CREATE POLICY "Own posts" ON posts FOR ALL USING (auth.uid() = user_id);
-- Admin can do anything
CREATE POLICY "Admin access" ON posts FOR ALL USING (
EXISTS (SELECT 1 FROM users WHERE id = auth.uid() AND role = 'admin')
);
Common Patterns
- auth.uid() — current user's ID
- auth.jwt() — full JWT claims
- Use WITH CHECK for INSERT/UPDATE validation
- Separate SELECT/INSERT/UPDATE/DELETE policies for fine-grained control
> related_skills --same-repo
> Nix Dev Shells with direnv
Auto-activate reproducible dev environments with Nix flakes and direnv.
> Dagger with GitHub Actions
Run Dagger CI/CD pipelines in GitHub Actions for portable, testable builds.
> Bun + Hono API
Build fast APIs with Bun runtime and Hono framework.
> Deno Fresh Framework
Build full-stack web apps with Fresh on Deno. Islands, routes, and zero runtime overhead.