Agent skill

Supabase Local Dev Loop

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Configure Supabase local development with the CLI, Docker, and migration workflow.

MITAuto-check: notesDevOps & Cloud

Install Supabase Local Dev Loop

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill supabase-local-dev-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace supabase-local-dev-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/supabase-local-dev-loop .claude/skills/supabase-local-dev-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
supabase-local-dev-loop
GitHub stars
2.8k
Token cost
~2.3k tokens
SKILL.md length
428 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Configure Supabase local development with the CLI, Docker, and migration workflow.

  • Works in 3 steps: Initialize Project and Start Local Stack → Create Migrations and Seed Data → Iterate with Diff-Based Migrations
  • Initializing a Supabase project locally
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Calls npx, supabase and npm; needs SUPABASE_ANON_KEY and SUPABASE_SERVICE_ROLE_KEY

What it does

Supabase Local Dev Loop is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Supabase local development with the CLI, Docker, and migration workflow. Use when initializing a Supabase project locally, starting the local stack, writing migrations, seeding data, or iterating on schema changes. Trigger with phrases like "supabase local dev", "supabase start", "supabase init", "supabase db reset", "supabase local setup".

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering Containers. It works with Supabase and Docker. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Initializing a Supabase project locally
  • Starting the local stack
  • Writing migrations
  • Iterating on schema changes

Example prompts

  • “supabase local dev”
  • “supabase start”
  • “supabase init”
  • “/supabase-local-dev-loop”

