Supabase Skill: Enabling AI Assistants to Perform Full-Stack Development Following Supabase's Official Workflow

Introduction

When connecting Supabase with Cursor, Claude Code, or Copilot, the common problem is not “whether you can write SQL” but wrong context: RLS policies missing WITH CHECK, putting user_metadata into authorization logic, new tables not exposed to the Data API, or still using the deprecated auth.role(). Model training data often lags behind Supabase docs and changelogs, and a single set of prompts can hardly cover the entire product line including Database, Auth, Edge Functions, Realtime, and Storage.

Below is an introduction to the supabase Skill maintained by Supabase in the agent-skills repository (current manifest version 0.1.2, author: supabase). It encodes the workflow “check the changelog first, then the docs, verify after changes, run the security checklist” as process instructions that Agents can load, and automatically participates in decision-making for tasks involving Supabase.

What This Is

supabase is a comprehensive development Skill aimed at “any Supabase-related task,” following the Agent Skills Open Standard: the root directory contains SKILL.md (with name, description, metadata), and an optional references/ directory holds detailed references.

  • Maintainer: Supabase (official repository supabase/agent-skills).
  • Compatible environments: The documentation states compatibility with 18+ AI agents, including Claude Code, GitHub Copilot, Cursor, Cline, etc.; after installation, the Agent selects it automatically when it detects a relevant task.
  • Relationship with other Skills in the same repo: The same repo also contains supabase-postgres-best-practices (focusing on Postgres performance and schema); the official documentation recommends loading the postgres best-practices Skill first before making database changes such as table structure, migrations, RLS, and indexes. supabase covers a broader product surface and troubleshooting scenarios; the two can be used together.

Core Features

The Skill’s description and the trigger scope listed in the documentation are consistent, mainly including the following categories (all from the official SKILL and documentation).

Product Line and Integration

  • Products: Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues.
  • Clients and SSR: supabase-js, @supabase/ssr, and integrations with Next.js, React, SvelteKit, Astro, Remix, etc.
  • Platform tools: Supabase CLI, MCP server; schema changes, migrations, declarative schemas, security audits; Postgres extensions (such as pg_graphql, pg_cron, pg_vector).

Auth and Troubleshooting

  • Auth topics: login/logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS.
  • Debugging: HTTP/Postgres errors, unexpected RLS behavior, permission denied, schema cache, timeouts, Edge Function crashes, Realtime disconnections, Storage failures; consulting Logs Explorer, ClickHouse logs, etc.

Built-in Working Principles (SKILL.md Core Principles)

The official documentation fixes several execution principles in the Skill body, which the Agent is required to follow:

  1. Frequent changes, follow the docs and changelog
    Before implementing, first fetch https://supabase.com/changelog.md, pay attention to breaking-change entries related to the task, then consult the current documentation according to the Skill’s guidance; do not rely on the model’s outdated memory.

  2. Verify after making changes
    After fixing or implementing, run test queries (or equivalent verification); unverified work is considered unfinished.

  3. Don’t loop on failures
    If the same approach fails 2–3 times, switch methods, consult the documentation, and examine errors and logs carefully.

  4. Data API exposure and RLS
    Whether a new table is visible to the REST/Data API depends on the project’s Data API settings; anon / authenticated may need explicit GRANT. This is a two-layer issue separate from RLS (which controls visible rows). RLS should be enabled for tables in exposed schemas (default includes public), and policies should match the real access model, rather than applying the same auth.uid() template to every table.

  5. Security checklist
    When dealing with auth, RLS, views, Storage, and user data, the Skill requires checking common pitfalls item by item, for example:
    - Do not use user_metadata for JWT authorization decisions; authorization data should go into app_metadata;
    - Deleting a user does not immediately invalidate old access tokens;
    - Never expose service_role on the frontend; Management API / CLI / MCP should use scoped personal access tokens;
    - Views bypass RLS by default (Postgres 15+ supports security_invoker);
    - UPDATE requires a SELECT policy; auth.role() is deprecated and should be replaced with TO authenticated / TO anon in policies, and TO authenticated alone cannot substitute for row-level authorization;
    - UPDATE policies need both USING and WITH CHECK;
    - Use SECURITY DEFINER with caution; definer functions under public are callable by anon/authenticated by default.

(The Storage and other entries continue in the full SKILL.md; the Agent loads the full text after installation.)

Installation and Activation

The official recommendation is to install via the skills CLI; by default it installs at the project scope, making it easy for contributors and Cloud Agents to share the same Skill. Add --global for a global installation; add --all to install for all detected agents at once. See the Supabase AI Skills documentation for details.

Install only the supabase Skill

npx skills add supabase/agent-skills --skill supabase

Install all Skills in the repository

npx skills add supabase/agent-skills

Updating

npx skills update

You can update only specific Skills by name, e.g., npx skills update supabase (subject to the skills package documentation).

Claude Code plugin method (optional)

claude plugin marketplace add supabase/agent-skills
claude plugin install supabase@supabase-agent-skills

Combining with MCP

The documentation mentions that Agent Skills can be configured in one step together with the Supabase Plugin for AI Coding Agents (which includes an MCP server); refer to the AI Tools documentation and the Plugin instructions for specific steps.

After installation, the Skill is automatically available, no need to manually @ it in every conversation; the Agent selects it based on Supabase-related intent in the task description. The repository also builds dist/index.json through releases, served as a discovery index by https://supabase.com/.well-known/agent-skills/ (following the agent-skills .well-known specification).

Typical Usage

The following examples come from the Usage section of the official README / documentation, and can be given directly as natural-language tasks to an Agent with the Skill installed:

Help me set up Supabase Auth with Next.js
Review my schema for performance issues

(The latter is closer to supabase-postgres-best-practices; if both Skills are installed, the Agent can load them separately based on the task.)

Task examples that are more aligned with supabase itself:

Debug why my RLS policy returns zero rows on UPDATE
Add Edge Function and check logs when it crashes
Expose a new SQL table to the Data API with proper GRANT and RLS

In practice, you just describe the product module (Auth, Realtime, Storage, etc.), framework (such as Next.js + @supabase/ssr), and error symptoms; the Skill will push the Agent to consult the changelog first, then the official documentation, and run through the checklist for security-related changes.

Use Cases and Caveats

Who it’s for

  • Teams already using or planning to use Supabase as a BaaS (database + Auth + realtime + storage + Edge).
  • Scenarios where you want AI to write migrations, RLS, and SSR session code with Supabase’s official security and API exposure rules built in by default.
  • Developers using toolchains that support Agent Skills, such as Cursor, Claude Code, and Copilot.

Limitations and Caveats

  • The Skill is a carrier of processes and rules; it cannot replace your project configuration, key management, and production change reviews in the Dashboard.
  • Supabase iterates quickly: besides the changelog emphasized within the Skill, run npx skills update regularly.
  • For pure Postgres performance and deep schema optimization, the official also provides supabase-postgres-best-practices; before major table structure changes, it’s recommended to install both Skills together.
  • For automation involving the Management API, CLI, or MCP, use scoped personal access tokens per the documentation, and avoid handing full account privileges to scripts or Agents for long periods.

Conclusion

The supabase Skill consolidates the entire Supabase product line and common pitfalls (especially RLS, Data API, and Auth JWT) into official guidance that Agents can execute, making it suitable as the default context when working with Supabase projects. Installation commands and instructions are subject to the Supabase documentation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye