D

Deployment Procedures System

Production-ready skill that handles production, deployment, principles, decision. Includes structured workflows, validation checks, and reusable patterns for development.

SkillClipticsdevelopmentv1.0.0MIT
0 views0 copies

Deployment Procedures Skill

A Claude Code skill for safe, repeatable production deployments — covering pre-flight checks, deployment strategies (blue-green, canary, rolling), rollback procedures, and post-deployment verification.

When to Use This Skill

Choose this skill when:

  • Deploying application updates to staging or production environments
  • Setting up deployment pipelines for a new project
  • Choosing between deployment strategies (blue-green, canary, rolling)
  • Creating rollback procedures for failed deployments
  • Establishing deployment checklists for a team
  • Debugging deployment failures or rollback scenarios

Consider alternatives when:

  • You need CI/CD pipeline configuration (use a GitHub Actions or CI skill)
  • You need infrastructure provisioning (use a Terraform/IaC skill)
  • You need container orchestration setup (use a Kubernetes skill)

Quick Start

# Add to your Claude Code project claude mcp add deployment-procedures # Create a deployment checklist claude "create a deployment checklist for our Node.js API" # Plan a deployment strategy claude "recommend a deployment strategy for zero-downtime releases"
# .claude/skills/deployment-procedures.yml name: deployment-procedures description: Safe production deployment procedures and checklists triggers: - "deploy" - "deployment checklist" - "rollback plan" config: strategy: rolling environment: production require_approval: true

Core Concepts

Deployment Strategies

StrategyDowntimeRiskRollback SpeedBest For
Blue-GreenZeroLowInstant (swap)Critical applications
CanaryZeroVery LowFast (route shift)High-traffic services
RollingZeroMediumMedium (reverse roll)Stateless services
RecreateBriefHigherSlow (redeploy)Dev/staging only
Feature FlagsZeroVery LowInstant (toggle)Gradual feature rollout

Pre-Deployment Checklist

## Pre-Flight Checks - [ ] All tests pass on the deployment branch - [ ] Code review approved and merged - [ ] Database migrations tested on staging - [ ] Environment variables configured for target env - [ ] Dependency audit shows no critical vulnerabilities - [ ] Changelog or release notes prepared - [ ] Rollback procedure documented and tested - [ ] On-call engineer identified and notified ## Deploy - [ ] Create deployment tag/release - [ ] Trigger deployment pipeline - [ ] Monitor deployment progress in CI/CD dashboard - [ ] Verify health check endpoints respond ## Post-Deploy Verification - [ ] Smoke test critical user flows - [ ] Check error rates in monitoring dashboard - [ ] Verify database migrations applied correctly - [ ] Confirm no performance regressions - [ ] Update deployment log with timestamp and version

Rollback Procedure

# Automated rollback script #!/bin/bash set -euo pipefail PREVIOUS_VERSION=$(cat .deploy-history | tail -2 | head -1) CURRENT_VERSION=$(cat .deploy-history | tail -1) echo "Rolling back from $CURRENT_VERSION to $PREVIOUS_VERSION" # 1. Deploy previous version deploy --version "$PREVIOUS_VERSION" --skip-migrations # 2. Verify rollback curl -sf https://api.example.com/health || { echo "CRITICAL: Rollback health check failed" exit 1 } # 3. Notify team notify-slack "#deployments" "Rolled back from $CURRENT_VERSION to $PREVIOUS_VERSION"

Configuration

ParameterTypeDefaultDescription
strategystring"rolling"Deployment strategy: blue-green, canary, rolling, recreate
environmentstring"production"Target environment: staging, production
require_approvalbooleantrueRequire manual approval before production deploy
health_check_urlstring"/health"Endpoint to verify deployment health
health_check_timeoutnumber60Seconds to wait for health check to pass
rollback_on_failurebooleantrueAuto-rollback if health check fails
notification_channelstring""Slack/Teams channel for deployment notifications
canary_percentagenumber10Initial traffic percentage for canary deploys

Best Practices

  1. Always deploy to staging first — no matter how small the change, run it through staging to catch environment-specific issues before they hit production.

  2. Automate rollback triggers — set up automatic rollback based on error rate thresholds or failed health checks; manual rollback decisions add critical minutes during incidents.

  3. Deploy during low-traffic windows — unless you have zero-downtime deployment, schedule deploys during off-peak hours to minimize user impact if something goes wrong.

  4. Keep deployments small and frequent — a deployment with 3 commits is easier to debug than one with 30; smaller batches reduce risk and make rollbacks more targeted.

  5. Never deploy on Fridays without on-call coverage — if a deployment causes issues, you need people available to respond; without coverage, the problem sits until Monday.

Common Issues

Health check passes but app is broken — The health check endpoint might only verify the server is running, not that it functions correctly. Add deep health checks that verify database connectivity, external service reachability, and critical business logic.

Database migration prevents rollback — Destructive migrations (DROP COLUMN) make it impossible to rollback to the previous version. Use expand-contract pattern: add new column → migrate data → update app → remove old column in a separate deployment.

Canary deploy shows no issues but full rollout fails — Canary at 5% traffic may not hit all code paths. Ensure canary traffic includes a representative sample (not just health checks) and run it for at least 15-30 minutes before promoting.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates