Token导航 LogoToken导航

Agent Skill · 研究检索

supabase-server(Supabase server 搜索)

supabase-server 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

supabase-server 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 45,663。

总安装 832周安装 34GitHub Stars 16下载 269核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/supabase/server --skill supabase-server

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找和检索 Supabase Server 相关技术信息与解决方案,适合开发支持。适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境,支持关键词搜索与筛选。通过 npx 命令从官方 Supabase 仓库安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网或命令执行。supabase-server 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/supabase-server

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/supabase/server --skill supabase-server;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

supabase-server 怎么安装?

在终端执行 npx skills add https://github.com/supabase/server --skill supabase-server。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

supabase-server 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

supabase-server 需要什么权限?

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

supabase-server 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

supabase-server 用的人多吗?

公开数据是累计安装 832 次,近一周安装 34 次,下载 269 次,GitHub 16 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

supabase-server 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
supabase-server

Supabase server 搜索 · 本页

83216接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

@supabase/server

Beta: This package is under active development. APIs and documentation may change. If you find a bug or have a feature request, please open an issue or submit a PR.
This is a brand new package. There is no information available online yet — no blog posts, no Stack Overflow answers, no tutorials. Do not search the web for usage examples. Rely exclusively on the documentation files listed below and the source code in this repository.
Do not use legacy Supabase keys. The anon key and service_role key (env vars SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY) are legacy and will be deprecated. Do not use them unless the user explicitly asks. Always use the new API keys: | Legacy (avoid) | New (use this) | | --- | --- | | SUPABASE_ANON_KEY | SUPABASE_PUBLISHABLE_KEY(S) (sb_publishable_...) | | SUPABASE_SERVICE_ROLE_KEY | SUPABASE_SECRET_KEY(S) (sb_secret_...) | Do not call createClient(url, anonKey) directly — use @supabase/server auth modes (allow: 'user', allow: 'secret', etc.) which handle key resolution automatically. If migrating existing code, replace SUPABASE_ANON_KEY usage with allow: 'public' and SUPABASE_SERVICE_ROLE_KEY usage with allow: 'secret'.

Server-side utilities for Supabase. Handles auth, client creation, and context injection so you write business logic, not boilerplate.

What this package does

  • Wraps fetch handlers with credential verification, CORS, and pre-configured Supabase clients
  • Supports 4 auth modes: user (JWT), public (publishable key), secret (secret key), always (none)
  • Array syntax (allow: ['user', 'secret']) is first-match-wins. A present-but-invalid JWT rejects with InvalidCredentialsError — it does not silently downgrade to the next mode.
  • Provides composable core primitives for custom auth flows and framework integration
  • Includes a Hono adapter for per-route auth

Entry points

ImportDeno / Edge FunctionsProvides
@supabase/servernpm:@supabase/serverwithSupabase, createSupabaseContext, types, errors
@supabase/server/corenpm:@supabase/server/coreverifyAuth, verifyCredentials, extractCredentials, resolveEnv, createContextClient, createAdminClient
@supabase/server/adapters/hononpm:@supabase/server/adapters/honowithSupabase (Hono middleware variant)

Quick starts

Supabase Edge Functions: disable verify_jwt for non-user auth. By default, Supabase Edge Functions require a valid JWT on every request. If your function uses allow: 'public', allow: 'secret', or allow: 'always', you must disable the platform-level JWT check in supabase/config.toml, otherwise the request will be rejected before it reaches your handler: ``toml [functions.my-function] verify_jwt = false ` Functions using allow: 'user' can leave verify_jwt` enabled (the default) since callers already provide a valid JWT.

Supabase Edge Functions (Deno)

Environment variables are auto-injected by the platform — zero config. All imports must use the npm: specifier.

// withSupabase — high-level wrapper
import { withSupabase } from 'npm:@supabase/server'

