supabase-multi-env-setup
Configure Supabase across development, staging, and production environments.Use when setting up multi-environment deployments, configuring per-environment secrets,or implementing environment-specific Supabase configurations.Trigger with phrases like "supabase environments", "supabase staging","supabase dev prod", "supabase environment setup", "supabase config by env".
When & Why to Use This Skill
This Claude skill automates the complex process of configuring Supabase across development, staging, and production environments. It streamlines multi-environment deployments by implementing environment detection logic, secure secret management (via Vault, AWS, or GCloud), and production safeguards, ensuring a robust and scalable database infrastructure for modern web applications.
Use Cases
- Multi-Stage Environment Setup: Creating isolated Supabase configurations for development, staging, and production to ensure safe testing and deployment cycles.
- Secure Secret Management: Integrating Supabase API keys and database credentials with enterprise-grade secret managers like AWS Secrets Manager or HashiCorp Vault.
- CI/CD Pipeline Integration: Automating the injection of environment-specific variables and connection strings into automated deployment workflows.
- Production Guardrail Implementation: Establishing environment-specific safeguards and detection logic to prevent accidental operations or data loss in production environments.
| name | supabase-multi-env-setup |
|---|---|
| description | | |
| allowed-tools | Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*) |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Supabase Multi Env Setup
Prerequisites
- Separate Supabase accounts or API keys per environment
- Secret management solution (Vault, AWS Secrets Manager, etc.)
- CI/CD pipeline with environment variables
- Environment detection in application
Instructions
Step 1: Create Config Structure
Set up the base and per-environment configuration files.
Step 2: Implement Environment Detection
Add logic to detect and load environment-specific config.
Step 3: Configure Secrets
Store API keys securely using your secret management solution.
Step 4: Add Environment Guards
Implement safeguards for production-only operations.
Output
- Multi-environment config structure
- Environment detection logic
- Secure secret management
- Production safeguards enabled
Error Handling
See {baseDir}/references/errors.md for comprehensive error handling.
Examples
See {baseDir}/references/examples.md for detailed examples.