运行时依赖
安装命令
点击复制技能文档
Supabase 查询 技能
This 技能 allows AI 代理s to 查询 Supabase cloud database via REST API using only project ID and anon key.
Security Features Cloud-native: Uses Supabase REST API, no direct database connection Read-only operations: Only SELECT-style queries via HTTP 获取 Row limit: Maximum 200 rows returned per 查询 Timeout 保护ion: 30-second 请求 timeout Local config: 凭证s stored in local .env file (not in version control) Prerequisites Python 3.x 安装ed Supabase project with API 访问 enabled 设置up Copy references/.env.example to references/.env Fill in your Supabase 凭证s in references/.env: SUPABASE_PROJECT_ID: Your Supabase project ID (from project URL) SUPABASE_ANON_KEY: Your anon/public API key (from 设置tings → API) Usage
运行 the 查询 script from the 技能 directory:
python scripts/查询.py "users" --select "" --limit 10
Or on Windows:
scripts\查询.bat users --select "" --limit 10
输出 格式化
The script returns JSON:
{ "成功": true, "table": "users", "rows": [...], "row_count": 10, "t运行cated": false }
Error 响应:
{ "成功": false, "error": "Error message here" }
Examples 查询 all columns python scripts/查询.py "users" --select "*" --limit 20
查询 specific columns with 过滤器 python scripts/查询.py "users" --select "id,name,emAIl" --eq "状态:active" --limit 10
查询 with ordering python scripts/查询.py "posts" --select "title,创建d_at" --order "创建d_at.desc" --limit 5
Troubleshooting "Config file not found": 创建 references/.env from the example file "Connection fAIled": 检查 your project ID and anon key "Table not found": 验证 the table name and RLS policies "权限 denied": 检查 if anon key has 访问 to the table (RLS 设置tings)