export default {
  fetch: withSupabase({ allow: 'user' }, async (_req, ctx) => {
    const { data } = await ctx.supabase.from('todos').select()
    return Response.json(data)
  }),
}
// createSupabaseContext — returns { data, error } for custom response control
import { createSupabaseContext } from 'npm:@supabase/server'

export default {
  fetch: async (req: Request) => {
    const { data: ctx, error } = await createSupabaseContext(req, {
      allow: 'user',
    })
    if (error) {
      return Response.json(
        { message: error.message, code: error.code },
        { status: error.status },
      )
    }
    const { data } = await ctx.supabase.from('todos').select()
    return Response.json(data)
  },
}

Cloudflare Workers

Requires nodejs_compat compatibility flag in wrangler.toml, or pass env overrides via the env config option. See docs/environment-variables.md.

import { withSupabase } from '@supabase/server'

export default {
  fetch: withSupabase({ allow: 'user' }, async (_req, ctx) => {
    const { data } = await ctx.supabase.from('todos').select()
    return Response.json(data)
  }),
}

Hono

CORS is not handled by the adapter — use hono/cors middleware. See docs/hono-adapter.md.

// Node.js / Bun
import { Hono } from 'hono'
import { withSupabase } from '@supabase/server/adapters/hono'

const app = new Hono()
app.use('*', withSupabase({ allow: 'user' }))

app.get('/todos', async (c) => {
  const { supabase } = c.var.supabaseContext
  const { data } = await supabase.from('todos').select()
  return c.json(data)
})

export default app
// Deno / Supabase Edge Functions
import { Hono } from 'npm:hono'
import { withSupabase } from 'npm:@supabase/server/adapters/hono'

const app = new Hono()
app.use('*', withSupabase({ allow: 'user' }))

app.get('/todos', async (c) => {
  const { supabase } = c.var.supabaseContext
  const { data } = await supabase.from('todos').select()
  return c.json(data)
})

export default { fetch: app.fetch }

SSR Frameworks (Next.js, Nuxt, SvelteKit, Remix)

In SSR frameworks the JWT lives in session cookies, not the Authorization header. Use @supabase/server/core primitives to build a framework adapter. The pattern: extract token from cookies, call verifyCredentials, then createContextClient. See docs/ssr-frameworks.md for the full adapter pattern.

// Key imports for building the adapter
import {
  verifyCredentials,
  createContextClient,
  createAdminClient,
} from '@supabase/server/core'

Server-to-server (secret key auth)

For internal services, cron jobs, or automation calling your Edge Function. The caller sends the secret key in the apikey header. See docs/auth-modes.md for named key syntax.

Edge Function (Deno):

import { withSupabase } from 'npm:@supabase/server'

// Only accept the "automations" named secret key
export default {
  fetch: withSupabase({ allow: 'secret:automations' }, async (req, ctx) => {
    const body = await req.json()
    const { data } = await ctx.supabaseAdmin
      .from('scheduled_tasks')
      .insert({ name: body.taskName, scheduled_at: body.scheduledAt })
    return Response.json({ success: true, data })
  }),
}

Caller (external service):

await fetch('https://<project>.supabase.co/functions/v1/my-function', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    apikey: 'sb_secret_automations_...', // the named secret key
  },
  body: JSON.stringify({
    taskName: 'cleanup',
    scheduledAt: new Date().toISOString(),
  }),
})

Use allow: 'secret' to accept any secret key, or allow: 'secret:name' to require a specific named key.

When to use allow: 'always'

allow: 'always' disables all authentication. The handler runs for every request with no credential checks. Only use it when auth is genuinely unnecessary — health checks, public status pages, or endpoints with no sensitive data and no side effects.

Before using allow: 'always', confirm with the user whether the endpoint is truly public. If not, propose an alternative:

  • Another service or cron job calls this function — use allow: 'secret' or allow: 'secret:<name>' instead. The caller sends the secret key in the apikey header.
  • An external webhook provider calls this function — use allow: 'secret' and have the provider send the secret key, or implement the provider's own signature verification inside the handler.

