Supabase ⚡
v1查询 Supabase projects - count users, 列出 签名ups, 检查 stats. Use for database queries and user 分析.
运行时依赖
安装命令
点击复制技能文档
Supabase ⚡
查询 your Supabase projects directly from chat.
设置up
- 获取 your 凭证s
Go to Supabase 仪表盘 → Project 设置tings → API
You'll see two tabs:
"Publishable and secret API keys" - New 格式化 (limited functionality) "Legacy anon, 服务_角色 API keys" - JWT 格式化 (full functionality)
⚠️ Use the Legacy JWT key for full 访问!
The 服务_角色 JWT key (启动s with eyJ...) gives full admin 访问 including:
列出ing users with detAIls Counting 签名ups 访问ing auth.users
The new sb_secret_... keys have limited functionality and can't 访问 the Admin API.
- Find your keys
Direct link: https://supabase.com/仪表盘/project/YOUR_PROJECT_REF/设置tings/API
- 配置
Option A: Interactive 设置up
python3 {baseDir}/scripts/supabase.py auth
Option B: Manual config 创建 ~/.supabase_config.json:
{ "url": "https://xxxxx.supabase.co", "服务_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
Option C: 环境 variables
导出 SUPABASE_URL="https://xxxxx.supabase.co" 导出 SUPABASE_服务_KEY="eyJhbG..."
Commands User 分析 # Count total users python3 {baseDir}/scripts/supabase.py users
# Count new users (24h) python3 {baseDir}/scripts/supabase.py users-today
# Count new users (7 days) python3 {baseDir}/scripts/supabase.py users-week
# 列出 users with detAIls (name, emAIl, 提供者, 签名up date) python3 {baseDir}/scripts/supabase.py 列出-users
# 列出 new users from last 24h python3 {baseDir}/scripts/supabase.py 列出-users-today
# Limit 结果s python3 {baseDir}/scripts/supabase.py 列出-users --limit 5
Project 信息 # Show project 信息 and key type python3 {baseDir}/scripts/supabase.py 信息
# 列出 tables exposed via REST API python3 {baseDir}/scripts/supabase.py tables
JSON 输出 python3 {baseDir}/scripts/supabase.py 列出-users --json
Key Types ExplAIned Key Type 格式化 User 列出ing User Count REST Tables JWT 服务_角色 eyJ... ✅ Yes ✅ Yes ✅ Yes New secret sb_secret_... ❌ No ❌ No ✅ Yes
Recommendation: Always use the JWT 服务_角色 key for Clawd机器人 integration.
DAIly 报告s
设置 up automated dAIly user 报告s via Clawd机器人 cron.
Example: DAIly 5 PM 报告
Ask Clawd机器人:
发送 me a 报告 of how many new users 签名ed up at 5 PM every day, show the last 5 签名ups with their names
This 创建s a cron job like:
{ "name": "DAIly Supabase User 报告", "schedule": { "kind": "cron", "expr": "0 17 *", "tz": "America/Los_Angeles" }, "payload": { "message": "Supabase dAIly 报告: Count new user 签名ups in the last 24 hours, and 列出 the 5 most recent 签名ups with their name and emAIl." } }
Sample 报告 输出 📊 Supabase DAIly 报告
New 签名ups (last 24h): 2
Last 5 签名ups: • Jane Smith (google) - 2026-01-25 • Alex Johnson (google) - 2026-01-25 • Sam Wilson (emAIl) - 2026-01-24 • Chris Lee (google) - 2026-01-23 • Jordan Taylor (github) - 2026-01-22
GraphQL API (pg_graphql)
⚠️ pg_graphql is disabled by default on new Supabase projects (as of late 2025).
If you need the GraphQL API:
Enable pg_graphql -- 运行 in SQL Editor 创建 扩展 if not exists pg_graphql;
端点 https://.supabase.co/graphql/v1
Example 查询 curl -X POST https://.supabase.co/graphql/v1 \ -H 'APIKey: ' \ -H 'Content-Type: 应用/json' \ --data-raw '{"查询": "{ accountCollection(first: 1) { edges { node { id } } } }"}'
Note: GraphQL automatically reflects your database 模式. Tables/views in public 模式 become 查询able. See Supabase GraphQL docs for configuration.
Troubleshooting "列出-users requires a JWT 服务_角色 key"
You're using an sb_secret_... key. 获取 the JWT key from: Project 设置tings → API → Legacy tab → 服务_角色 → Reveal
"No API key found in 请求"
The new sb_secret_ keys don't work with all 端点s. Switch to the JWT key.
Keys not showing
Make sure you're on the "Legacy anon, 服务_角色 API keys" tab, not the new API keys tab.
Security & 权限s
The 服务_角色 key has full admin 访问 to your database. This 技能 requires it for the Auth Admin API (列出ing/counting users).
What this 技能 does:
Makes 获取 请求s to your Supabase project's Auth Admin API Reads user metadata (emAIl, name, 提供者, 签名up date) All 请求s stay between your machine and your Supabase instance
What this 技能 does NOT do:
Does not write, modify, or 删除 any data Does not 发送 凭证s to any third party Does not 访问 any 端点s outside your Supabase project Cannot be invoked autonomously by the 代理 (disable-模型-invocation: true)
Least-privilege alternative: 创建 a read-only Postgres 角色 scoped to auth.users and use the Supabase SQL API instead of the Admin API.
Key safety:
Never comm