deployment-rollback
FreeNo executable scriptsNot checkedRollback failed deployments, restore previous versions, and handle deployment emergencies. Use when deployments fail, critical bugs are discovered in…
by motormetrics★ 22 GitHub starsAbout this skill
Deployment Rollback Skill
Quick Rollback via Vercel
Using Vercel Dashboard
- Go to Vercel Dashboard → Project → Deployments
- Find the previous working deployment
- Click the three dots menu → "Promote to Production"
Using Vercel CLI
# List recent deployments
vercel list
# Promote a specific deployment to production
vercel promote <deployment-url>
# Or rollback to previous production deployment
vercel rollback
Database Rollback
# Rollback last migration
pnpm -F @sgcarstrends/database db:rollback
# Rollback to specific migration
pnpm -F @sgcarstrends/database db:rollback --to 20240115_initial
# Restore from backup
pg_dump $DATABASE_URL > backup-pre-deploy.sql # Before deploy
psql $DATABASE_URL < backup-pre-deploy.sql # Restore if needed
Git-Based Rollback
# Revert specific commit
git revert <commit-hash>
git push origin main # Triggers Vercel redeploy
# Create rollback branch
git checkout -b rollback/v1.1.0
git reset --hard v1.1.0
git push origin rollback/v1.1.0
gh pr create --title "Rollback to v1.1.0" --body "Emergency rollback"
Cache Invalidation
# Revalidate Next.js cache
curl -X POST "https://sgcarstrends.com/api/revalidate?tag=all&secret=$REVALIDATE_TOKEN"
# Clear Redis cache
redis-cli -h $REDIS_HOST FLUSHALL
Health Checks During Rollback
curl -f https://sgcarstrends.com || echo "Web unhealthy"
psql $DATABASE_URL -c "SELECT 1" || echo "Database unreachable"
Rollback Checklist
Pre-Rollback:
- Identify issue and severity
- Determine scope (full/partial)
- Check backup availability
- Notify team
During:
- Rollback via Vercel dashboard or CLI
- Rollback database if needed
- Clear caches
- Verify health checks
- Run smoke tests
Post:
- Monitor error rates in Vercel dashboard
- Verify functionality restored
- Document what happened
- Create postmortem
Common Scenarios
Critical Bug:
vercel rollback
curl https://sgcarstrends.com/api/health
Database Migration Failure:
pnpm -F @sgcarstrends/database db:rollback
git revert HEAD
git push origin main
Troubleshooting
Rollback deployment not working:
# Force redeploy from known good commit
git checkout v1.1.0
vercel --prod
Database schema mismatch:
pnpm -F @sgcarstrends/database db:rollback
# Or restore backup: psql $DATABASE_URL < backup-pre-deploy.sql
Best Practices
- Always Backup: Create database backups before major deployments
- Test Rollback: Practice rollback procedures in preview deployments
- Feature Flags: Use for quick feature disabling without rollback
- Monitor Closely: Watch Vercel analytics during and after rollback
- Document Everything: Record what happened and why
References
- Vercel Rollbacks: https://vercel.com/docs/deployments/rollbacks
- See
monitoringskill for debugging issues
Install deployment-rollback in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
ReadEditWriteBashGrepFAQ
What does the deployment-rollback skill do?
Rollback failed deployments, restore previous versions, and handle deployment emergencies. Use when deployments fail, critical bugs are discovered in production, performance degrades after deployment, or emergency recovery is needed.
How do I install the deployment-rollback skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the deployment-rollback skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic