supabase/agent-skills

supabase

涉及 Supabase 时先查当前文档和项目约定

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

supabase 是什么?

Supabase 通用 Skill 覆盖数据库、Auth、Edge Functions、Realtime、Storage、向量、Cron、Queues、客户端库、CLI、MCP 和排错。它要求在实施前核对当前变更日志与官方文档,并在修改后做实际验证;具体项目操作要按仓库采用的工作流决定。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 任何涉及 Supabase 服务、客户端库、数据库 Schema、RLS、迁移、日志或报错定位的工程任务。
  • 项目使用 Supabase MCP 或 CLI,需要根据当前权限和项目配置安全执行。

这些情况不适合

  • 把 Supabase 文档查询结果冒充为目标项目已运行验证。
  • 未经授权直接连接生产项目执行迁移、修改权限、重启服务或删除数据。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 supabase,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 supabase

请在 Codex 的当前工作环境中安装并检查 supabase 这个 Skill。

项目身份:supabase/agent-skills / supabase
来源:https://github.com/supabase/agent-skills/blob/c9be0e931b7930f7d02126d04774d904c381e7d7/skills/supabase/SKILL.md
已定位的源文件:skills/supabase/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 说明项目引用与任务环境,先检查 Supabase changelog 中相关 breaking change,并根据当前问题使用官方文档 MCP、Markdown 文档或定向搜索。
  • 需要改工程时读取现有 Supabase 配置、锁文件和 schema 组织方式;生产操作还须确认项目、目标环境、备份与用户授权。

会得到什么

  • 经当前官方资料支持的实施步骤、受影响的配置或迁移,以及真实运行检查结果。

实际使用顺序

  1. 先定位任务类别和影响面,查近期变更日志中与该功能相关的 breaking change,再读取 Supabase 当前官方文档。
  2. 涉及 schema 时先检查仓库是否使用 supabase/schemas/ 或 schema_paths。若是 declarative workflow,先改声明式 schema 并生成、审阅 migration;否则遵循现有 migration 习惯。
  3. 修改前区分 Data API 权限与 RLS:表是否暴露、角色是否有 GRANT、策略能看哪些行是不同问题;不要用放宽 RLS 代替可访问性排查。
  4. 实施后按任务执行测试查询或项目测试,并查看必要日志;报告变更文件、目标环境和实际验证。若同一做法尝试2-3次失败,停止重复并重新查证。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:使用 Supabase Skill 只检查我本地仓库中 `profiles` 表 REST API 返回空结果的排查路径,不连接生产库、不执行 SQL。先读取本地 supabase 配置和 schema 文件,再查当前官方 Data API 与 RLS 文档,分别列出“未暴露/缺少 GRANT”和“RLS 行策略过滤”的区分证据;缺少资料时说明未知。
预期结果

预期得到基于仓库配置与当前官方文档的只读排查路径;本站未连接 Supabase 或执行 SQL。

使用前先看这些限制

使用条件与边界

  • Supabase 功能、CLI 配置和 API 持续变化;来源明确要求查 changelog 与当前文档,不能只依赖旧示例。
  • Data API table exposure/GRANT 与 RLS 的职责不同:授权用户访问表不自动决定可见行,RLS 也不能弥补角色完全无表权限。
  • 生产迁移、权限更改、读写查询和账户操作必须确认项目与执行范围;本页步骤不等于对某个真实 Supabase 项目的操作授权。
针对这个 Skill 的疑问

常见问题

SQL 创建的表为什么 REST API 查不到?

来源指出可能与 Data API 暴露设置或 anon/authenticated 角色缺少 GRANT 有关;这是表级可访问性问题,和 RLS 决定哪些行可见是不同层次。需要检查项目当前设置与策略。

数据库改动一定要手写 migration 吗?

先看项目是否使用 declarative schema。存在 supabase/schemas/ 或 schema_paths 时,来源要求编辑目标 schema 并生成、审阅 migration,不要从手写 migration 开始。

能把本 Skill 当成实时 Supabase 文档吗?

不能。它指引 Agent 查阅当前 changelog、文档和工具;具体接口参数与配置仍应以官方当前材料和项目版本为准。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-17T19:31:50.806Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/supabase/SKILL.md · 抓取时间 2026-11-17T19:31:50.806Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); debugging and troubleshooting errors or unexpected behavior on Supabase projects (HTTP errors, Postgres errors, RLS surprises, permission denied, schema cache issues, timeouts, Edge Function crashes, Realtime drops, Storage failures) and reading or querying logs (Logs Explorer, ClickHouse).

查看源文件章节 / Source sections
  • 原文:Supabase
  • 原文:Core Principles
  • 原文:Supabase CLI
  • 原文:Supabase MCP Server
  • 原文:Supabase Documentation
  • 原文:Making and Committing Schema Changes
  • 原文:Option A: Declarative schemas
  • 原文:Option B: Imperative migrations
  • 原文:Debugging
  • 原文:Reference Guides
原文:Core Principles

