environments

Separate development and production resources, track configuration changes, and manage secrets across environments.

579|76|Updated Oct 29, 2026
Ready to run
npx skills add https://github.com/phuryn/product-engineering --skill environments-phuryn
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: environments
Source: https://github.com/phuryn/product-engineering/tree/main/app-stack/skills/environments
Command: npx skills add https://github.com/phuryn/product-engineering --skill environments-phuryn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Production outages, leaked credentials, and inconsistent deployments stem from mixing development and production resources, losing track of which database or API key each environment uses, and applying migrations without coordinating with deployed code. This Skill prevents those failures by establishing strict separation, recording every verified mapping, and timing schema changes safely. ## Core Features & Use Cases - Environment Inventory: Document which database, identity provider instance, and domain each environment uses, verified and dated. - Secret Management: Record every copy of every secret across app hosts, Workers, database logins, and operator files; rotate them without breaking anything. - Migration Safety: Apply database migrations only after the deployed code is ready to meet the new schema, and name any outage window. - Use Case: Your production database is on Supabase, your app on Netlify, sign-in through Clerk. A developer adds a new API endpoint but forgets to apply its migration to production. This Skill's schema validation catches it before deploy, the migration ledger shows what is pending, and the go-live checklist ensures code and schema are deployed in the right order. ## Quick Start Set up your environments doc by filling in which Supabase project, Clerk instance, and Netlify site each of development and production uses, then record the date and the command you ran to verify each one.

Frequently Asked Questions about environments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent production credentials from leaking into development?▼

Keep separate provider tokens, database connection strings, and API keys for each environment in distinct operator checkout directories. Mark all secrets as write-only on the host so they cannot be read back. Record every copy in a secrets table and rotate them together when a leak occurs.

Why does my database migration fail after deployment?▼

Migrations applied after a deploy create a window where old code calls the new schema. Apply migrations before the push using the database CLI with the environment's own connection string, then verify the ledger, then deploy fresh code.

How do I safely rotate an API key across multiple runtimes?▼

Add the new key to every holder (app host, Workers, boxes, operator files), deploy each one, test that it works, then revoke the old key. Revoking first breaks holders you missed; deploying from an operator file with the old value undoes the rotation.

What happens if I set the wrong database URL on the production host?▼

The app will write to the wrong database. Prevent this by requiring every operator command to name its target explicitly rather than inheriting it from a config file, and by recording the verified mapping in the environments doc.

How do I know what data is backed up and what is not?▼

List what each backup holds and what it does not: the database is backed up, but operator files with generated secrets, DNS records, and identity provider settings live elsewhere. Run a restore drill into an isolated project and record the date and result.

Why do I need separate operator checkouts for development and production?▼

Each checkout has its own `.env` file holding that environment's secrets. Running the wrong command from the wrong checkout can delete production data. A production checkout stays detached at the production branch tip and refuses any command that would deploy stale code.