managing-supabase
Supabase CLI for database management, Edge Functions, migrations, and local development. Use for managing Postgres databases, deploying serverless functions, and debugging Supabase projects.
What this skill does
# Supabase CLI Skill ## Table of Contents 1. [Quick Reference](#quick-reference) 2. [Critical: Avoiding Interactive Mode](#critical-avoiding-interactive-mode) 3. [Prerequisites](#prerequisites) 4. [Authentication](#authentication) 5. [CLI Decision Tree](#cli-decision-tree) 6. [Essential Commands](#essential-commands) 7. [Local Development Ports](#local-development-ports) 8. [Common Workflows](#common-workflows) 9. [Error Handling](#error-handling) 10. [Auto-Detection Triggers](#auto-detection-triggers) 11. [Agent Integration](#agent-integration) 12. [Quick Reference Card](#quick-reference-card) 13. [Further Reading](#further-reading) --- ## Quick Reference Supabase CLI enables local development, database migrations, Edge Functions deployment, and project management for Supabase projects. --- ## Critical: Avoiding Interactive Mode **Supabase CLI can enter interactive mode which will hang Claude Code.** Always use flags to bypass prompts: | Command | WRONG (Interactive) | CORRECT (Non-Interactive) | |---------|---------------------|---------------------------| | Login | `supabase login` | Use `SUPABASE_ACCESS_TOKEN` env var | | Link project | `supabase link` | `supabase link --project-ref <ref>` | | Create project | `supabase projects create` | `supabase projects create <name> --org-id <id> --region <region>` | | Start local | `supabase start` | `supabase start` (non-interactive by default) | | Deploy functions | `supabase functions deploy` | `supabase functions deploy <name> --project-ref <ref>` | **Never use in Claude Code**: - `supabase login` without token (opens browser) - Any command without `--project-ref` when not linked - Interactive prompts for organization/region selection **Always include**: - `SUPABASE_ACCESS_TOKEN` environment variable for authentication - `--project-ref` flag or pre-linked project - Explicit flags for all configuration options --- ## Prerequisites ### Installation Verification ```bash supabase --version # Expected: 2.x.x or higher ``` ### Installation Methods ```bash # npm (requires Node.js 20+) npm install -g supabase # Homebrew (macOS/Linux) brew install supabase/tap/supabase # Scoop (Windows) scoop bucket add supabase https://github.com/supabase/scoop-bucket.git scoop install supabase ``` --- ## Authentication ### Environment Variables (CI/CD Required) | Variable | Purpose | Required For | |----------|---------|--------------| | `SUPABASE_ACCESS_TOKEN` | Personal access token | All remote operations | | `SUPABASE_DB_PASSWORD` | Database password | `db push`, `db pull`, `link` | | `SUPABASE_PROJECT_ID` | Project reference string | Linking without interactive prompt | ### Token Generation Generate tokens at: `https://supabase.com/dashboard/account/tokens` ### Authentication Pattern for Claude Code ```bash # Set from project .env file export SUPABASE_ACCESS_TOKEN="$(grep SUPABASE_ACCESS_TOKEN .env | cut -d= -f2)" export SUPABASE_DB_PASSWORD="$(grep SUPABASE_DB_PASSWORD .env | cut -d= -f2)" # All commands will use these automatically supabase projects list supabase link --project-ref <ref> ``` --- ## CLI Decision Tree ### What do you need to do? ``` Project Setup ├── Initialize local project ──────────► supabase init ├── Link to remote project ────────────► supabase link --project-ref <ref> ├── Start local stack ─────────────────► supabase start ├── Stop local stack ──────────────────► supabase stop └── Check status ──────────────────────► supabase status Database Operations ├── Create migration ──────────────────► supabase migration new <name> ├── Apply migrations locally ──────────► supabase db reset ├── Push migrations to remote ─────────► supabase db push ├── Pull remote schema ────────────────► supabase db pull ├── Diff local vs remote ──────────────► supabase db diff --linked └── Lint database schema ──────────────► supabase db lint Edge Functions ├── Create new function ───────────────► supabase functions new <name> ├── Serve locally ─────────────────────► supabase functions serve ├── Deploy function ───────────────────► supabase functions deploy <name> ├── List deployed functions ───────────► supabase functions list └── Delete function ───────────────────► supabase functions delete <name> Secrets Management ├── Set secret ────────────────────────► supabase secrets set NAME=value ├── Set from file ─────────────────────► supabase secrets set --env-file .env ├── List secrets ──────────────────────► supabase secrets list └── Remove secret ─────────────────────► supabase secrets unset NAME Type Generation ├── Generate TypeScript types ─────────► supabase gen types typescript --linked └── Generate from local ───────────────► supabase gen types typescript --local Debugging ├── View container logs ───────────────► supabase logs (local) ├── Check slow queries ────────────────► supabase inspect db outliers └── View blocking queries ─────────────► supabase inspect db blocking ``` > For complete command reference including storage, project management, and all inspection commands, see [REFERENCE.md](REFERENCE.md). --- ## Essential Commands ### Project Setup | Command | Description | Key Flags | |---------|-------------|-----------| | `supabase init` | Initialize local project | `--workdir` | | `supabase start` | Start local development stack | `-x` (exclude services) | | `supabase stop` | Stop local stack | `--no-backup` | | `supabase status` | Show local container status | - | | `supabase link` | Link to remote project | `--project-ref <ref>` (required) | ### Database Commands | Command | Description | Key Flags | |---------|-------------|-----------| | `supabase db reset` | Reset local database | - | | `supabase db push` | Push migrations to remote | `--dry-run`, `--include-seed` | | `supabase db pull` | Pull schema from remote | `--schema <name>` | | `supabase db diff` | Diff schema changes | `--linked`, `--local`, `-f <name>` | | `supabase db lint` | Lint for schema errors | `--linked`, `--level <warning\|error>` | ### Migration Commands | Command | Description | Key Flags | |---------|-------------|-----------| | `supabase migration new` | Create new migration | `<name>` (required) | | `supabase migration list` | List migration history | `--db-url <url>` | | `supabase migration up` | Apply pending migrations | `--local`, `--linked` | ### Edge Functions Commands | Command | Description | Key Flags | |---------|-------------|-----------| | `supabase functions new` | Create new function | `<name>` (required) | | `supabase functions serve` | Serve locally | `--env-file <path>` | | `supabase functions deploy` | Deploy function(s) | `--no-verify-jwt`, `--project-ref` | | `supabase functions delete` | Delete function | `<name>` (required) | ### Secrets Commands | Command | Description | Key Flags | |---------|-------------|-----------| | `supabase secrets set` | Set secret(s) | `NAME=value`, `--env-file <path>` | | `supabase secrets list` | List secrets | `--project-ref` | | `supabase secrets unset` | Remove secret(s) | `<NAME>` | > For type generation, database inspection, storage, and project management commands, see [REFERENCE.md](REFERENCE.md#complete-command-reference). --- ## Local Development Ports | Service | Port | URL | |---------|------|-----| | API Gateway | 54321 | `http://localhost:54321` | | Database | 54322 | `postgresql://postgres:postgres@localhost:54322/postgres` | | Studio | 54323 | `http://localhost:54323` | | Inbucket (Email) | 54324 | `http://localhost:54324` | --- ## Common Workflows ### 1. Initialize New Project ```bash # Create local project structure supabase init # Link to existing remote project export SUPABASE_ACCESS_TOKEN="your-token" supabase link --project-ref <project-ref> # Start local development supabase start ``` ### 2. Create and Apply Migrations ```bash # Create new migration supabase migration new add_users_table # Edit migration file at supabase/migrations/<timestamp>_add_users_table.sql # Apply locally supabase db reset
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.