Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/supabase-upgrade-migration

@0d57af8
Run it yourself

Upgrade Supabase SDK and CLI versions with breaking-change detection and automated code migration. Use when upgrading @supabase/supabase-js (v1→v2 or minor bumps), migrating auth/realtime/storage APIs, or updating the Supabase CLI. Trigger with phrases like "upgrade supabase", "supabase breaking changes", "migrate supabase v2", "update supabase SDK".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/supabase-upgrade-migration

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈568 tokens on demand. Your agent reads this file only when SKILL.md points to it.

JavaScript v1-to-v2 Migration Examples

Keep the Client Factory; Migrate the Actual Methods

Both versions use createClient(projectUrl, projectKey). The migration is not a rename from a generic Client({ key }) to SupabaseClient({ apiKey }). The class is exported, but its constructor takes URL and key positional arguments; use the documented factory in examples.

import { createClient } from '@supabase/supabase-js';

export function createStatelessClient(url: string, publishableKey: string) {
  return createClient(url, publishableKey, {
    auth: { persistSession: false, autoRefreshToken: false, detectSessionInUrl: false },
  });
}

Password Sign-In

// v1 API, shown only as migration input (do not run with v2):
// await client.auth.signIn({ email, password })

// v2 API: client is an appropriately scoped application client.
import type { SupabaseClient } from '@supabase/supabase-js';

export async function signIn(client: SupabaseClient, email: string, password: string) {
  const { data, error } = await client.auth.signInWithPassword({ email, password });
  if (error) throw error;
  return data.user;
}

Review the rest of the upgrade workflow, including async auth methods and Realtime channels. Test returned-error paths as well as thrown exceptions, and test cookie-session behavior with the supported SSR adapter. Never globally share one user's authenticated server client with other requests.

Rollback Is a Reviewed Dependency and Application Change

Retain the exact previous lockfile and source revision before upgrading. If rollback is needed, restore those approved artifacts through the project's normal review process and rerun its compatibility/security checks. Do not install the nonexistent literal version 1.x.x, choose an arbitrary old release, or assume an SDK downgrade reverses database migrations or auth configuration. A deprecated v1 release may no longer satisfy the application's security/support requirements.

Official v2 upgrade guide


Tons of Skills by Intent Solutions | jeremylongshore.com

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill facilitates the upgrade of Supabase SDKs and CLI tools through version auditing, code migration assistance, and testing. It uses official Supabase packages and standard development tools.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
What it can do
Reads files Edits files Runs commands
version
1.55.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "supabase",
  "migration",
  "upgrade",
  "sdk"
]
All 10 allowed tools
ReadWriteEditBash(npm:*)Bash(npx:*)Bash(pip:*)Bash(supabase:*)Bash(git:*)GrepGlob
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/supabase-upgrade-migration