env-isolation-pattern
CommunityStop prod env leaks from wiping your DB.
Software Engineering#database migrations#pytest#alembic#production safety#environment isolation#CI secrets#env leak prevention
Authorsaintgo7
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents production environment variables from being inherited by tests and migrations, which can accidentally connect to (and wipe) the production database.
Core Features & Use Cases
- Production-to-Test Environment Isolation: removes or overrides prod-like variables before subprocesses (pytest, alembic, migration scripts) run.
- Strong Guardrails Beyond setdefault: replaces weak
os.environ.setdefault(...)with explicit unsetting and unconditional overrides at import time. - Practical Deployment Scenarios: supports local wrappers, CI/CD pipelines, supervisor/export flows, and container-based isolation to eliminate the most common leak paths.
Quick Start
Tell the Skill to generate a safe test runner and conftest isolation snippet that unsets all prod-prefixed environment variables and forces test-only DB and secret values for your stack.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: env-isolation-pattern Download link: https://github.com/saintgo7/claude-skills/archive/main.zip#env-isolation-pattern Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.