Back to DevOps & CI/CD

deployment-pipeline-design

ci/cddevopsdeploymentautomationgitopspipelinescontinuous deliverysoftware delivery
⭐ 36.8kπŸ“„ MITπŸ•’ 2026-06-16Source β†—

Install this skill

npx skills add wshobson/agents

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

The deployment-pipeline-design skill manages the technical structure of automated software delivery. It defines sequences that move artifacts from source control through quality assurance, staging, and finally into live production environments. This skill orchestrates specific deployment methodologies like blue-green shifts, canary releases, and rolling updates to minimize disruption. By incorporating manual validation steps and conditional gating, it creates a structured path for software changes. The skill focuses on observability and automated recovery, ensuring that if a production release fails, the system triggers a rollback to the previous stable state. It bridges the gap between infrastructure configuration and application lifecycle management, focusing on predictable, repeatable delivery patterns that maintain service uptime while allowing for frequent updates to application code.

When to Use This Skill

  • β€’Moving microservices from staging to production with traffic splitting
  • β€’Establishing multi-level security and integration test barriers
  • β€’Managing zero-downtime updates for high-availability clusters
  • β€’Automating rollback protocols triggered by health-check failures

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • β€œDesign a deployment pipeline for my microservices
  • β€œSet up a canary release strategy for Kubernetes
  • β€œCreate a CI/CD flow with manual approval gates
  • β€œImplement a blue-green deployment in our production environment
  • β€œDefine a rollback process for failed production deploys

Pro Tips

  • πŸ’‘Start with a high-level overview of your desired pipeline, then iteratively refine each stage with specific tools and services.
  • πŸ’‘Always specify security and compliance requirements upfront to ensure the agent integrates necessary checks at appropriate stages.
  • πŸ’‘When designing approval gates, clearly define the criteria and stakeholders for each stage to automate the process effectively.

What this skill does

  • β€’Orchestrates multi-stage CI/CD workflow sequences
  • β€’Configures automated deployment gates and manual approval hooks
  • β€’Implements advanced release patterns like canary and blue-green
  • β€’Manages infrastructure state with versioned deployment strategies
  • β€’Integrates automated verification checks post-deployment

When not to use it

  • βœ•Simple static sites that require only file synchronization
  • βœ•Rapid prototyping where overhead of formal pipelines outweighs benefits

Example workflow

  1. Commit code to the integration branch
  2. Trigger automated build and unit test suite
  3. Deploy successfully built images to a staging namespace
  4. Execute automated E2E and security regression tests
  5. Await manual team-lead sign-off in the approval queue
  6. Perform rolling update to production environment

Prerequisites

  • –Configured Kubernetes or server environment
  • –Container registry access
  • –Defined monitoring or health check endpoint

Pitfalls & limitations

  • !Over-engineering simple pipelines causes unnecessary maintenance
  • !Ignoring infrastructure costs during redundant blue-green staging
  • !Failing to synchronize database migrations with application code

FAQ

How does this differ from simple automation?
This skill adds architectural rigor like environmental gating and safety-focused deployment strategies, whereas simple automation only executes scripts linearly.
Can I use this for non-containerized apps?
Yes, although the provided templates focus on Kubernetes, the design principles of stages, approvals, and traffic-shifting apply to any architecture.
When is a canary deployment preferred over blue-green?
Canary deployments are better for testing new features against a small subset of real users, while blue-green is ideal for instant, total environment switches.

How it compares

Unlike manual deployment scripts, this skill enforces repeatable pipeline structures that incorporate audit trails, automated testing thresholds, and controlled traffic management.

Source & trust

⭐ 37k starsπŸ“„ MITπŸ•’ Updated 2026-06-16
πŸ“„ Full skill instructions β€” original source: wshobson/agents
# Deployment Pipeline Design

Architecture patterns for multi-stage CI/CD pipelines with approval gates and deployment strategies.

## Purpose

Design robust, secure deployment pipelines that balance speed with safety through proper stage organization and approval workflows.

## When to Use

- Design CI/CD architecture
- Implement deployment gates
- Configure multi-environment pipelines
- Establish deployment best practices
- Implement progressive delivery

## Pipeline Stages

### Standard Pipeline Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Build β”‚ β†’ β”‚ Test β”‚ β†’ β”‚ Staging β”‚ β†’ β”‚ Approveβ”‚ β†’ β”‚Productionβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜


### Detailed Stage Breakdown

1. **Source** - Code checkout
2. **Build** - Compile, package, containerize
3. **Test** - Unit, integration, security scans
4. **Staging Deploy** - Deploy to staging environment
5. **Integration Tests** - E2E, smoke tests
6. **Approval Gate** - Manual approval required
7. **Production Deploy** - Canary, blue-green, rolling
8. **Verification** - Health checks, monitoring
9. **Rollback** - Automated rollback on failure

## Approval Gate Patterns

### Pattern 1: Manual Approval

# GitHub Actions
production-deploy:
needs: staging-deploy
environment:
name: production
url: https://app.example.com
runs-on: ubuntu-latest
steps:
- name: Deploy to production
run: |
# Deployment commands


### Pattern 2: Time-Based Approval

# GitLab CI
deploy:production:
stage: deploy
script:
- deploy.sh production
environment:
name: production
when: delayed
start_in: 30 minutes
only:
- main


### Pattern 3: Multi-Approver

# Azure Pipelines
stages:
- stage: Production
dependsOn: Staging
jobs:
- deployment: Deploy
environment:
name: production
resourceType: Kubernetes
strategy:
runOnce:
preDeploy:
steps:
- task: ManualValidation@0
inputs:
notifyUsers: "[email protected]"
instructions: "Review staging metrics before approving"


**Reference:** See assets/approval-gate-template.yml

