Supabase Gen for Openclaw

A specialized tool that parses Prisma schema files to automatically generate comprehensive Supabase Row-Level Security (RLS) policies.

lxgicstudios
v1.0.0
Jan 29, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install supabase-gen

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install supabase-gen using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Supabase Gen?

Supabase Gen is designed to eliminate the manual effort and potential for error when writing Row-Level Security policies. By analyzing your Prisma schema, it understands the underlying data models and relationships to create secure defaults that align with your application logic. This skill is a powerful asset for developers using Openclaw Skills who want to ensure their database is protected by robust, production-ready SQL policies without spending hours on syntax.

The tool bridges the gap between your ORM definitions and database security. It generates policies for SELECT, INSERT, UPDATE, and DELETE actions, ensuring that user-owned resources and multi-tenant data structures are correctly scoped. By integrating this into your Openclaw Skills workflow, you can maintain a high level of security while accelerating your development lifecycle.

Supabase Gen Use Cases

  • Deploying a new Supabase backend while keeping your existing Prisma-based data definitions.
  • Retrofitting Row-Level Security onto existing tables that currently lack protection.
  • Conducting security audits by generating and comparing fresh RLS policies against your current implementation.
  • Rapidly prototyping multi-tenant applications where organizational scoping is required.

How Supabase Gen Works

  1. The skill reads your Prisma schema file to identify models, field types, and relational links.
  2. It interprets ownership patterns, such as identifying which fields represent user IDs or organization memberships.
  3. AI logic is applied to generate specific SQL policies using Supabase-specific functions like auth.uid().
  4. The resulting SQL is output to the console or saved to a migration file for execution in the Supabase SQL editor.

Supabase Gen Setup

This skill requires Node.js 18+ and an OpenAI API key to process the schema intelligently. You can run it directly using npx without a permanent installation.

# Configure your environment
export OPENAI_API_KEY=sk-your-key-here

# Generate policies from your schema
npx ai-supabase-gen prisma/schema.prisma

# Save output to a migration file
npx ai-supabase-gen prisma/schema.prisma > supabase/migrations/rls_setup.sql

Supabase Gen Data Schema & Taxonomy

Element Description
Input Source Standard Prisma (.prisma) schema file
Output Format SQL migration script with CREATE POLICY statements
Security Logic Implements auth.uid() checks for granular row access
Operations Covers SELECT, INSERT, UPDATE, and DELETE policies

Supabase Gen Advanced Features

  • Intelligent multi-tenant scoping for complex organizational data models.
  • Direct integration with Supabase migration workflows for automated security updates.
  • Support for custom output formatting to match your project's SQL standards.
  • High-fidelity policy generation that handles relational edge cases within the Openclaw Skills ecosystem.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*