supabase
БесплатноБез исполняемых скриптовНе проверенSupabase is an open-source backend platform built on Postgres, with auth, realtime, storage and edge functions. Use when someone asks to "set up Supabase"…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Supabase
Overview
This skill helps AI agents build full-stack applications on Supabase: Postgres schema design with Row Level Security (RLS), authentication flows (email, OAuth, magic links), realtime subscriptions, file storage with access policies, and edge functions. Checked against the Supabase docs, CLI 3.0.0 and @supabase/supabase-js 2.119.
Instructions
Step 1: CLI and project setup
Install the CLI per project (npm install -g supabase is not a supported install method) or with Homebrew:
npm install -D supabase # then run it as: npx supabase <command>
brew install supabase/tap/supabase # macOS and Linux alternative
npx supabase init # creates supabase/config.toml
npx supabase start # local stack in Docker; prints local URL and keys
npx supabase login # opens the browser
npx supabase link abcdefghijklmnopqrst # 20-letter project ref from the dashboard URL
CLI v3 changes what a bare command targets: db push, db pull, db dump, migration list, gen types and storage ls act on the local stack unless you pass --remote (the linked project) or --remote=<ref|branch|postgres-url>; --linked, --project-ref and --db-url are deprecated. Commands that change a hosted project (db push --remote, functions deploy, secrets set, config push) ask first, default to No, and fail in CI or agent runs without --yes. SUPABASE_* variables now override config.toml. Rename an old [inbucket] section in config.toml to [local_smtp], or start and db commands fail.
API keys: use the publishable key (sb_publishable_...) in anything you ship and the secret key (sb_secret_...) only on servers and edge functions. The old anon and service_role JWT keys still work but are being deprecated by the end of 2026.
// lib/supabase.ts
import { createClient } from '@supabase/supabase-js';
// Browser client: publishable key, RLS enforced
export const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!
);
// Server-only client: secret key bypasses RLS. Never import this in client code.
export const supabaseAdmin = createClient(
process.env.SUPABASE_URL!,
process.env.SUPABASE_SECRET_KEY!,
{ auth: { persistSession: false } }
);
For server-rendered frameworks (Next.js, SvelteKit, Remix) add @supabase/ssr, which stores the session in cookies. On the server verify the caller with supabase.auth.getClaims() or getUser(), never with getSession() alone.
Step 2: Schema, migrations and RLS
Put every schema change in a migration file, test it locally, then push it:
npx supabase migration new create_profiles_and_projects # supabase/migrations/<timestamp>_...sql
npx supabase db reset # rebuild the local database from migrations
npx supabase db push --remote --dry-run # preview what the linked project would receive
npx supabase db push --remote # apply to the linked project (asks first; --yes in CI)
create table public.profiles (
id uuid references auth.users on delete cascade primary key,
username text unique not null,
full_name text,
avatar_url text,
created_at timestamptz default now()
);
create table public.projects (
id uuid default gen_random_uuid() primary key,
name text not null,
description text,
owner_id uuid references public.profiles(id) on delete cascade not null,
is_public boolean default false,
created_at timestamptz default now()
);
create index projects_owner_id_idx on public.projects (owner_id);
alter table public.profiles enable row level security;
alter table public.projects enable row level security;
-- Wrap auth.uid() in a select so Postgres evaluates it once per query, not per row
create policy "Profiles are public" on public.profiles for select using (true);
create policy "Users update own profile" on public.profiles for update to authenticated
using ((select auth.uid()) = id) with check ((select auth.uid()) = id);
create policy "Public projects are visible" on public.projects for select using (is_public);
create policy "Owners read own projects" on public.projects for select to authenticated
using (owner_id = (select auth.uid()));
create policy "Owners create projects" on public.projects for insert to authenticated
with check (owner_id = (select auth.uid()));
create policy "Owners update projects" on public.projects for update to authenticated
using (owner_id = (select auth.uid())) with check (owner_id = (select auth.uid()));
create policy "Owners delete projects" on public.projects for delete to authenticated
using (owner_id = (select auth.uid()));
-- Auto-create a profile on signup. SECURITY DEFINER functions must pin search_path.
create function public.handle_new_user()
returns trigger
language plpgsql
se
Установить supabase в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл supabase?
Supabase is an open-source backend platform built on Postgres, with auth, realtime, storage and edge functions. Use when someone asks to "set up Supabase", "add authentication", "create a real-time app", "set up row-level security", "configure Supabase storage", "write edge functions", or "migrate from Firebase to Supabase". Covers the CLI, migrations, RLS schema design, auth flows, realtime subscriptions, storage policies and edge functions.
Как установить скилл supabase?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл supabase запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic