This skill helps you implement and manage Supabase CLI environments across development, preview, and production with secure variable handling.
npx playbooks add skill mildtomato/agent-skills --skill supabase-environments
Internal development guide for AI agents building the Supabase CLI
environments system. This skill covers the three-environment model (development,
preview, production), variable resolution, pull/push workflows, secret handling,
branch-to-environment mapping, local file structure, and environment CRUD
operations.
Original specification by: [Julien Goux](https://github.com/jgoux) (jgoux)
> Note: This skill is for Supabase internal development. Use when
> implementing the supabase env CLI subsystem or building the environments
> infrastructure.
Reference these guidelines when:
env CLI commands (pull, push, list, set, unset, create, delete,seed)
.env and .env.local file structuresyntax) systems
Rules are organized by impact level and implementation priority:
| Priority | Category | Impact | Prefix | Count |
| -------- | ---------------- | -------- | ------------- | ----- |
| 1 | Core Model | CRITICAL | model- | 3 |
| 2 | Security | CRITICAL | security- | 2 |
| 3 | Pull Workflow | HIGH | pull- | 2 |
| 4 | Push Workflow | HIGH | push- | 3 |
| 5 | Variable System | HIGH | variables- | 2 |
| 6 | Local Files | HIGH | local- | 2 |
| 7 | Branch Overrides | MEDIUM | branches- | 1 |
| 8 | Environment CRUD | MEDIUM | envs- | 2 |
| 9 | Transition | MEDIUM | transition- | 1 |
(development/preview/production cannot be deleted or renamed)
(independent sets, no fallback chains)
in branch mapping, used exclusively by cli dev)
variables (no hardcoded secrets in config.json)
from pull/list, @secret annotation, interactive prompt on push)
existing .env)
automatically (server-side resolution, client gets final values)
(additions/changes/removals with confirmation)
(use env set --branch for overrides)
(single PUT request)
paths (SUPABASE\_ prefix, path-to-underscore)
(user variables, canonical name overrides)
.env.local, no per-environment files)
priority
per-branch (set individually, not bulk)
(interactive review)
project (local-first to remote-first)
output and UX patterns
npm run build)Agents should start with rules for immediate guidance, then consult references
when deeper architectural understanding is needed.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.