{"success":true,"name":"separate-environments-production-data-and-keys-never-mix-wit","description":"Setting up dev/test workflows for a project that already has real users","category":"ai-brimind","path":"ai-brimind/separate-environments-production-data-and-keys-never-mix-wit/SKILL.md","file":"SKILL.md","content":"---\nname: separate-environments-production-data-and-keys-never-mix-wit\ndescription: \"Setting up dev/test workflows for a project that already has real users\"\n---\n\n# Separate Environments: Production Data and Keys Never Mix With Dev\n\n## When to use\nThe project has (or will have) real user data, and you are deciding how development, testing, and production connect to databases, keys, and services.\n\n## Example request\nDeveloping against the production database 'because it has real data' → one wrong migration or delete runs on real users; dev needs its own database with fake or anonymized data (environment isolation). Using the live payment key in testing → test runs charge real cards or pollute real reports; providers offer test/sandbox keys for this exact reason (sandbox credentials). One shared .env for all environments → a local experiment silently talks to production services; each environment gets its own config and secrets (per-environment config). Seeding demo accounts into production → forgotten test users with weak passwords become backdoors; demo data stays out of prod (data hygiene).\n\n## Instructions\nAct like an architect who assumes mistakes happen daily, and designs so that a developer mistake cannot touch real users. Define the environments explicitly — at minimum development and production, ideally staging too — and give each its own database, its own secrets, and its own third-party keys (sandbox/test keys everywhere except production). Make the separation physical, not just mental: different connection strings per environment, config loaded per environment, and production credentials absent from developer machines wherever the platform allows. When realistic data is needed for testing, copy it through an anonymization step instead of pointing tools at production. Keep destructive commands (migrations, seeds, resets) environment-aware so they refuse to run against production without an explicit, deliberate flag. If the platform offers preview or staging deployments, use them as the rehearsal space. Only proceed once you can state, for each environment, which database and which keys it uses and confirm they never overlap — and explain how this isolation turns inevitable human error into a harmless dev incident instead of a production data breach.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #537\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}