supabase-database-ops

Enforce publication_id filtering on tenant-scoped Supabase tables.

1|Updated Oct 13, 2025
One-click install
npx skills add https://github.com/Venture-Formations/aiprodaily --skill supabase-database-ops
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase-database-ops
Source: https://github.com/Venture-Formations/aiprodaily/tree/main/.claude/skills/supabase-database-ops
Command: npx skills add https://github.com/Venture-Formations/aiprodaily --skill supabase-database-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Multi-tenant data leakage and unsafe database access are critical risks in Supabase-powered apps. This guardrail enforces publication_id filtering on tenant-scoped tables and ensures the safe, server-side use of supabaseAdmin to prevent cross-tenant data exposure.

Core Features & Use Cases

  • Always filter by publication_id on tenant-scoped tables (e.g., newsletter_campaigns, articles, rss_posts, post_ratings, rss_feeds).
  • Use supabaseAdmin only in server-side contexts (API routes, server actions, background jobs) to protect credentials and enforce security boundaries.
  • Enforce best practices such as avoiding SELECT * and implementing robust error handling to maintain auditable, reliable data access across multi-tenant workflows.

Quick Start

Apply this guardrail in your server-side database code to ensure every query filters by publication_id and uses supabaseAdmin for tenant data access.

Frequently Asked Questions about supabase-database-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent cross-tenant data leakage in a multi-tenant Supabase database?▼

To prevent cross-tenant data leakage in a multi-tenant Supabase database, enforce strict publication_id filtering on tenant-scoped tables during server-side operations to ensure queries only access authorized tenant data.

What is the safest way to use supabaseAdmin for backend data access?▼

The safest way to use supabaseAdmin for backend data access is restricting it exclusively to server-side contexts like API routes, server actions, and background jobs to protect credentials and enforce strict security boundaries.

How to filter multi-tenant Supabase queries by publication_id in server actions?▼

To filter multi-tenant Supabase queries by publication_id in server actions, explicitly apply publication_id filtering clauses to all tenant-scoped tables like newsletter_campaigns and articles, ensuring secure server-side data retrieval.

Why should I avoid SELECT * when querying tenant-scoped tables in Supabase?▼

You should avoid SELECT * when querying tenant-scoped tables in Supabase to maintain auditable and reliable data access, enforcing strict publication_id filtering and robust error handling instead of retrieving unneeded columns.

Does this multi-tenant Supabase guardrail work with background jobs and API routes?▼

Yes, this multi-tenant Supabase guardrail works with background jobs and API routes by enforcing secure server-side access patterns and publication_id filtering across all backend operations using supabaseAdmin.

What are the limitations of using supabaseAdmin for multi-tenant data access?▼

A key limitation of using supabaseAdmin for multi-tenant data access is that it bypasses row-level security, requiring manual publication_id enforcement on tenant-scoped tables like rss_posts and post_ratings to prevent data exposure.