deployment-strategy

Deploy with rollback plans, staged rollouts, and feature flags

vignesh2027/ai-agent-skills1 installsMITSynced Aug 22

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: deployment-strategy
description: Deploy with rollback plans, staged rollouts, and feature flags
license: MIT
---

## Overview

Deployments fail. The question is not whether, but whether you can recover quickly. This skill makes deployments reversible, observable, and gradual.

## When to Use

- Before every production deployment
- When designing a deployment pipeline
- When a deployment caused a production incident
- As part of the `/ship` workflow

## Process

### Step 1: Write the rollback procedure first
Before deploying, document how to roll back. If you can't write the rollback procedure, you're not ready to deploy.

### Step 2: Define the rollout stages
1% → 10% → 50% → 100% for high-risk changes.
10% → 100% for low-risk changes.
Never: 0% → 100% for anything that touches user-visible behavior.

### Step 3: Choose a deployment strategy
- **Blue/green**: spin up new environment, switch traffic, keep old environment warm for rollback
- **Canary**: route a percentage of traffic to new version, measure, expand
- **Feature flags**: deploy code dark, flip flag to enable for users
- **Rolling**: replace instances one by one, abort if errors spike

Choose based on: how reversible is the change? How quickly can you detect problems?

### Step 4: Define the deployment success criteria
Before deploying: what metrics must hold for the deployment to be considered successful?
- Error rate stays below X%
- p99 latency stays below Y ms
- No new error types in logs
- Key business metric (signups, orders) not regressing

### Step 5: Bake time
After deploying to a stage: wait before expanding. Minimum bake time:
- 1% stage: 15 minutes
- 10% stage: 1 hour
- 50% stage: 4 hours

High-risk changes need longer bake times.

### Step 6: Database migrations
- Migrations must be backward compatible (old code + new schema must work)
- Deploy migration before new code; keep old code running
- Never delete a column in the same release that stops using it
- Test rollback of the migration

### Step 7: Automate the deployment gate
Success criteria from Step 4 must be checked automatically. If they fail, the deployment halts. Not: "someone watches the dashboard." Automatic.

### Step 8: Post-deployment monitoring
After a deployment: watch the golden signals for 24 hours. Document any anomalies.

## Anti-Rationalizations

**"It's a small change — we can deploy to 100%"**
"Small" changes cause production incidents. All production changes go through staged rollout.

**"We can roll back if there's a problem"**
"Can roll back" means the rollback procedure is written, tested, and can be executed in under 5 minutes. Otherwise, you don't have a rollback plan; you have a hope.

## Verification Requirements

- [ ] Rollback procedure written before deployment starts
- [ ] Deployment stages defined (not 0% → 100%)
- [ ] Success criteria defined and automated
- [ ] Bake time defined at each stage
- [ ] Database migrations are backward compatible
- [ ] Post-deployment monitoring planned

More Deployment & CI/CD skills

azure-enterprise-infra-planner

microsoft/azure-skills

Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.

387.5k

azure-kubernetes-app-deploy

microsoft/azure-skills

Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.

380.4k

finetuning

microsoft/azure-skills

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

323.2k

← All Deployment & CI/CD skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY