Blue/green deployments — two identical environments, smoke tests on idle, atomic traffic switch, instant rollback by switching back, database compatibility constraints, session and cache handling, cost. Use for zero-downtime releases with instant rollback (blue green, zero downtime, traffic switch).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Blue Green Deployment?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-blue-green-deployment)
---
name: blue-green-deployment
description: Blue/green deployments — two identical environments, smoke tests on idle, atomic traffic switch, instant rollback by switching back, database compatibility constraints, session and cache handling, cost. Use for zero-downtime releases with instant rollback (blue green, zero downtime, traffic switch).
metadata:
category: delivery
---
# Blue/green deployment
## Purpose
Release with an instant, low-risk way back.
**Use when:** services needing instant rollback.
**Not for:** incompatible schema changes.
## Inputs
- Release artifact, environment setup.
## Outputs
- Deployment procedure, switch and rollback steps.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "blue/green deployment"` for prior decisions, patterns and anti-patterns.
## Steps
1. **Prepare.** Deploy to idle environment; run smoke tests.
Done when idle passes smoke tests.
2. **Compatibility.** Schema compatible with both versions (expand/contract).
Done when both versions work on the database.
3. **Switch.** Switch traffic at load balancer/DNS; watch SLOs.
Done when SLOs hold.
4. **Rollback.** Switch back on breach; keep old environment warm for the window.
Done when rollback rehearsed.
## Best practices
- Drain connections before switching.
- Automate the switch decision on SLOs.
## Common mistakes
- DNS-based switch with long TTLs.
- Destructive migrations.
## Example
Switch via ALB target group; error budget burn alarm triggers automatic switch back.
## Reusable prompt
```text
Apply the Blue/green deployment skill (.agents/skills/blue-green-deployment/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Write the blue/green procedure with compatibility checks, switch criteria and rollback.
Return: Deployment procedure, switch and rollback steps..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```