## Deployment Strategies

### 1. Rolling Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 10
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 2
maxUnavailable: 1


**Characteristics:**

- Gradual rollout
- Zero downtime
- Easy rollback
- Best for most applications

### 2. Blue-Green Deployment

# Blue (current)
kubectl apply -f blue-deployment.yaml
kubectl label service my-app version=blue

# Green (new)
kubectl apply -f green-deployment.yaml
# Test green environment
kubectl label service my-app version=green

# Rollback if needed
kubectl label service my-app version=blue


**Characteristics:**

- Instant switchover
- Easy rollback
- Doubles infrastructure cost temporarily
- Good for high-risk deployments

### 3. Canary Deployment

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: my-app
spec:
replicas: 10
strategy:
canary:
steps:
- setWeight: 10
- pause: { duration: 5m }
- setWeight: 25
- pause: { duration: 5m }
- setWeight: 50
- pause: { duration: 5m }
- setWeight: 100


**Characteristics:**

- Gradual traffic shift
- Risk mitigation
- Real user testing
- Requires service mesh or similar

### 4. Feature Flags

from flagsmith import Flagsmith

flagsmith = Flagsmith(environment_key="API_KEY")

if flagsmith.has_feature("new_checkout_flow"):
# New code path
process_checkout_v2()
else:
# Existing code path
process_checkout_v1()


**Characteristics:**

- Deploy without releasing
- A/B testing
- Instant rollback
- Granular control

## Pipeline Orchestration

### Multi-Stage Pipeline Example

name: Production Pipeline

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build application
run: make build
- name: Build Docker image
run: docker build -t myapp:${{ github.sha }} .
- name: Push to registry
run: docker push myapp:${{ github.sha }}

test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Unit tests
run: make test
- name: Security scan
run: trivy image myapp:${{ github.sha }}

deploy-staging:
needs: test
runs-on: ubuntu-latest
environment:
name: staging
steps:
- name: Deploy to staging
run: kubectl apply -f k8s/staging/

integration-test:
needs: deploy-staging
runs-on: ubuntu-latest
steps:
- name: Run E2E tests
run: npm run test:e2e

deploy-production:
needs: integration-test
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Canary deployment
run: |
kubectl apply -f k8s/production/
kubectl argo rollouts promote my-app

verify:
needs: deploy-production
runs-on: ubuntu-latest
steps:
- name: Health check
run: curl -f https://app.example.com/health
- name: Notify team
run: |
curl -X POST ${{ secrets.SLACK_WEBHOOK }} \
-d '{"text":"Production deployment successful!"}'


## Pipeline Best Practices

1. **Fail fast** - Run quick tests first
2. **Parallel execution** - Run independent jobs concurrently
3. **Caching** - Cache dependencies between runs
4. **Artifact management** - Store build artifacts
5. **Environment parity** - Keep environments consistent
6. **Secrets management** - Use secret stores (Vault, etc.)
7. **Deployment windows** - Schedule deployments appropriately
8. **Monitoring integration** - Track deployment metrics
9. **Rollback automation** - Auto-rollback on failures
10. **Documentation** - Document pipeline stages

## Rollback Strategies

### Automated Rollback

deploy-and-verify:
steps:
- name: Deploy new version
run: kubectl apply -f k8s/

- name: Wait for rollout
run: kubectl rollout status deployment/my-app

- name: Health check
id: health
run: |
for i in {1..10}; do
if curl -sf https://app.example.com/health; then
exit 0
fi
sleep 10
done
exit 1

- name: Rollback on failure
if: failure()
run: kubectl rollout undo deployment/my-app


### Manual Rollback

# List revision history
kubectl rollout history deployment/my-app

# Rollback to previous version
kubectl rollout undo deployment/my-app

# Rollback to specific revision
kubectl rollout undo deployment/my-app --to-revision=3


## Monitoring and Metrics

### Key Pipeline Metrics

- **Deployment Frequency** - How often deployments occur
- **Lead Time** - Time from commit to production
- **Change Failure Rate** - Percentage of failed deployments
- **Mean Time to Recovery (MTTR)** - Time to recover from failure
- **Pipeline Success Rate** - Percentage of successful runs
- **Average Pipeline Duration** - Time to complete pipeline

### Integration with Monitoring

- name: Post-deployment verification
run: |
# Wait for metrics stabilization
sleep 60

# Check error rate
ERROR_RATE=$(curl -s "$PROMETHEUS_URL/api/v1/query?query=rate(http_errors_total[5m])" | jq '.data.result[0].value[1]')

if (( $(echo "$ERROR_RATE > 0.01" | bc -l) )); then
echo "Error rate too high: $ERROR_RATE"
exit 1
fi


## Reference Files

- references/pipeline-orchestration.md - Complex pipeline patterns
- assets/approval-gate-template.yml - Approval workflow templates

## Related Skills

- github-actions-templates - For GitHub Actions implementation
- gitlab-ci-patterns - For GitLab CI implementation
- secrets-management - For secrets handling

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/deployment-pipeline-design/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/wshobson/agents/deployment-pipeline-design/SKILL.md
  • Cursor: ~/.cursor/skills/wshobson/agents/deployment-pipeline-design/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/wshobson/agents/deployment-pipeline-design/SKILL.md

πŸš€ Install with CLI:
npx skills add wshobson/agents

Read the Master Guide: Mastering Agent Skills β†’

Recommended Rules

View more rules β†’

Recommended Workflows

View more workflows β†’

Recommended MCP Servers

View more MCP servers β†’

Take It Further

Maximize your productivity with these powerful resources

πŸ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
πŸ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid devops & ci/cd issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under DevOps & CI/CD and is published by W. Shobson, maintained in wshobson/agents.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.