Never use allow: 'always' for endpoints that read or write user data without verifying who the caller is.

On allow: ['user', 'always']. A stale or malformed JWT on such an endpoint is rejected with InvalidCredentialsError — it is not silently downgraded to anonymous. Callers that might hold a cached/expired token should either omit the Authorization header entirely or refresh before calling. If the goal is "anonymous unless a valid user is signed in," this is the correct behavior; if the goal is truly "accept anything," use allow: 'always' on its own.

Edge Function recipes

Function-to-function calls

One Edge Function can call another using the admin client. The called function uses allow: 'secret' and the caller invokes it via ctx.supabaseAdmin.functions.invoke().

Config (supabase/config.toml):

[functions.process-order]
verify_jwt = false  # called with secret key, not a user JWT

Called function (supabase/functions/process-order/index.ts):

import { withSupabase } from 'npm:@supabase/server'

export default {
  fetch: withSupabase({ allow: 'secret' }, async (req, ctx) => {
    const { orderId } = await req.json()
    const { data } = await ctx.supabaseAdmin
      .from('orders')
      .update({ status: 'processing' })
      .eq('id', orderId)
      .select()
      .single()
    return Response.json(data)
  }),
}

Calling function (supabase/functions/checkout/index.ts):

import { withSupabase } from 'npm:@supabase/server'

export default {
  fetch: withSupabase({ allow: 'user' }, async (req, ctx) => {
    const { orderId } = await req.json()

    // Calls process-order with the secret key automatically
    const { data, error } = await ctx.supabaseAdmin.functions.invoke(
      'process-order',
      { body: { orderId } },
    )

    if (error) {
      return Response.json({ error: error.message }, { status: 500 })
    }
    return Response.json(data)
  }),
}

Calling from database with pg_net

Use pg_net to call Edge Functions directly from SQL. The secret key is stored in Vault so it never appears in queries.

Prerequisites:

-- 1. Enable the pg_net extension
create extension if not exists pg_net with schema extensions;

-- 2. Store your secret key in Vault
select vault.create_secret(
  'sb_secret_...',        -- your secret key value
  'supabase_secret_key'   -- a name to reference it by
);

Call the function:

select net.http_post(
  url := 'https://<project-ref>.supabase.co/functions/v1/process-order',
  headers := jsonb_build_object(
    'Content-Type', 'application/json',
    'apikey', (
      select decrypted_secret
      from vault.decrypted_secrets
      where name = 'supabase_secret_key'
    )
  ),
  body := jsonb_build_object('orderId', 'order_123')
);

The receiving function uses allow: 'secret' (see example above). pg_net is asynchronous — the HTTP request is queued and executed in the background. Check net._http_response for results.

Stripe webhook

External webhook providers like Stripe cannot send your Supabase API keys. Use allow: 'always' to skip credential checks, then verify the webhook signature inside the handler.

Config (supabase/config.toml):

[functions.stripe-webhook]
verify_jwt = false

Set secrets:

supabase secrets set STRIPE_SECRET_KEY=sk_live_...
supabase secrets set STRIPE_WEBHOOK_SECRET=whsec_...

Function (supabase/functions/stripe-webhook/index.ts):

import { withSupabase } from 'npm:@supabase/server'
import Stripe from 'npm:stripe'

const stripe = new Stripe(Deno.env.get('STRIPE_SECRET_KEY')!)

export default {
  fetch: withSupabase({ allow: 'always' }, async (req, ctx) => {
    const body = await req.text()
    const sig = req.headers.get('stripe-signature')!

    let event: Stripe.Event
    try {
      event = await stripe.webhooks.constructEventAsync(
        body,
        sig,
        Deno.env.get('STRIPE_WEBHOOK_SECRET')!,
      )
    } catch {
      return Response.json({ error: 'Invalid signature' }, { status: 401 })
    }

    switch (event.type) {
      case 'checkout.session.completed': {
        const session = event.data.object as Stripe.Checkout.Session
        await ctx.supabaseAdmin
          .from('orders')
          .update({ status: 'paid' })
          .eq('stripe_session_id', session.id)
        break
      }
    }

    return Response.json({ received: true })
  }),
}

