Supabase Integration

Pro v1.0.0

Manage Supabase projects, databases, migrations, and deployments via the official CLI

Requires Claude Code CLI

This skill integrates with Supabase through Claude Code. Install Claude Code and add this skill to use it.

Available Actions

Initialize Local Project

Create a new Supabase project configuration in the current directory

Try saying...

  • "Initialize a new Supabase project here"
  • "Set up Supabase in this directory"
  • "Create Supabase config files"

Start Local Development Stack

Launch the complete Supabase platform locally including PostgreSQL, Auth, Storage, Edge Functions, and Realtime

Try saying...

  • "Start the local Supabase services"
  • "Run Supabase locally"
  • "Launch the development environment"

Stop Local Stack

Stop the local Supabase services without resetting the database

Try saying...

  • "Stop Supabase services"
  • "Shut down the local stack"

Link to Remote Project

Connect your local project to a hosted Supabase project

Parameters

Name Type Required Description
project-ref string Required Your Supabase project reference ID

Try saying...

  • "Link this to my production Supabase project"
  • "Connect to my remote Supabase database"

Create Migration

Generate a new timestamped migration file for tracking database schema changes

Parameters

Name Type Required Description
migration-name string Required Descriptive name for the migration

Try saying...

  • "Create a new migration called add_users_table"
  • "Make a migration for the new schema changes"

Generate Schema Diff

Automatically create a migration from changes already applied to your local database

Parameters

Name Type Required Description
schema-name string Required Database schema to diff (typically 'public')

Try saying...

  • "Generate a migration from my local database changes"
  • "Create a diff of the public schema"
  • "Show me the SQL diff for my schema"

Apply Migrations Locally

Reset local database and apply all migrations from scratch

Try saying...

  • "Reset the local database and run all migrations"
  • "Apply all migrations to the local database"
  • "Rebuild the local database from migrations"

Push Migrations to Remote

Deploy local migrations to your remote Supabase project

Try saying...

  • "Push migrations to production"
  • "Deploy database changes to the remote project"
  • "Apply local migrations to the hosted database"

Pull Remote Schema

Capture the current state of your remote database as a local migration

Try saying...

  • "Pull the production database schema"
  • "Sync remote database to local migrations"
  • "Download current schema from production"

Dump Database

Export database schema and/or data to SQL file

Parameters

Name Type Required Description
filename string Required Output filename for the dump

Try saying...

  • "Export the database to backup.sql"
  • "Dump the database schema"
  • "Create a SQL backup of the database"

Generate TypeScript Types

Create TypeScript type definitions from your database schema

Try saying...

  • "Generate TypeScript types for my database"
  • "Create type definitions from the schema"
  • "Generate database types"

Deploy Edge Function

Deploy Deno edge functions to your Supabase project

Parameters

Name Type Required Description
function-name string Required Name of the edge function to deploy

Try saying...

  • "Deploy the hello-world function"
  • "Push my edge function to production"
  • "Deploy all edge functions"

Manage Secrets

Set environment variables/secrets for edge functions

Parameters

Name Type Required Description
KEY string Required Environment variable name
value string Required Secret value

Try saying...

  • "Set the STRIPE_KEY secret"
  • "Add an environment variable for my edge functions"
  • "Configure the API_KEY secret"

View Status

Check the status of local and/or remote Supabase services

Try saying...

  • "Show me the status of Supabase services"
  • "Check if the local stack is running"
  • "Display project status"

Getting Started

CLI Authentication Easy Setup
  1. 1 Install the CLI: brew install supabase/tap/supabase
  2. 2 Run: supabase login
  3. 3 Follow the browser prompts to authenticate with your Supabase account
  4. 4 Access token is stored automatically in native credentials storage

Verify Setup

supabase --version

Success: Version number displayed (e.g., 1.x.x)

Security & Access

Access Scope

Full access to linked Supabase projects including database, auth, storage, and edge functions. Local development keys have complete access to local database.

  • Access tokens grant full control over your Supabase projects - store securely
  • Service role keys bypass Row Level Security - never expose in client code
  • Database passwords provide direct PostgreSQL access - use strong passwords
  • Local development service_role key has full database access
  • Always test migrations locally before pushing to production
  • Personal access tokens should be created with minimal required scopes
  • In CI/CD, use scoped tokens and rotate regularly

Limitations

  • Local development requires Docker to be running
  • Some commands require project to be linked first (push, pull, etc.)
  • Node.js 20+ required when running via npx/npm
  • Migration file names must follow YYYYMMDDHHmmss_description.sql format

Get This Skill

Requires Pro subscription ($9/month)

Quick Reference

Type
CLI
Auth
CLI Authentication
Setup
Easy Setup
Tools Required
Bash
CLI Dependencies
supabase docker

Have Feedback?

Help us improve this skill by sharing your ideas and suggestions.

Request Improvements