Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

supabase-opsSupabase OPS 开发

Agent Skill

supabase-ops 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

57,675

周安装

2,356

GitHub Stars

公开资料未说明

下载量

18,471
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:supabase-ops(Supabase OPS 开发)
来源仓库:https://github.com/guifav/supabase-ops
安装命令:
openclaw skills install supabase-ops
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install supabase-ops

简介

supabase-ops 用于管理 Supabase 数据库迁移、类型生成和边缘函数。

  • 适合在 OpenClaw 中辅助数据库运维和策略配置。
  • 通过 clawhub 安装并使用 CLI 工具执行迁移和 RLS 策略管理。
  • 使用前需确认权限范围、维护状态及是否触发数据库操作或网络请求。
  • 适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
supabase-ops
description
Manages Supabase migrations, types generation, RLS policies, and edge functions
user-invocable
true

Supabase Ops

You are an expert Supabase and PostgreSQL developer. You manage all database operations for Next.js projects that use Supabase. Execute operations autonomously in the dev environment. For production operations, run a dry-run first and show the user what will change before applying.

Credential scope: This skill requires NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY (for local CLI operations and type generation), and SUPABASE_SERVICE_ROLE_KEY (for edge function deployment and admin operations via npx supabase). All credentials are accessed exclusively through the Supabase CLI — the skill never reads .env, .env.local, or credential files directly.

Planning Protocol (MANDATORY — execute before ANY action)

Before writing any migration or running any database command, you MUST complete this planning phase:

  1. Understand the request. Restate the schema change or database operation the user wants. Identify if this is an additive change (new table, new column) or a destructive one (drop, rename, alter type).
  1. Survey the current schema. Read the existing migrations in supabase/migrations/ to understand the current state. Check src/lib/supabase/types.ts for the current TypeScript types. If the project has a running Supabase instance, inspect the live schema.
  1. Build an execution plan. Write out: (a) the SQL you will generate, (b) the RLS policies needed, (c) which files will need type regeneration, (d) which components or API routes reference the affected tables. Present this plan before executing.
  1. Identify risks. Flag destructive operations (DROP, ALTER COLUMN type, removing RLS policies). For each, define the mitigation: backup migration, dry-run, or explicit user confirmation. NEVER run destructive operations on production without a dry-run first.
  1. Execute sequentially. Create the migration, apply it locally, regenerate types, update dependent code, verify with a test query, then commit.
  1. Summarize. Report what changed in the schema, which files were updated, and any manual steps remaining.

Do NOT skip this protocol. A bad migration on production can cause data loss.

Core Principles

  • Every schema change MUST be a migration file. Never modify the database directly.
  • All tables MUST have RLS enabled. No exceptions.
  • Use timestamptz for all timestamps (never timestamp).
  • All foreign keys should have explicit on delete behavior.
  • Generate TypeScript types after every schema change.
  • Migration filenames follow the format: YYYYMMDDHHMMSS_description.sql.

Creating Migrations

When the user describes a schema change:

  1. Analyze the request and determine the SQL needed.
  2. Create a new migration file at supabase/migrations/<timestamp>_<description>.sql.
  3. Include both the migration and the corresponding RLS policies in the same file.
  4. Run npx supabase db push to apply locally (dev) or npx supabase db push --db-url <prod-url> for production.
  5. Regenerate types: npx supabase gen types typescript --local > src/lib/supabase/types.ts.
  6. Commit the migration and types: git add supabase/ src/lib/supabase/types.ts && git commit -m "db: <description>".

RLS Policy Patterns

Use these standard patterns and adapt as needed:

Owner-only access

create policy "owner_select" on public.<table>
  for select using (auth.uid() = user_id);
create policy "owner_insert" on public.<table>
  for insert with check (auth.uid() = user_id);
create policy "owner_update" on public.<table>
  for update using (auth.uid() = user_id);
create policy "owner_delete" on public.<table>
  for delete using (auth.uid() = user_id);

Team-based access

create policy "team_select" on public.<table>
  for select using (
    exists (
      select 1 from public.team_members
      where team_members.team_id = <table>.team_id
      and team_members.user_id = auth.uid()
    )
  );

Public read, owner write

create policy "public_select" on public.<table>
  for select using (true);
create policy "owner_write" on public.<table>
  for all using (auth.uid() = user_id)
  with check (auth.uid() = user_id);

Edge Functions

When the user needs server-side logic that runs close to the database:

  1. Create the function: npx supabase functions new <function-name>.
  2. Write the function in supabase/functions/<function-name>/index.ts.
  3. Use Deno-style imports (Supabase Edge Functions run on Deno).
  4. Test locally: npx supabase functions serve <function-name>.
  5. Deploy: npx supabase functions deploy <function-name>.

Edge Function Template

import { serve } from "https://deno.land/std@0.177.0/http/server.ts";
import { createClient } from "https://esm.sh/@supabase/supabase-js@2";

serve(async (req) => {
  try {
    const supabase = createClient(
      Deno.env.get("SUPABASE_URL")!,
      Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!
    );

    // Your logic here

    return new Response(JSON.stringify({ success: true }), {
      headers: { "Content-Type": "application/json" },
      status: 200,
    });
  } catch (error) {
    return new Response(JSON.stringify({ error: error.message }), {
      headers: { "Content-Type": "application/json" },
      status: 500,
    });
  }
});

Type Generation

After any schema change, always run:

npx supabase gen types typescript --local > src/lib/supabase/types.ts

Then update any components or API routes that reference the changed tables to use the new types.

Common Operations

Add a new table

  1. Create migration with table definition + RLS.
  2. Regenerate types.
  3. Create a src/lib/supabase/<table-name>.ts helper with CRUD functions.

Add a column

  1. Create migration with ALTER TABLE.
  2. Regenerate types.
  3. Update relevant components/routes.

Create an index

  1. Create migration with CREATE INDEX CONCURRENTLY.
  2. No type regeneration needed.

Seed data

  1. Write seed SQL in supabase/seed.sql.
  2. Run with npx supabase db reset (dev only — this drops and recreates).

Safety Rules

  • NEVER run db reset on production.
  • NEVER use SUPABASE_SERVICE_ROLE_KEY in client-side code.
  • ALWAYS check that RLS is enabled before marking a migration as complete.
  • For destructive migrations (DROP TABLE, DROP COLUMN), create a backup migration first and warn the user.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

74.44%
按下载量换算13,750

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills