upgrade-supabase

upgrade-supabase is a skill for Claude Code, Codex from Phaedra-Solutions/cursor-rules. It costs 121 tokens per session (2,408 once invoked), scanned A, original, MIT.

A procedure for replacing deprecated Supabase project keys and older Edge Function dependency setups. Supabase is a hosted database and application platform; Edge Functions are small server-side programs that run there.

In plain words
What is it for?
Use it to replace anon and service-role keys, update environment variables and headers, revise Edge Functions, test the changes, and deactivate the old keys.
Why use it?
It helps move clients, jobs, webhooks, and functions without leaving some components on old credentials or incompatible imports. It also includes checks and staged environment changes to reduce the chance of breaking a live project.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to replace anon and service-role keys, update environment variables and headers, revise Edge Functions, test the changes, and deactivate the old keys.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/phaedra-solutions/cursor-rules/upgrade-supabase
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Phaedra-Solutions/cursor-rules --skill upgrade-supabase
Clone the repo
git clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upgrade-supabase

README.md
[![agentmods](https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-supabase/github.svg)](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-supabase)
Your own site
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-supabase"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-supabase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upgrade-supabase

Your own site · 80×15
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-supabase"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-supabase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,408 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00121 $0.02408
Opus 5.5 $0.00048 $0.00963
Sonnet 5.5 $0.00024 $0.00482
Haiku 4.5 $0.00012 $0.00241

Measured 3d ago against content hash a58e2302c642, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

upgrade-supabase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/upgrade-supabase/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Upgrade Supabase

When to use

  • The project uses the legacy anon/service_role keys (deprecated by the end of 2026), import_map.json or URL imports in Edge Functions.
  • The user asks to harden a Supabase project or clear Security Advisor findings.

Parts A, B and C are independent. Do them in that order unless the user picks one; each ends with Verify.

Before you start

  • Read the CLI version and the supabase-js, @supabase/ssr and @supabase/server versions; list every client of the project: web apps, mobile apps (and which builds are still in use), servers, workers, CI jobs, Edge Functions, Database Webhooks, pg_net/cron jobs, and third-party integrations.
  • The working tree must be clean; work on a branch. Never apply anything to production from this session.
  • Ask the user:
    • which environments exist (local, preview branches, staging, production) and the order to migrate them (always staging first);
    • who can create and deactivate keys in the Dashboard (Owner or Administrator) and who sets production secrets;
    • whether old mobile builds must keep working (they hold the anon key until users update);
    • whether network installs are approved (core/supply-chain cooldown applies to new npm: versions).
  • Never print, log or paste key values into chat, commits or files. Refer to them by variable name.

Steps

Part A: publishable and secret keys

  1. Inventory. List every place each legacy key is used, with file and line:

    git grep -nE "SUPABASE_ANON_KEY|SUPABASE_SERVICE_ROLE_KEY|ANON_KEY|SERVICE_ROLE|service_role" -- ':!*.md'
    git grep -nE "net\.http_post|Authorization.*Bearer" -- 'supabase/**/*.sql'
    

    Also ask about Dashboard-configured Database Webhooks and cron jobs, which aren't in the repo. If a service_role key appears in client code, stop and tell the user to treat it as leaked (secrets-scan skill).

  2. Create keys. The user creates publishable and secret keys in Dashboard → Settings → API Keys. Legacy keys keep working alongside. Suggest one named secret key per backend service (default, billing, worker) so each rotates alone.

  3. Clients (publishable key). Replace the anon key with the publishable key in browser, mobile, desktop and CLI config (NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY or the project's naming). RLS behaves the same. Ship mobile releases early; old builds keep working until the legacy keys are deactivated.

  4. Servers (secret key). Replace the service-role key with a secret key in server-only env vars and the secret manager. Confirm the admin client lives in a server-only module. Secret keys return 401 when sent from a browser.

  5. Edge Functions.

    • Read keys from SUPABASE_SECRET_KEYS / SUPABASE_PUBLISHABLE_KEYS (JSON objects keyed by name):

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 130 lines · 121 tokens per session scan A a58e2302c642

Subscribe to this mod's changes

upgrade-supabase is a skill published in the GitHub repository Phaedra-Solutions/cursor-rules (4 stars, last pushed 2d ago), licensed MIT. It adds 121 tokens to every session and 2,408 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-01.