Volcengine Supabase
Manage Volcengine Supabase workspaces, branches, SQL queries, migrations, Edge Functions, Storage, and TypeScript type generation via a local CLI. Run uv run... Skill: Volcengine Supabase Owner: techstylex Summary: Manage Volcengine Supabase workspaces, branches, SQL queries, migrations, Edge Functions, Storage, and TypeScript type generation via a local CLI. Run uv run... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-12T14:25:41.318Z | user Initial release of volcengine-supabase. - Manage Volcengine Supabase workspaces, branches, SQL queries, migrations, Edge Functio
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.0release · observed Mar 12, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s1730g4e9pkyngkq429k6axjcd83hp97:supabase-skills- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-techstylex-supabase-skills/snapshot"
Documentation
CLAWHUB
46,509 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: volcengine-supabase
description: Manage Volcengine Supabase workspaces, branches, SQL queries, migrations, Edge Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results.
metadata: {"clawdbot":{"emoji":"🧩","homepage":"https://www.volcengine.com/","requires":{"bins":["uv"]},"os":["darwin","linux"]},"openclaw":{"emoji":"🧩","homepage":"https://www.volcengine.com/","requires":{"bins":["uv"]},"os":["darwin","linux"]},"moltbot":{"emoji":"🧩","homepage":"https://www.volcengine.com/","requires":{"bins":["uv"]},"os":["darwin","linux"]}}
---
# 火山引擎 Supabase
本 Skill 用于在对话中充当**火山引擎 Supabase 的智能运维与开发代理**。
它会:
- 识别用户的 Supabase 自然语言需求
- 直接调用 `scripts/call_volcengine_supabase.py` 获取实时结果
- 基于返回结果做解释、排障和下一步建议
## 运行方式
```bash
# 方式 1:使用 uv(推荐)
uv run ./scripts/call_volcengine_supabase.py <action> [options]
# 方式 2:使用 python(需预装依赖)
python ./scripts/call_volcengine_supabase.py <action> [options]
```
## 前置条件
- 必需环境变量:`VOLCENGINE_ACCESS_KEY`、`VOLCENGINE_SECRET_KEY`(如果在沙箱环境/vefaas IAM 环境下运行,将自动获取临时凭证,可不配置环境变量)
- 可选环境变量:`VOLCENGINE_REGION`、`DEFAULT_WORKSPACE_ID`、`READ_ONLY`、`SUPABASE_WORKSPACE_SLUG`、`SUPABASE_ENDPOINT_SCHEME`
- 若未配置依赖,可先执行:`uv pip install -r requirements.txt` 或 `pip install -r requirements.txt`
## 标准使用流程
1. 先确认目标资源:`workspace_id` 或 `branch_id`
2. 优先执行只读查询,确认现状
3. 需要变更时,再执行写操作
4. 变更后再次查询,确认结果已生效
## 常用命令示例
```bash
# 查看可访问的 workspace
uv run ./scripts/call_volcengine_supabase.py list-workspaces
# 查看 workspace 详情
uv run ./scripts/call_volcengine_supabase.py describe-workspace --workspace-id ws-xxxx
# 获取 workspace URL
uv run ./scripts/call_volcengine_supabase.py get-workspace-url --workspace-id ws-xxxx
# 查看分支
uv run ./scripts/call_volcengine_supabase.py list-branches --workspace-id ws-xxxx
# 执行 SQL
uv run ./scripts/call_volcengine_supabase.py execute-sql --workspace-id ws-xxxx --query "SELECT * FROM pg_tables LIMIT 5"
# 从文件执行 migration
uv run ./scripts/call_volcengine_supabase.py apply-migration --workspace-id ws-xxxx --name create_todos_table --query-file ./migration.sql
# 部署 Edge Function
uv run ./scripts/call_volcengine_supabase.py deploy-edge-function --workspace-id ws-xxxx --function-name hello --source-file ./index.ts
# 创建 Storage bucket
uv run ./scripts/call_volcengine_supabase.py create-storage-bucket --workspace-id ws-xxxx --bucket-name uploads --public
```
## 能力范围
### 工作区与分支
- `list-workspaces`
- `describe-workspace`
- `create-workspace`
- `pause-workspace`
- `restore-workspace`
- `get-workspace-url`
- `get-keys`
- `list-branches`
- `create-branch`
- `delete-branch`
- `reset-branch`
### 数据库
- `execute-sql`
- `list-tables`
- `list-migrations`
- `list-extensions`
- `apply-migration`
- `generate-typescript-types`
### Edge Functions / Storage
- `list-edge-functions`
- `get-edge-function`
- `deploy-edge-function`
- `delete-edge-function`
- `list-storage-buckets`
- `create-storage-bucket`
- `delete-storage-bucket`
- `get-storage-config`
_meta.json
{
"ownerId": "kn7bkpvjyqeynm6mj3721mktc182sxrr",
"slug": "supabase-skills",
"version": "1.0.0",
"publishedAt": 1773325541318
}references/app-integration-guide.md
# 应用集成指南
本指南介绍如何将 Supabase 集成到 TypeScript 或 Python 应用中,包括获取连接信息、初始化 SDK 客户端、和执行 CRUD 操作。
---
## 1. 获取连接信息
使用本 Skill 获取 Supabase 实例的连接 URL 和密钥:
```bash
# 获取 Supabase API URL
uv run ./scripts/call_volcengine_supabase.py get-workspace-url --workspace-id ws-xxxx
# 获取 API Keys(默认脱敏)
uv run ./scripts/call_volcengine_supabase.py get-keys --workspace-id ws-xxxx
# 获取完整密钥(需要时)
uv run ./scripts/call_volcengine_supabase.py get-keys --workspace-id ws-xxxx --reveal
```
你将获得以下信息,用于应用配置:
| 信息 | 用途 |
|------|------|
| **Supabase URL** | API 端点地址 |
| **anon key** | 客户端公开访问密钥(受 RLS 限制) |
| **service_role key** | 服务端管理密钥(绕过 RLS,仅限后端使用) |
> ⚠️ **安全提醒**:`service_role key` 拥有完整权限,**永远不要**暴露给客户端或前端代码。
---
## 2. 环境变量配置
建议在 `.env` 文件中配置:
```bash
SUPABASE_URL=https://your-project-url.supabase.co
SUPABASE_ANON_KEY=eyJ...your-anon-key
SUPABASE_SERVICE_ROLE_KEY=eyJ...your-service-role-key # 仅后端使用
```
---
## 3. TypeScript 应用接入
### 安装依赖
```bash
npm install @supabase/supabase-js
```
### 初始化客户端
```typescript
import { createClient, SupabaseClient } from '@supabase/supabase-js';
// 服务端客户端(用于 API 路由、后端服务)
function getSupabaseClient(token?: string): SupabaseClient {
const url = process.env.SUPABASE_URL!;
const key = process.env.SUPABASE_ANON_KEY!;
if (token) {
// 带用户认证的客户端(RLS 按用户过滤)
return createClient(url, key, {
global: {
headers: { Authorization: `Bearer ${token}` },
},
db: { timeout: 60000 },
auth: { autoRefreshToken: false, persistSession: false },
});
}
// 匿名客户端(RLS 按 anon 角色过滤)
return createClient(url, key, {
db: { timeout: 60000 },
auth: { autoRefreshToken: false, persistSession: false },
});
}
```
### CRUD 操作示例
#### 查询数据
```typescript
const client = getSupabaseClient();
// 基础查询
const { data, error } = await client.from('posts').select('*').limit(10);
// 带过滤条件
const { data: activePosts } = await client
.from('posts')
.select('*')
.eq('published', true)
.order('created_at', { ascending: false })
.limit(20);
// 选择特定列
const { data: titles } = await client.from('posts').select('id, title, created_at');
// 模糊搜索
const { data: results } = await client.from('posts').select('*').ilike('title', '%keyword%');
// 范围查询
const { data: recent } = await client
.from('posts')
.select('*')
.gte('created_at', '2024-01-01')
.lte('created_at', '2024-12-31');
// 分页查询
const { data: page } = await client
.from('posts')
.select('*')
.range(0, 9); // 第 1-10 条
// 关联查询(需要外键关系)
const { data: postsWithAuthor } = await client
.from('posts')
.select('*, users(name, email)');
// 统计数量
const { count } = await client
.from('posts')
.select('*', { count: 'exact', head: true });
```
#### 插入数据
```typescript
// 单条插入
const { data, error } = await client
.from('posts')
.insert({ title: 'Hello World', content: 'My first post' })
.select(); // 返回插入的数据
// 批量插入
const { data: batch } = await client
.from('posts')
.insert([
{ title: 'Post 1', content: 'Content 1' },
{ titreferences/edge-function-dev-guide.md
# Edge Function 开发指南
本指南介绍 Edge Function 的编写规范和常见模式,函数编写后通过 `deploy-edge-function` 部署。
---
## 基础结构
每个 Edge Function 是一个 Deno 函数,使用 `Deno.serve()` 处理 HTTP 请求:
```typescript
Deno.serve(async (req: Request) => {
return new Response(JSON.stringify({ message: 'Hello World' }), {
headers: { 'Content-Type': 'application/json' },
});
});
```
部署:
```bash
uv run ./scripts/call_volcengine_supabase.py deploy-edge-function \
--workspace-id ws-xxxx \
--function-name hello \
--source-file ./functions/hello/index.ts
```
---
## CORS 配置
大多数前端调用都需要 CORS 支持:
```typescript
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Authorization, Content-Type, x-client-info, apikey',
};
Deno.serve(async (req: Request) => {
// 处理 CORS 预检请求
if (req.method === 'OPTIONS') {
return new Response('ok', { headers: corsHeaders });
}
try {
const data = { message: 'Hello World' };
return new Response(JSON.stringify(data), {
headers: { ...corsHeaders, 'Content-Type': 'application/json' },
});
} catch (error) {
return new Response(JSON.stringify({ error: error.message }), {
status: 500,
headers: { ...corsHeaders, 'Content-Type': 'application/json' },
});
}
});
```
---
## 请求处理
### 读取请求体
```typescript
Deno.serve(async (req: Request) => {
// JSON 请求体
const body = await req.json();
const { name, email } = body;
// URL 参数
const url = new URL(req.url);
const page = url.searchParams.get('page') || '1';
// 请求头
const authHeader = req.headers.get('Authorization');
return new Response(JSON.stringify({ name, email, page }), {
headers: { 'Content-Type': 'application/json' },
});
});
```
### 路由分发
```typescript
Deno.serve(async (req: Request) => {
const url = new URL(req.url);
const path = url.pathname;
if (req.method === 'GET' && path === '/') {
return handleList(req);
}
if (req.method === 'POST' && path === '/') {
return handleCreate(req);
}
if (req.method === 'PUT') {
return handleUpdate(req);
}
if (req.method === 'DELETE') {
return handleDelete(req);
}
return new Response('Not Found', { status: 404 });
});
```
---
## 带数据库访问
Edge Function 可以通过 Supabase SDK 或直接使用环境变量中的连接信息访问数据库:
```typescript
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2';
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Authorization, Content-Type, x-client-info, apikey',
};
Deno.serve(async (req: Request) => {
if (req.method === 'OPTIONS') {
return new Response('ok', { headers: corsHeaders });
}
try {
// 使用环境变量创建 Supabase 客户端
const supabaseUrl = Deno.env.get('SUPABASE_URL')!;
const supabaseKey = Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!;
const supabase = createClient(supabaseUrl, supabaseKey);
// 如果需要以用户身份访问(尊重 RLS)
const authHeader = req.headers.get('Authorizreferences/rls-guide.md
# Row Level Security (RLS) 策略配置指南 > 🔴 **所有表必须启用 RLS**。即使是公开数据表,也必须启用 RLS 并配置允许公开访问的策略。不启用 RLS 的表任何人都可以通过 anon key 直接读写所有数据,这是严重的安全隐患。 --- ## 策略选择(决策表) 根据数据访问需求,选择对应的策略场景: | 场景 | 说明 | 需要 user_id? | 示例 | |------|------|:-----------:|------| | **A. 公开读写** | 所有人可读写 | ❌ | 公告、公共配置 | | **B. 公开读 + 登录写** | 所有人可读,仅登录用户可写 | ❌ | 博客文章、商品展示 | | **C. 仅登录用户** | 登录用户才能读写 | ❌ | 内部数据、会员内容 | | **D. 用户私有数据** | 用户只能操作自己的数据 | ✅ | 用户订单、个人笔记、私人设置 | > ⚠️ **常见误解**:`user_id` 字段**不是** RLS 的前提条件。只有场景 D(用户私有数据)才需要 `user_id`。 --- ## 操作方式 所有 RLS SQL 均可通过本 Skill 的 `execute-sql` 直接执行: ```bash uv run ./scripts/call_volcengine_supabase.py execute-sql \ --workspace-id ws-xxxx \ --query "ALTER TABLE my_table ENABLE ROW LEVEL SECURITY;" ``` 对于需要版本管理的 RLS 变更,建议通过 `apply-migration` 执行: ```bash uv run ./scripts/call_volcengine_supabase.py apply-migration \ --workspace-id ws-xxxx \ --name enable_rls_for_posts \ --query-file ./rls_migration.sql ``` --- ## 策略 SQL 模板 > 💡 **命名规范**:Policy 名称应包含表名前缀(如 `posts_allow_public_read`),便于在多表环境中区分管理。以下模板使用 `<table_name>` 作为占位符,实际使用时替换为真实表名。 > ⚠️ **幂等性**:`CREATE POLICY` 在策略已存在时会报错。如需重新配置,先删除再创建: > ```sql > DROP POLICY IF EXISTS "policy_name" ON <table_name>; > CREATE POLICY "policy_name" ON <table_name> ...; > ``` > 修改已有表(如加字段)时,已有的 RLS 策略仍然生效,**无需重复配置**。 ### 场景 A:公开读写 ```sql ALTER TABLE <table_name> ENABLE ROW LEVEL SECURITY; CREATE POLICY "<table_name>_allow_public_select" ON <table_name> FOR SELECT USING (true); CREATE POLICY "<table_name>_allow_public_insert" ON <table_name> FOR INSERT WITH CHECK (true); CREATE POLICY "<table_name>_allow_public_update" ON <table_name> FOR UPDATE USING (true) WITH CHECK (true); CREATE POLICY "<table_name>_allow_public_delete" ON <table_name> FOR DELETE USING (true); ``` ### 场景 B:公开读 + 登录写 ```sql ALTER TABLE <table_name> ENABLE ROW LEVEL SECURITY; CREATE POLICY "<table_name>_allow_public_select" ON <table_name> FOR SELECT USING (true); CREATE POLICY "<table_name>_auth_insert" ON <table_name> FOR INSERT WITH CHECK (auth.role() = 'authenticated'); CREATE POLICY "<table_name>_auth_update" ON <table_name> FOR UPDATE USING (auth.role() = 'authenticated') WITH CHECK (auth.role() = 'authenticated'); CREATE POLICY "<table_name>_auth_delete" ON <table_name> FOR DELETE USING (auth.role() = 'authenticated'); ``` ### 场景 C:仅登录用户 ```sql ALTER TABLE <table_name> ENABLE ROW LEVEL SECURITY; CREATE POLICY "<table_name>_auth_select" ON <table_name> FOR SELECT USING (auth.role() = 'authenticated'); CREATE POLICY "<table_name>_auth_insert" ON <table_name> FOR INSERT WITH CHECK (auth.role() = 'authenticated'); CREATE POLICY "<table_name>_auth_update" ON <table_name> FOR UPDATE USING (auth.role() = 'authenticated') WITH CHECK (auth.role() = 'authenticated'); CREATE POLICY "<table_name>_auth_delete" ON <table_name> FOR DELETE USING (auth.role() = 'authenticated'); ``` ### 场景 D:用户私有数据 > ⚠️ 表中必须包含 `user_id` 字段(见下方 [user_id 字段定义](#user_id-字段定义))。 ```sql ALTER TABLE <tabl
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/techstylex/skills/supabase-skills",
"sourceUrl": "https://clawhub.ai/techstylex/skills/supabase-skills",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T11:49:30.349Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-techstylex-supabase-skills/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-techstylex-supabase-skills/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T11:49:30.349Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/techstylex/supabase-skills",
"sourceUrl": "https://clawhub.ai/techstylex/supabase-skills",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T11:49:30.349Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.0",
"href": "https://clawhub.ai/techstylex/supabase-skills",
"sourceUrl": "https://clawhub.ai/techstylex/supabase-skills",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-03-12T14:25:41.318Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-techstylex-supabase-skills/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-techstylex-supabase-skills/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.0",
"description": "Initial release of volcengine-supabase. - Manage Volcengine Supabase workspaces, branches, SQL queries, migrations, Edge Functions, and Storage via local CLI commands. - Provides real-time results by invoking scripts/call_volcengine_supabase.py. - Supports common operations such as workspace listing, SQL execution, migration management, Edge Function deployment, and storage bucket creation. - Includes detailed instructions, usage examples, and best practices for safe and effective management. - Offers references and guides for application integration, schema design, RLS, and Edge Function development.",
"href": "https://clawhub.ai/techstylex/supabase-skills",
"sourceUrl": "https://clawhub.ai/techstylex/supabase-skills",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-03-12T14:25:41.318Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
