Supabase Skill
Query and modify data in Supabase using the PostgREST API. Also manage auth users.
Setup
- •Go to your project at supabase.com/dashboard
- •Project Settings → API → Copy the URL and keys
bash
export SUPABASE_URL="https://xxx.supabase.co" export SUPABASE_ANON_KEY="eyJhbGci..." export SUPABASE_SERVICE_KEY="eyJhbGci..." # optional, for admin ops
Query a Table
bash
curl -s "$SUPABASE_URL/rest/v1/todos?select=*&order=created_at.desc&limit=20" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY" \
| jq '.[] | {id, title, done, created_at}'
Filter with operators:
bash
curl -s "$SUPABASE_URL/rest/v1/todos?done=eq.false&select=id,title" \ -H "apikey: $SUPABASE_ANON_KEY" \ -H "Authorization: Bearer $SUPABASE_ANON_KEY" \ | jq .
Insert a Row
bash
curl -s -X POST "$SUPABASE_URL/rest/v1/todos" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{"title": "New task from agent", "done": false}' \
| jq '.[0] | {id, title}'
Update a Row
bash
curl -s -X PATCH "$SUPABASE_URL/rest/v1/todos?id=eq.1" \
-H "apikey: $SUPABASE_ANON_KEY" \
-H "Authorization: Bearer $SUPABASE_ANON_KEY" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{"done": true}' | jq .
List Auth Users (requires service key)
bash
curl -s "$SUPABASE_URL/auth/v1/admin/users" \
-H "apikey: $SUPABASE_SERVICE_KEY" \
-H "Authorization: Bearer $SUPABASE_SERVICE_KEY" \
| jq '.users[] | {id, email, created_at, last_sign_in_at}'
Tips
- •Supabase requires BOTH
apikeyheader ANDAuthorization: Bearerheader - •Use
Prefer: return=representationto get the inserted/updated row back - •PostgREST operators:
eq,neq,gt,lt,gte,lte,like,ilike,in - •Service key bypasses Row Level Security — use only for admin operations
- •Rate limit depends on your plan (free: 500 req/min)