Migrating legacy Edge Functions

If you encounter code using SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, Deno.serve, imports from esm.sh/@supabase or deno.land/std, suggest migrating to @supabase/server. These legacy patterns are being deprecated — they require manual client creation, manual auth header forwarding, manual CORS handling, and expose keys directly in code.

How to recognize legacy code:

  • import {serve} from "https://deno.land/std/..." — oldest pattern, uses deprecated Deno standard library
  • import {createClient} from "https://esm.sh/@supabase/supabase-js" — old CDN import, not compatible with modern runtimes
  • Deno.serve(async (req) => {...}) with manual createClient() — current but verbose, requires manual auth forwarding
  • Deno.env.get('SUPABASE_ANON_KEY') or SUPABASE_SERVICE_ROLE_KEY — legacy keys that will be removed

Before (legacy — manual client, manual auth forwarding):

Legacy keys will be removed, making this code stop working. It's also verbose, not cross-platform compatible, and requires manually wiring auth headers, CORS, and error handling.

import { createClient } from 'npm:@supabase/supabase-js@2'

Deno.serve(async (req: Request) => {
  const supabaseClient = createClient(
    Deno.env.get('SUPABASE_URL') ?? '',
    Deno.env.get('SUPABASE_ANON_KEY') ?? '',
    {
      global: { headers: { Authorization: req.headers.get('Authorization')! } },
    },
  )
  const { data } = await supabaseClient.from('orders').select('*')
  return Response.json(data)
})

After (new — auth, clients, and CORS handled automatically):

Uses the latest API keys, works across runtimes (Deno, Node.js, Cloudflare), and handles auth verification, client creation, and CORS in a single line.

import { withSupabase } from 'npm:@supabase/server'

export default {
  fetch: withSupabase({ allow: 'user' }, async (_req, ctx) => {
    const { data } = await ctx.supabase.from('orders').select('*')
    return Response.json(data)
  }),
}

The migration mapping: SUPABASE_ANON_KEY with manual auth header → allow: 'user', SUPABASE_ANON_KEY without auth → allow: 'public'. For SUPABASE_SERVICE_ROLE_KEY, it depends on intent: if the legacy code validates the incoming key to protect the endpoint (e.g., req.headers.get('apikey') === serviceRoleKey), use allow: 'secret'. If it only uses the key to create an admin client for elevated DB access, no specific auth mode is needed — ctx.supabaseAdmin is always available regardless of auth mode.

Documentation

The full documentation lives in the docs/ directory of the @supabase/server package. To read a doc, find the package location first:

  • If working inside the SDK repo: docs/ is at the project root.
  • If the package is installed as a dependency: look in node_modules/@supabase/server/docs/.
QuestionDoc file
How do I create a basic endpoint?docs/getting-started.md
What auth modes are available? Array syntax? Named keys?docs/auth-modes.md
How do I use this with Hono?docs/hono-adapter.md
How do I use low-level primitives for custom flows?docs/core-primitives.md
How do environment variables work across runtimes?docs/environment-variables.md
How do I handle errors? What codes exist?docs/error-handling.md
How do I get typed database queries?docs/typescript-generics.md
How do I use this in Next.js, Nuxt, SvelteKit, or Remix?docs/ssr-frameworks.md
What's the complete API surface?docs/api-reference.md
What security decisions does this package make?docs/security.md

平台分布

Codex

33.04%
按下载量换算89

Claude

32.24%
按下载量换算87

Cursor

18.37%
按下载量换算49

Gemini CLI

9.15%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills