/install volcengine-db-supabase
Volcengine AIDAP Database Skill
AIDAP refers to Volcengine's AI 原生 BaaS 平台 Supabase 版 product. This skill manages its deployment-relevant database workspace capabilities and wires them into applications. The stable deploy-facing AIDAP engine choices are supabase and postgresql; resolve current CreateWorkspace EngineType / EngineVersion enums from references/tool-reference.md before creating a workspace. The control plane should use ve aidap directly whenever the action exists. For old-skill data-plane capabilities not exposed by ve, use scripts/supabase_dataplane.py only for Supabase-compatible workspace APIs.
Boundaries
- Supported by
ve aidap: workspace, branch, compute, database, DB account, endpoint, API key, ACL, schema diff, start/stop, and deletion operations. - AIDAP deploy engine choices are
supabaseandpostgresql. Preserve the user's selected engine instead of treating Supabase as an RDS PostgreSQL provider. - Not covered by current
veCLI: enterprise real-name verification (account_verify/GetVerifyInfo/2018-01-01). Usescripts/aidap_bootstrap.pyfor that check when needed. scripts/aidap_bootstrap.pysigns non-public API requests fromVOLCENGINE_ACCESS_KEYandVOLCENGINE_SECRET_KEY; it does not reuseve logincached credentials.- Not covered by current
veCLI: SQL execution, migration application, Supabase Edge Function management, Supabase Storage bucket management, and TypeScript type generation. Usescripts/supabase_dataplane.pyfor those old-skill capabilities. scripts/supabase_dataplane.pyusesve aidaponly to resolve endpoint, default branch, and API keys. The data-plane calls use the Supabase service-role key inapikeyandAuthorizationheaders, not Volcengine AK/SK.- Service activation is a console flow. If the service is not enabled, direct the user to
https://console.volcengine.com/iam/service/attach_role/?ServiceName=aidap.
Initial Checks
- Verify authentication with
ve sts GetCallerIdentity. - Confirm AIDAP support in the installed CLI:
ve aidap --help
- If AK/SK environment variables are available, check enterprise real-name status when creating a workspace or troubleshooting creation failure:
python3 scripts/aidap_bootstrap.py get-verify-info
The account is enterprise verified only when the response has IsVerified=true and IdentityType="enterprise". The script also emits verification.enterprise_verified from those two fields.
Workspace Bootstrap
When the user has no workspace:
- Ensure the AIDAP service is enabled. If not, ask the user to open:
https://console.volcengine.com/iam/service/attach_role/?ServiceName=aidap
- Check enterprise verification with the bootstrap script when AK/SK environment variables are available.
- Create the workspace with
ve aidap CreateWorkspace, using the selected AIDAP engine and the current official enum mapping fromreferences/tool-reference.md.
Minimal explicit-network body shape:
ve aidap CreateWorkspace --body '{
"WorkspaceName": "demo-supabase",
"EngineType": "\x3Ccurrent EngineType for database_engine>",
"EngineVersion": "\x3Ccurrent EngineVersion for database_engine>",
"BranchSettings": {
"BranchName": "main",
"DatabaseName": "postgres"
},
"ComputeSettings": {
"AutoScalingLimitMinCU": 0.25,
"AutoScalingLimitMaxCU": 1,
"SuspendTimeoutSeconds": 300
},
"NetworkSettings": {
"VpcId": "vpc-xxxx",
"SubnetId": "subnet-xxxx",
"SharedPublicNetwork": false
},
"WorkspaceSettings": {
"DeletionProtection": "Disabled",
"PublicConnection": "Disabled"
},
"WorkspaceTags": [
{"Key": "publish-by", "Value": "deploy-skill"}
]
}'
Use a subnet in the same region as the workspace. For database_engine=postgresql, prefer an explicit VpcId and SubnetId from an existing Available VPC/subnet, such as the account's default VPC/subnet. Do not start with shared public/shared-network-only creation and then retry into explicit networking; the explicit network path is the verified low-friction path for PostgreSQL workspaces.
Do not invent or hard-code stale EngineType / EngineVersion values. Check the current API enum table in references/tool-reference.md, then refresh it from the official CreateWorkspace documentation or CLI/API evidence before live creation if the table may be stale.
After CreateWorkspace, verify readiness in dependency order:
- Poll
DescribeWorkspaceDetailuntilWorkspaceStatus=Running. - Poll
DescribeDefaultBranchuntil the branch hasBranchStatus=Ready; keep itsBranchId. - Run
DescribeComputesfor that branch and keep thePrimarydatabase compute'sComputeIdwhenComputeStatus=Active.
For PostgreSQL workspaces, pass both BranchId and ComputeId to endpoint and database connection queries. A verified DescribeWorkspaceEndpoint call with only BranchId returned InvalidParameter: 参数ComputeId值无效.
Common Commands
Use ve aidap \x3CAction> --help before writing command arguments; AIDAP is evolving and the CLI help is the local source of truth.
ve aidap DescribeWorkspaces --Limit 20
ve aidap DescribeWorkspaceDetail --WorkspaceId ws-xxxx
ve aidap DescribeDefaultBranch --WorkspaceId ws-xxxx
ve aidap DescribeBranches --WorkspaceId ws-xxxx
ve aidap DescribeComputes --WorkspaceId ws-xxxx --BranchId br-xxxx
ve aidap CreateBranch --WorkspaceId ws-xxxx --BranchSettings.Name dev
ve aidap DescribeWorkspaceEndpoint --WorkspaceId ws-xxxx --BranchId br-xxxx --ComputeId cp-xxxx
ve aidap DescribeAPIKeys --WorkspaceId ws-xxxx --BranchId br-xxxx
ve aidap DescribeDBAccounts --WorkspaceId ws-xxxx --BranchId br-xxxx
ve aidap CreateDBAccount --WorkspaceId ws-xxxx --BranchId br-xxxx --AccountName app --AccountPassword '\x3Csecret>'
ve aidap CreateDatabase --WorkspaceId ws-xxxx --BranchId br-xxxx --DatabaseName appdb --DatabaseOwner app
ve aidap DescribeDBAccountConnection --WorkspaceId ws-xxxx --BranchId br-xxxx --ComputeId cp-xxxx --DatabaseName appdb --AccountName app
ve aidap DescribeSupabaseDeployEnvVars --WorkspaceId ws-xxxx --BranchId br-xxxx
Branch-scoped actions must pass the explicit BranchId; do not rely on an implicit default branch for endpoint, API key, DB account, database, connection, or deploy-env-var operations. DescribeWorkspaceEndpoint without BranchId has been observed to fail with InvalidParameter. For PostgreSQL endpoint and account connection queries, also pass the resolved primary ComputeId.
If CreateDBAccount or CreateDatabase reports PrimaryComputeNotFound, first compare DescribeDefaultBranch, DescribeBranches, and DescribeComputes for the same workspace and branch. If the branch is the default branch and DescribeComputes shows a Primary database compute in Active state, stop guessing branch IDs and record the case as an AIDAP control-plane inconsistency. Use the PostgreSQL fallback in references/deploy-provider.md only when a credential-bearing admin POSTGRES_URL is available and the user accepts using it.
Never print passwords, API keys, JWT secrets, service-role keys, or connection strings containing credentials in final answers. Write DATABASE_URL into a local env file with mode 600, then verify it with psql (select 1 or a table-list query). Summarize the host/port, resource IDs, verification result, and credential file path, not the full connection string.
CreateAccessControlList currently has fragile CLI array parameter handling and has returned InvalidParameterFormat for common array forms. Do not tell the user that an ACL has been tightened until you verify the effective AllowHost from DescribeDBAccountConnection. If AllowHost still includes broad ranges such as 0.0.0.0/0 or ::/0, warn clearly and recommend tightening in the console or with a separately verified API call.
Data-Plane Commands
Use scripts/supabase_dataplane.py for old-skill capabilities that ve aidap does not expose. The script accepts either --workspace-id ws-... or --workspace-id br-...; when only a workspace is supplied it resolves the default branch with ve aidap DescribeDefaultBranch.
python3 scripts/supabase_dataplane.py execute-sql --workspace-id ws-xxxx --query "select * from pg_tables limit 5"
python3 scripts/supabase_dataplane.py apply-migration --workspace-id ws-xxxx --name create_todos --query-file ./migration.sql
python3 scripts/supabase_dataplane.py generate-typescript-types --workspace-id ws-xxxx --schemas public
python3 scripts/supabase_dataplane.py deploy-edge-function --workspace-id ws-xxxx --function-name hello --source-file ./index.ts
python3 scripts/supabase_dataplane.py create-storage-bucket --workspace-id ws-xxxx --bucket-name uploads --public
Set READ_ONLY=true to block data-plane write actions. If SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY are already set, the script can skip ve aidap key lookup.
Deploy Integration
When volcengine-deploy needs an AIDAP database, it passes database_product=aidap plus database_engine=supabase|postgresql. Read references/deploy-provider.md for the wiring loop and environment variables.
References
- CLI action map and bootstrap notes:
references/tool-reference.md - Application integration patterns:
references/app-integration-guide.md - Schema and RLS guidance:
references/schema-rls-guide.md - SQL playbook:
references/sql-playbook.md - Edge Function development:
references/edge-function-dev-guide.md - Deployment database-provider wiring:
references/deploy-provider.md
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install volcengine-db-supabase - 安装完成后,直接呼叫该 Skill 的名称或使用
/volcengine-db-supabase触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Volcengine Db Supabase 是什么?
Manage Volcengine AI Native BaaS for Supabase (AIDAP) database workspaces as a deployment database provider. Use when the user asks for Volcengine Supabase,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 38 次。
如何安装 Volcengine Db Supabase?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install volcengine-db-supabase」即可一键安装,无需额外配置。
Volcengine Db Supabase 是免费的吗?
是的,Volcengine Db Supabase 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Volcengine Db Supabase 支持哪些平台?
Volcengine Db Supabase 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Volcengine Db Supabase?
由 sdk-team(@volc-sdk-team)开发并维护,当前版本 v1.0.0。