/rollback-deploy
Rollback deployment to previous version
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/rollback-deploy
Context preview
What this command does when you run it.
Rollback deployment to previous version
Command definition
rollback-deploy.mdRollback Deploy Command
Rollback deployment to previous version
Instructions
Follow this systematic rollback procedure: **$ARGUMENTS**
1. **Incident Assessment and Decision**
- Assess the severity and impact of the current deployment issues
- Determine if rollback is necessary or if forward fix is better
- Identify affected systems, users, and business functions
- Consider data integrity and consistency implications
- Document the decision rationale and timeline
2. **Emergency Response Setup**
# Activate incident response team
# Set up communication channels
# Notify stakeholders immediately
# Example emergency notification
echo "๐จ ROLLBACK INITIATED
Issue: Critical performance degradation after v1.3.0 deployment
Action: Rolling back to v1.2.9
ETA: 15 minutes
Impact: Temporary service interruption possible
Status channel: #incident-rollback-202401"
3. **Pre-Rollback Safety Checks**
# Verify current production version
curl -s https://api.example.com/version
kubectl get deployments -o wide
# Check system status
curl -s https://api.example.com/health | jq .
# Identify target rollback version
git tag --sort=-version:refname | head -5
# Verify rollback target exists and is deployable
git show v1.2.9 --stat
4. **Database Considerations**
# Check for database migrations since last version
./check-migrations.sh v1.2.9 v1.3.0
# If migrations exist, plan database rollback
# WARNING: Database rollbacks can cause data loss
# Consider forward fix instead if migrations are present
# Create database backup before rollback
./backup-database.sh "pre-rollback-$(date +%Y%m%d-%H%M%S)"
5. **Traffic Management Preparation**
# Prepare to redirect traffic
# Option 1: Maintenance page
./enable-maintenance-mode.sh
# Option 2: Load balancer management
./drain-traffic.sh --gradual
# Option 3: Circuit breaker activation
./activate-circuit-breaker.sh
6. **Container/Kubernetes Rollback**
# Kubernetes rollback
kubectl rollout history deployment/app-deployment
kubectl rollout undo deployment/app-deployment
# Or rollback to specific revision
kubectl rollout undo deployment/app-deployment --to-revision=3
# Monitor rollback progress
kubectl rollout status deployment/app-deployment --timeout=300s
# Verify pods are running
kubectl get pods -l app=your-app
7. **Docker Swarm Rollback**
# List service history
docker service ps app-service --no-trunc
# Rollback to previous version
docker service update --rollback app-service
# Or update to specific image
docker service update --image app:v1.2.9 app-service
# Monitor rollback
docker service ps app-service
8. **Traditional Deployment Rollback**
# Blue-Green deployment rollback
./switch-to-blue.sh # or green, depending on current
# Rolling deployment rollback
./deploy-version.sh v1.2.9 --rolling
# Symlink-based rollback
ln -sfn /releases/v1.2.9 /current
sudo systemctl restart app-service
9. **Load Balancer and CDN Updates**
# Update load balancer to point to old version
aws elbv2 modify-target-group --target-group-arn $TG_ARN --targets Id=old-instance
# Clear CDN cache if needed
aws cloudfront create-invalidation --distribution-id $DIST_ID --paths \"/*\"
# Update DNS if necessary (last resort, has propagation delay)
# aws route53 change-resource-record-sets ...
10. **Configuration Rollback**
Read more
Rollback Deploy Command
Rollback deployment to previous version
Instructions
Follow this systematic rollback procedure: **$ARGUMENTS**
1. **Incident Assessment and Decision**
- Assess the severity and impact of the current deployment issues
- Determine if rollback is necessary or if forward fix is better
- Identify affected systems, users, and business functions
- Consider data integrity and consistency implications
- Document the decision rationale and timeline
2. **Emergency Response Setup**
# Activate incident response team # Set up communication channels # Notify stakeholders immediately # Example emergency notification echo "๐จ ROLLBACK INITIATED Issue: Critical performance degradation after v1.3.0 deployment Action: Rolling back to v1.2.9 ETA: 15 minutes Impact: Temporary service interruption possible Status channel: #incident-rollback-202401"
3. **Pre-Rollback Safety Checks**
# Verify current production version curl -s https://api.example.com/version kubectl get deployments -o wide # Check system status curl -s https://api.example.com/health | jq . # Identify target rollback version git tag --sort=-version:refname | head -5 # Verify rollback target exists and is deployable git show v1.2.9 --stat
4. **Database Considerations**
# Check for database migrations since last version ./check-migrations.sh v1.2.9 v1.3.0 # If migrations exist, plan database rollback # WARNING: Database rollbacks can cause data loss # Consider forward fix instead if migrations are present # Create database backup before rollback ./backup-database.sh "pre-rollback-$(date +%Y%m%d-%H%M%S)"
5. **Traffic Management Preparation**
# Prepare to redirect traffic # Option 1: Maintenance page ./enable-maintenance-mode.sh # Option 2: Load balancer management ./drain-traffic.sh --gradual # Option 3: Circuit breaker activation ./activate-circuit-breaker.sh
6. **Container/Kubernetes Rollback**
# Kubernetes rollback kubectl rollout history deployment/app-deployment kubectl rollout undo deployment/app-deployment # Or rollback to specific revision kubectl rollout undo deployment/app-deployment --to-revision=3 # Monitor rollback progress kubectl rollout status deployment/app-deployment --timeout=300s # Verify pods are running kubectl get pods -l app=your-app
7. **Docker Swarm Rollback**
# List service history docker service ps app-service --no-trunc # Rollback to previous version docker service update --rollback app-service # Or update to specific image docker service update --image app:v1.2.9 app-service # Monitor rollback docker service ps app-service
8. **Traditional Deployment Rollback**
# Blue-Green deployment rollback ./switch-to-blue.sh # or green, depending on current # Rolling deployment rollback ./deploy-version.sh v1.2.9 --rolling # Symlink-based rollback ln -sfn /releases/v1.2.9 /current sudo systemctl restart app-service
9. **Load Balancer and CDN Updates**
# Update load balancer to point to old version aws elbv2 modify-target-group --target-group-arn $TG_ARN --targets Id=old-instance # Clear CDN cache if needed aws cloudfront create-invalidation --distribution-id $DIST_ID --paths \"/*\" # Update DNS if necessary (last resort, has propagation delay) # aws route53 change-resource-record-sets ...
10. **Configuration Rollback**
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Other commands on claude-command-suite.
- /boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Open command - /boundary-detect
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Open command - /boundary-heatmap
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Open command - /boundary-risk-assess
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Open command - /boundary-safe-bridge
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Open command - /optimize-prompt
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles: common words tokenize more efficiently, unusual words break into more tokens, and conciseness reduces cost.
Open command

