byted-supabase
火山引擎 Supabase
本 Skill 用于在对话中充当火山引擎 Supabase 的智能运维与开发代理。
它会:
- 识别用户的 Supabase 自然语言需求
- 直接调用
scripts/call_volcengine_supabase.py获取实时结果 - 基于返回结果做解释、排障和下一步建议
何时使用本 Skill
适用场景(应使用):
- 用户提到 Supabase、火山引擎 Supabase 相关的操作需求
- 需要创建、查看、暂停或恢复 Supabase 工作区(workspace)
- 需要对 Supabase 数据库执行 SQL 查询、建表、迁移
- 需要管理 Supabase 分支(创建、删除、重置)
- 需要部署或管理 Edge Functions
- 需要操作 Storage Bucket(创建、删除、查看配置)
- 需要获取 Supabase 项目的 API Key 或 连接信息
- 需要为 Supabase 数据库 生成 TypeScript 类型定义
不适用场景(无需使用):
- 仅讨论通用数据库概念,不涉及火山引擎 Supabase 实例
- 操作非 Supabase 的数据库服务(如 RDS MySQL、Redis)
- 纯前端 / 客户端代码编写,不涉及 Supabase 后端资源管理
- 用户只是询问 Supabase 文档 / 概念,无需调用 CLI
运行方式
# 方式 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
标准使用流程
- 先确认目标资源:
workspace_id或branch_id - 优先执行只读查询,确认现状
- 需要变更时,再执行写操作
- 变更后再次查询,确认结果已生效
常用命令示例
# 查看可访问的 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-workspacesdescribe-workspacecreate-workspacepause-workspacerestore-workspaceget-workspace-urlget-keyslist-branchescreate-branchdelete-branchreset-branch
数据库
execute-sqllist-tableslist-migrationslist-extensionsapply-migrationgenerate-typescript-types
Edge Functions / Storage
list-edge-functionsget-edge-functiondeploy-edge-functiondelete-edge-functionlist-storage-bucketscreate-storage-bucketdelete-storage-bucketget-storage-config
应用开发参考
在使用本 Skill 管理 Supabase 资源的同时,以下文档提供应用开发场景的指导:
| 需求 | 文档 |
|---|---|
| 将 Supabase 接入 TS/Python 应用(SDK 初始化 + CRUD) | references/app-integration-guide.md |
| 数据库表结构设计与迁移规范 | references/schema-guide.md |
| 行级安全策略(RLS)配置 | references/rls-guide.md |
| Edge Function 编写与部署 | references/edge-function-dev-guide.md |
💡 典型工作流:先用 CLI 创建 workspace / 建表 / 配置 RLS,再参考应用开发文档在业务代码中集成 Supabase SDK。
注意事项
- 默认遵循“先查后改”
get-keys默认脱敏,只有明确需要时才加--revealreset-branch会丢失未追踪变更,且后端当前会忽略migration_versionREAD_ONLY=true时,所有写操作会被拒绝
参考资料
- 工具说明:
references/tool-reference.md - 操作流程:
references/workflows.md - SQL 示例:
references/sql-playbook.md - 应用集成:
references/app-integration-guide.md - Schema 设计:
references/schema-guide.md - RLS 策略:
references/rls-guide.md - Edge Function 开发:
references/edge-function-dev-guide.md
More from bytedance/agentkit-samples
byted-seedream-image-generate
Generate high-quality images from text prompts using Volcano Engine Seedream models. Supports multiple artistic styles and aspect ratios. Use this skill when users want to create images from text descriptions, generate artwork in various styles, create visual content for creative projects, or need AI-powered image generation capabilities.
183byted-las-video-edit
Extracts and clips video segments from long videos using natural language descriptions. AI-powered smart video editing, video trimming, and video cutting powered by Volcengine LAS. Describe what you want — scenes, people, objects, actions, events — and get trimmed clips automatically. Video search and video content retrieval: find and locate specific people, objects, or scenes in footage. Supports reference images for person matching and object matching (search video by image). Two modes: simple (fast) and detail (thorough, optional ASR). Use this skill when the user wants to edit/clip/cut videos using natural language descriptions, extract highlights or key moments from videos, find specific people/objects/scenes in video footage (by text or reference image), compile highlight reels from long videos, trim video segments, or do AI-powered smart video editing.
163byted-las-pdf-parse-doubao
Parses and reads PDF documents into structured Markdown text using Volcengine LAS Doubao AI models. PDF parsing, PDF OCR, and document recognition — extracts text, headings, paragraphs, tables, charts, and layout structure from PDF files with high fidelity. Performs layout analysis including multi-column recognition and complex table extraction. Two modes: normal (fast, cost-effective everyday parsing) and detail (deep analysis for complex tables, charts, and multi-column layouts). Converts PDF to Markdown, PDF to text, and structured data. Digitizes scanned PDF documents and scanned images via OCR. Supports TOS paths, HTTP URLs, and local file upload. Async submit-poll workflow with batch processing support. Use this skill when the user wants to parse PDF files into Markdown/text, extract text/tables/charts from PDFs, convert PDF to Markdown format, do OCR on scanned documents, recognize PDF layout structure, digitize paper documents, process PDFs in batch, or extract structured data from PDF documents.
129byted-seedance-video-generate
Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials.
109byted-data-search
|
106byted-las-vlm-video
Analyzes and understands video content using Volcengine LAS Doubao vision-language models (VLM). Multimodal AI video analysis, video comprehension, and visual understanding of video clips and footage. Performs video question answering (video Q&A) — ask questions about what happens in a video and get AI answers. Scene recognition and scene description, object recognition and object detection, action recognition and action detection from video frames. Generates video descriptions, video captions, video summaries, video annotations, and content summarization. Visual frame analysis for identifying people, objects, actions, and events in video. Auto-compresses video to 50MB before inference. Synchronous single-call processing. Use this skill when the user wants to analyze or understand video content using VLM/AI, do video Q&A (ask questions about a video), describe what happens in a video, recognize objects/actions/scenes in video frames, generate video captions/descriptions/summaries, annotate or label video content, get AI-powered visual understanding of video clips, or perform multimodal video analysis with vision-language models.
97