This skill allows AI agents to query Supabase cloud database via REST API using only project ID and anon key.
.env file (not in version control)Copy references/.env.example to references/.env
Fill in your Supabase credentials in references/.env:
SUPABASE_PROJECT_ID: Your Supabase project ID (from project URL)SUPABASE_ANON_KEY: Your anon/public API key (from Settings → API)Run the query script from the skill directory:
bash
python scripts/query.py "users" --select "*" --limit 10
Or on Windows:
batch
scripts\query.bat users --select "*" --limit 10
The script returns JSON:
json
{
"success": true,
"table": "users",
"rows": [...],
"row_count": 10,
"truncated": false
}
Error response:
json
{
"success": false,
"error": "Error message here"
}
bash
python scripts/query.py "users" --select "*" --limit 20
bash
python scripts/query.py "users" --select "id,name,email" --eq "status:active" --limit 10
bash
python scripts/query.py "posts" --select "title,created_at" --order "created_at.desc" --limit 5
references/.env from the example file