소스 정보
- 저장소
- Dev-Toolbelt/dev-team-agents
- 최근 소스 활동
- 2026년 7월 31일 16:08
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill supabase명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | supabase |
| description | Supabase — Postgres, Auth, Storage, Edge Functions, RLS, CLI. |
A project uses Supabase when any of the following are present:
| Signal | Meaning |
|---|---|
supabase/ directory at project root | Supabase CLI project |
@supabase/supabase-js in package.json | JS/TS client |
SUPABASE_URL / NEXT_PUBLIC_SUPABASE_URL env var | Cloud or self-hosted instance |
supabase service in docker-compose.yml | Self-hosted stack |
supabase/config.toml | CLI configuration |
supabase/migrations/ directory | Database managed via CLI |
| Aspect | Cloud | Self-Hosted |
|---|---|---|
| Auth service | GoTrue (managed) | GoTrue (Docker) |
| API Gateway | Kong (managed) | Kong (Docker, kong.yml) |
| Database | Managed Postgres | Your Postgres container |
| Realtime | Managed | Phoenix-based container |
| Storage | Managed S3-compatible | storage-api container |
| Edge Functions | Deno Deploy (managed) | edge-runtime container |
| Config | Dashboard + env vars | supabase/config.toml |
| Studio | app.supabase.com | supabase-studio container |
Key difference: in self-hosted, all services run in Docker. Changes to Kong routes, GoTrue config, and storage policies happen in config files — not a UI. Always check docker-compose.yml or supabase/config.toml for service config.
Supabase exposes Postgres directly (port 5432 by default). Connection via:
SUPABASE_DB_URL with ?pgbouncer=truePostgREST reads from the public schema by default. Expose only what needs to be public. Use schemas to namespace: api, private, auth.
-- Expose a table via PostgREST
grant select on public.products to anon;
grant all on public.orders to authenticated;
See skills/integrations/gotrue/SKILL.md for full detail.
Key points:
raw_user_meta_data (user-set) vs raw_app_meta_data (server-set)app_metadata — only writable via service-role key or GoTrue hooksBucket-based object storage with RLS policies.
-- Allow authenticated users to upload to their own folder
create policy "Users upload own files"
on storage.objects for insert
to authenticated
with check (bucket_id = 'avatars' and auth.uid()::text = (storage.foldername(name))[1]);
Deno-based serverless functions deployed via CLI:
supabase functions new my-function
supabase functions serve # local dev
supabase functions deploy my-function
Functions run with service-role privileges by default — be careful. Pass the JWT in the Authorization header and validate it if the function should be user-scoped.
See skills/integrations/realtime/SKILL.md for full detail.
RLS is the primary authorization layer in Supabase. Always enable it on every table exposed via PostgREST.
-- Enable RLS
alter table orders enable row level security;
-- Users can only see their own orders
create policy "Users see own orders"
on orders for select
to authenticated
using (user_id = auth.uid());
-- Insert only for authenticated, auto-set user_id
create policy "Users create own orders"
on orders for insert
to authenticated
with check (user_id = auth.uid());
Rules:
using clause — evaluated on SELECT, UPDATE, DELETEwith check clause — evaluated on INSERT, UPDATEauth.uid() — returns the UUID of the authenticated user from the JWTauth.role() — returns anon, authenticated, or service_roleService role key bypasses RLS — never expose it to the client. Use only in server-side code (Edge Functions, backend services).
supabase init # initialize project
supabase start # start local stack (Docker)
supabase stop # stop local stack
supabase db diff # diff local vs remote schema
supabase db push # push migrations to remote
supabase migration new <name> # create new migration file
supabase gen types typescript # generate TypeScript types from schema
supabase functions deploy # deploy edge functions
supabase secrets set KEY=val # set env secret for edge functions
Migrations live in supabase/migrations/ as timestamped SQL files. Always use the CLI to generate and apply migrations — never edit migration files after they've been applied.
After every schema change, regenerate the client types (supabase gen types typescript) and commit them with the migration — stale generated types silently drift from the database and defeat type-safe queries.
| Variable | Usage |
|---|---|
SUPABASE_URL | Base URL of your Supabase instance |
SUPABASE_ANON_KEY | Public key — safe for client-side, respects RLS |
SUPABASE_SERVICE_ROLE_KEY | Bypasses RLS — server-side only, never expose |
SUPABASE_JWT_SECRET | Secret used to verify JWTs — server-side only |
DATABASE_URL | Direct Postgres connection string |
import { createClient } from '@supabase/supabase-js'
// Client-side (browser) — use anon key
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)
// Server-side — use service role key only when RLS bypass is intentional
const adminSupabase = createClient(
process.env.SUPABASE_URL!,
process.env.SUPABASE_SERVICE_ROLE_KEY!
)
Data fetching with RLS
// RLS enforced — returns only rows the user can see
const { data, error } = await supabase
.from('orders')
.select('id, total, created_at')
.order('created_at', { ascending: false })
Typed queries (after supabase gen types)
import type { Database } from './database.types'
const supabase = createClient<Database>(url, key)
// now .from() is type-safe
Server-side JWT verification
const { data: { user }, error } = await supabase.auth.getUser(jwt)
if (error || !user) throw new Error('Unauthorized')
service_role key on the client — bypasses all RLS, massive security holeauth.uid() in a migration context (outside a user request) — it returns nullonAuthStateChange on the client