**1. Supabase changes frequently — verify against changelog and current docs before implementing.** Do not rely on training data for Supabase features. Function signatures, config.toml settings, and API conventions change between versions. First, fetch `https://supabase.com/changelog.md` (a lightweight summary index — not a heavy pull), scan for `breaking-change` tags relevant to your task, and follow the linked page for any that apply. Then look up the relevant topic using the documentation access methods below. **2. Verify your work.** After implementing any fix, run a test query to confirm the change works. A fix without verification is incomplete. **3. Recover from errors, don't loop.** If an approach fails after 2-3 attempts, stop and reconsider. Try a different method, check documentation, inspect the error more carefully, and review relevant logs when available. Supabase issues are not always solved by retrying the same command, and the answer is not always in the logs, but logs are often worth checking before proceeding. **4. Exposing tables to the Data API:** Depending on the user's [Data API settings](https://supabase.com/dashboard/project/<ref>/integrations/data_api/settings), newly created tables may not be automatically exposed via the Data (REST) API. If this is the case, `anon` and `authenticated` roles will need to be explicitly granted access. > Note that this is separate from RLS, which controls which _rows_ are visible once a table is accessible, not whether the table is accessible at all. When a user reports a SQL-created table is unexpectedly inaccessible, check their Data API settings and whether the roles have been granted access via explicit `GRANT` SQL. When granting public (`anon`/`authenticated`) access, always enable RLS too. See [Exposing a Table to the Data API](https://supabase.com/docs/guides/api/securing-your-api.md) for the full setup workflow.

本段为节选,完整内容见源文件。

原文:Supabase CLI

Always discover commands via `--help` — never guess. The CLI structure changes between versions. ```bash supabase --help # All top-level commands supabase <group> --help # Subcommands (e.g., supabase db --help) supabase <group> <command> --help # Flags for a specific command ``` **Supabase CLI Known gotchas:** - `supabase db query` requires **CLI v2.79.0+** → use MCP `execute_sql` or `psql` as fallback - `supabase db advisors` requires **CLI v2.81.3+** → use MCP `get_advisors` as fallback - The browser flow of `supabase login` creates a classic token with full account access. In CI, set `SUPABASE_ACCESS_TOKEN` to a scoped personal access token instead. It takes precedence over any saved login. Commands that connect with the database password (`--password` or `SUPABASE_DB_PASSWORD`, for example `supabase db push`) aren't limited by the token's permissions. - In imperative migration projects, create new hand-authored migration files with `supabase migration new <name>` first. Never invent a migration filename or rely on memory for the expected format. Declarative schema projects generate migrations from `supabase/schemas/`; see "Making and Committing Schema Changes" below. **Version check and upgrade:** Run `supabase --version` to check. For CLI changelogs and version-specific features, consult the [CLI documentation](https://supabase.com/docs/reference/cli/introduction) or [GitHub releases](https://github.com/supabase/cli/releases).

原文:Supabase MCP Server

For setup instructions, server URL, and configuration, see the [MCP setup guide](https://supabase.com/docs/guides/getting-started/mcp). **Troubleshooting connection issues** — follow these steps in order: 1. **Check if the server is reachable:** `curl -so /dev/null -w "%{http_code}" https://mcp.supabase.com/mcp` A `401` is expected (no token) and means the server is up. Timeout or "connection refused" means it may be down. 2. **Check `.mcp.json` configuration:** Verify the project root has a valid `.mcp.json` with the correct server URL. If missing, create one pointing to `https://mcp.supabase.com/mcp`. 3. **Authenticate the MCP server:** If the server is reachable and `.mcp.json` is correct but tools aren't visible, the user needs to authenticate. The Supabase MCP server uses OAuth 2.1 — tell the user to trigger the auth flow in their agent, complete it in the browser, and reload the session. In CI or other environments where the browser flow can't run, pass a scoped personal access token in the `Authorization: Bearer` header instead. 4. **Check scoped token permissions:** If a tool fails with "You do not have permission to perform this action" while using a scoped personal access token, the token lacks that tool's permission or the project is outside the token's scope. Check the tool's required permission in the [personal access tokens guide](https://supabase.com/docs/guides/platform/personal-access-tokens.md#mcp-tools).

原文:Supabase Documentation

Before implementing any Supabase feature, find the relevant documentation. Use these methods in priority order: 1. **MCP `search_docs` tool** (preferred — returns relevant snippets directly) 2. **Fetch docs pages as markdown** — any docs page can be fetched by appending `.md` to the URL path. 3. **Web search** for Supabase-specific topics when you don't know which page to look at.

原文:Making and Committing Schema Changes

First decide which schema workflow the project uses.

原文:Option A: Declarative schemas

Use this when `supabase/schemas/` exists or `config.toml` sets `schema_paths`. Edit the desired schema state in those files, then generate and review the migration. Do not start by hand-writing a migration. See the [Declarative database schemas guide](https://supabase.com/docs/guides/local-development/declarative-database-schemas).

文件 SHA256:697e0e949f97621c6fc1784169eb3ccbf673747d6bb8299a52962d3d84d93dc6

仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。

Skills.sh收录简介 · 2026-07-28

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识supabase
来源仓库supabase/agent-skills
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次128
快照累计安装量186418

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源