Requirements

  • Node.js
  • Docker
  • A credential in SUPABASE_ANON_KEY
  • A credential in SUPABASE_SERVICE_ROLE_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npx:*), Bash(supabase:*), Bash(docker:*), Bash(curl:*), Grep

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Initialize Project and Start Local Stack
  2. Create Migrations and Seed Data
  3. Iterate with Diff-Based Migrations

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npx:*)
    • Bash(supabase:*)
    • Bash(docker:*)
    • Bash(curl:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • supabase
    • npm
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • supabase.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SUPABASE_ANON_KEY
    • SUPABASE_SERVICE_ROLE_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Supabase Local Dev Loop loads about 2.3k tokens when it runs, and up to ~2.9k if it reads all its reference files. Until then it costs about 94 tokens; SKILL.md has 428 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:77
    Create `.env.local` from these values (git-ignored):
  • NoteMentions a .env fileSKILL.md:80
    # .env.local
  • NoteMentions a .env fileSKILL.md:221
    - `.env.local` with local connection credentials
  • NoteRuns commands with sudoSKILL.md:230
    rmissions | Add user to `docker` group: `sudo usermod -aG docker $USER` |
  • NoteMentions a .env fileSKILL.md:297
    npx supabase functions serve --env-file .env.local

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 428 words, ~2,342 tokens.

Download SKILL.mdSave it as .claude/skills/supabase-local-dev-loop/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
supabase-local-dev-loop
description
Configure Supabase local development with the CLI, Docker, and migration workflow. Use when initializing a Supabase project locally, starting the local stack, writing migrations, seeding data, or iterating on schema changes. Trigger with phrases like "supabase local dev", "supabase start", "supabase init", "supabase db reset", "supabase local setup".
allowed-tools
Read, Write, Edit, Bash(npx:*), Bash(supabase:*), Bash(docker:*), Bash(curl:*), Grep
compatibility
Designed for Claude Code
version
1.54.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, supabase, local-development, docker, postgres

Supabase Local Dev Loop

Overview

Run the full Supabase stack locally — Postgres, Auth, Storage, Realtime, Edge Functions, and Studio — using Docker and the Supabase CLI. Local development mirrors production APIs exactly, enabling offline work, fast iteration, and repeatable migration workflows. Schema changes flow through supabase db diff to generate migrations, and supabase db reset replays them cleanly.

Prerequisites

  • Docker Desktop installed and running (required for all local services)
  • Node.js 18+ (for npx supabase commands)
  • No global install needed — all commands use npx supabase

Instructions

Step 1: Initialize Project and Start Local Stack
bash
# Initialize Supabase in your project root
npx supabase init

This creates a supabase/ directory:

supabase/
├── config.toml          # Local stack configuration (ports, auth settings)
├── migrations/          # SQL migration files (version-controlled)
└── seed.sql             # Seed data (runs after migrations on db reset)

Start the local stack (first run pulls Docker images — takes a few minutes):

bash
npx supabase start

The CLI prints all local endpoints and keys:

API URL:          http://localhost:54321
GraphQL URL:      http://localhost:54321/graphql/v1
S3 Storage URL:   http://localhost:54321/storage/v1/s3
DB URL:           postgresql://postgres:postgres@localhost:54322/postgres
Studio URL:       http://localhost:54323
Inbucket URL:     http://localhost:54324
anon key:         eyJhbGciOiJI...
service_role key: eyJhbGciOiJI...

Create .env.local from these values (git-ignored):

text
# .env.local
SUPABASE_URL=http://localhost:54321
SUPABASE_ANON_KEY=<anon-key-from-supabase-start>
SUPABASE_SERVICE_ROLE_KEY=<service-role-key-from-supabase-start>
DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres

Verify the stack is running:

bash
npx supabase status
Step 2: Create Migrations and Seed Data

Create a migration file with a descriptive name:

bash
npx supabase migration new create_profiles
# Creates: supabase/migrations/<timestamp>_create_profiles.sql

Write the migration SQL:

sql
-- supabase/migrations/<timestamp>_create_profiles.sql
create table public.profiles (
  id uuid references auth.users(id) primary key,
  username text unique not null,
  avatar_url text,
  created_at timestamptz default now(),
  updated_at timestamptz default now()
);

-- Always enable RLS on public tables
alter table public.profiles enable row level security;

create policy "Public profiles are viewable by everyone"
  on public.profiles for select
  using (true);

create policy "Users can update own profile"
  on public.profiles for update
  using (auth.uid() = id);

-- Auto-create profile on signup via trigger
create or replace function public.handle_new_user()
returns trigger as $$
begin
  insert into public.profiles (id, username)
  values (new.id, new.raw_user_meta_data->>'username');
  return new;
end;
$$ language plpgsql security definer;

create trigger on_auth_user_created
  after insert on auth.users
  for each row execute procedure public.handle_new_user();

Add seed data for local development:

sql
-- supabase/seed.sql (runs automatically after migrations on db reset)
insert into auth.users (id, email, raw_user_meta_data)
values
  ('a1b2c3d4-e5f6-7890-abcd-ef1234567890', 'alice@example.com',
   '{"username": "alice"}'),
  ('b2c3d4e5-f6a7-8901-bcde-f12345678901', 'bob@example.com',
   '{"username": "bob"}');

Apply migrations and seed data in one command:

bash
npx supabase db reset
# Drops the database, replays all migrations, runs seed.sql
Step 3: Iterate with Diff-Based Migrations

The core iteration loop: make changes in Studio, diff them into migration files, then verify with a clean reset.

Open Studio at http://localhost:54323 and make schema changes interactively (add columns, create tables, modify RLS policies). Then capture those changes as a migration:

bash
# Generate a migration from the diff between migrations and current DB state
npx supabase db diff -f add_bio_to_profiles

# Review the generated file
cat supabase/migrations/*_add_bio_to_profiles.sql

The generated migration captures exactly what changed:

sql
-- Auto-generated by supabase db diff
alter table public.profiles add column bio text;

Verify the full migration chain replays cleanly:

bash
npx supabase db reset
# Success = all migrations + seed apply without errors

Push verified migrations to a remote Supabase project:

text
# Link to remote project first (one-time)
npx supabase link --project-ref <your-project-ref>

# Push migrations to remote
npx supabase db push

Daily workflow summary:

bash
# Start of day
npx supabase start

# After schema changes in Studio
npx supabase db diff -f descriptive_name
npx supabase db reset          # Verify clean replay

# Before committing
npx supabase db reset          # Final verification
npm test                       # Run tests against local instance

# End of day
npx supabase stop

Output

  • Local Supabase stack running all services via Docker (Postgres, Auth, Storage, Realtime, Studio)
  • Version-controlled migration files in supabase/migrations/
  • Seed data for repeatable local state
  • Diff-based migration workflow for safe schema iteration
  • .env.local with local connection credentials
Show full SKILL.md (156 more words)Show less

Error Handling

ErrorCauseSolution
Cannot connect to Docker daemonDocker not runningStart Docker Desktop, then retry npx supabase start
Port 54321 already in usePrevious instance still runningRun npx supabase stop then npx supabase start
supabase db reset failsSyntax error in migration SQLCheck the failing migration file, fix SQL, re-run reset
Permission denied on startDocker socket permissionsAdd user to docker group: sudo usermod -aG docker $USER
supabase db diff emptyNo schema changes detectedVerify changes were made in the local DB, not just Studio UI cache
relation "auth.users" does not existRunning migration outside SupabaseAuth schema only exists in the Supabase-managed Postgres instance

Examples

Connect from Application Code
typescript
import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  process.env.SUPABASE_URL!,       // http://localhost:54321 locally
  process.env.SUPABASE_ANON_KEY!   // Local anon key from supabase start
)

// Fetch profiles — works identically in local and production
const { data, error } = await supabase
  .from('profiles')
  .select('username, avatar_url')
  .limit(10)
Test Against Local Instance with Vitest
typescript
import { createClient } from '@supabase/supabase-js'
import { describe, it, expect, beforeAll } from 'vitest'

const supabase = createClient(
  'http://localhost:54321',
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'  // Local anon key
)

describe('profiles', () => {
  beforeAll(async () => {
    // Seed data is already loaded via supabase db reset
  })

  it('fetches public profiles', async () => {
    const { data, error } = await supabase
      .from('profiles')
      .select('username')
      .limit(1)

    expect(error).toBeNull()
    expect(data).toHaveLength(1)
    expect(data![0].username).toBeDefined()
  })

  it('enforces RLS on update', async () => {
    // Anon users cannot update profiles (no auth.uid())
    const { error } = await supabase
      .from('profiles')
      .update({ username: 'hacker' })
      .eq('username', 'alice')

    expect(error).not.toBeNull()
  })
})
Edge Function Local Development
bash
# Create and serve an Edge Function with hot reload
npx supabase functions new hello-world
npx supabase functions serve --env-file .env.local

# Test it
curl -X POST http://localhost:54321/functions/v1/hello-world \
  -H "Authorization: Bearer $SUPABASE_ANON_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "World"}'

Resources

Next Steps

Proceed to supabase-sdk-patterns for production-ready client initialization, typed queries, and real-time subscriptions.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/supabase-local-dev-loop of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Supabase Local Dev Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Supabase Local Dev Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Supabase Local Dev Loop this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: NotesMIT
Postgres Adoptgarrytan/gbrain31k—~2.1kAutomated safety check: PassMIT
Supabasemagnus919/agent-skills113—~2.2kAutomated safety check: PassMIT
Test The Docssupabase/supabase111k—~1.3kAutomated safety check: PassApache-2.0
Crabbox Quickstartopenclaw/crabbox1.5k—~1.6kAutomated safety check: NotesMIT
Build Imageskubernetes-sigs/cloud-provider-azure294—~1.7kAutomated safety check: PassApache-2.0

Similar skills

  • Postgres Adopt

    garrytan/gbrain

    Detect which gbrain engine is in use (PGLite vs Postgres), prefer Postgres for agent-harness installs, install/provision Postgres (Supabase discovery via SUPABASEACCESSTOKEN, local Postgres, opt-in…

    31k GitHub stars~2.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Supabase

    magnus919/agent-skills

    A skill your agent uses when developing applications with Supabase, running the Supabase CLI, designing migrations and RLS policies, testing database behavior, generating client types, deploying the…

    113 GitHub stars~2.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Test The Docs

    supabase/supabase

    Official

    Execute runnable docs snippets and examples inside a disposable Docker Compose sandbox (runner container + local Supabase stack via supabase start).

    111k GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed
  • Crabbox Quickstart

    openclaw/crabbox

    Gets you running your repository's tests in a disposable Docker or Podman container on your own machine with Crabbox, with no account and no cloud spend.

    1.5k GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Build Images

    kubernetes-sigs/cloud-provider-azure

    Official

    Build cloud-provider-azure container images through the repo Makefile with explicit IMAGETAG and IMAGEREGISTRY inputs, optional make flag overrides, and opt-in bounded Docker or Podman retries.

    294 GitHub stars~1.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Cb Build Test

    BlkLeg/CircuitBreaker

    How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…

    201 GitHub stars~1.9k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Works with

Questions about Supabase Local Dev Loop

What does Supabase Local Dev Loop do?

Configure Supabase local development with the CLI, Docker, and migration workflow. Supabase Local Dev Loop is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Supabase local development with the CLI, Docker, and migration workflow.

When should I use Supabase Local Dev Loop?

Supabase Local Dev Loop fits situations like: initializing a Supabase project locally; starting the local stack; writing migrations; iterating on schema changes.

How do I install Supabase Local Dev Loop in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill supabase-local-dev-loop -a claude-code`. Or copy the skill folder (skills/.curated/supabase-local-dev-loop in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/supabase-local-dev-loop in your project. Claude Code loads it when a task matches its description.

How do I install Supabase Local Dev Loop in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill supabase-local-dev-loop -a codex`. Or copy the skill folder (skills/.curated/supabase-local-dev-loop in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/supabase-local-dev-loop in your project. Codex loads it when a task matches its description.

Can I use Supabase Local Dev Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill supabase-local-dev-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/supabase-local-dev-loop, .gemini/skills/supabase-local-dev-loop, .github/skills/supabase-local-dev-loop and .opencode/skills/supabase-local-dev-loop in your project.

What does Supabase Local Dev Loop need to run?

Going by SKILL.md and its folder, Supabase Local Dev Loop needs the command-line tools its instructions call (npx, supabase, npm and curl) and credentials named SUPABASE_ANON_KEY and SUPABASE_SERVICE_ROLE_KEY. Our summary lists: Node.js; Docker; A credential in SUPABASE_ANON_KEY; A credential in SUPABASE_SERVICE_ROLE_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npx:*), Bash(supabase:*), Bash(docker:*), Bash(curl:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Supabase Local Dev Loop access the network?

SKILL.md names 1 domain. As links in the text: supabase.com. This is read from the text; nothing was executed.

Is Supabase Local Dev Loop safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Supabase Local Dev Loop use?

Supabase Local Dev Loop is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Supabase Local Dev Loop use?

About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 573 tokens, read only when the agent opens those files.

What are the alternatives to Supabase Local Dev Loop?

Skills that share tags, products or a category with Supabase Local Dev Loop: Postgres Adopt (garrytan/gbrain, 31k stars), Supabase (magnus919/agent-skills, 113 stars), Test The Docs (supabase/supabase, 111k stars) and Crabbox Quickstart (openclaw/crabbox, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Supabase Local Dev Loop?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.