Skip to content
Skills Library
DevOps & cloud · Automation

deployment-rollback

/deployment-rollback

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.

Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author description

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 it works

  1. Quick Rollback via Vercel
  2. Database Rollback
  3. Git-Based Rollback
  4. Cache Invalidation
  5. Health Checks During Rollback
  6. Rollback Checklist
  7. Common Scenarios
  8. Troubleshooting
  9. Best Practices
  10. References
Original SKILL.md headings · 133 lines, 417 words
SKILL.md preview
---
name: deployment-rollback
description: 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.
allowed-tools: Read, Edit, Write, Bash, Grep
---

# Deployment Rollback Skill

## Quick Rollback via Vercel

### Using Vercel Dashboard

1. Go to Vercel Dashboard → Project → Deployments
2. Find the previous working deployment
3. Click the three dots menu → "Promote to Production"

### Using Vercel CLI

```bash
# 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

```bash
# Rollback last migration
pnpm -F /database db:rollback

# Rollback to specific migration
pnpm -F /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

```bash
# 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

```bash
# Revalidate Next.js cache
curl -X POST "https://motormetrics.app/api/revalidate?tag=all&secret=$REVALIDATE_TOKEN"

# Clear Redis cache
redis-cli -h $REDIS_HOST FLUSHALL
```

## Health Checks During Rollback

```bash
curl -f https://motormetrics.app || 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:**
```bash
vercel rollback
curl https://motormetrics.app/api/health
```

**Database Migration Failure:**
```bash
pnpm -F /database db:rollback
git revert HEAD
git push origin main
```

## Troubleshooting

**Rollback deployment not working:**
```bash
# Force redeploy from known good commit
git checkout v1.1.0
vercel --prod
```

**Database schema mismatch:**
```bash
pnpm -F /database db:rollback
# Or restore backup: psql $DATABASE_URL < backup-pre-deploy.sql
```

## Best Practices

1. **Always Backup**: Create database backups before major deployments
2. **Test Rollback**: Practice rollback procedures in preview deployments
3. **Feature Flags**: Use for quick feature disabling without rollback
4. **Monitor Closely**: Watch Vercel analytics during and after rollback
5. **Document Everything**: Record what happened and why

## References

- Vercel Rollbacks: https://vercel.com/docs/deployments/rollbacks
- See `monitoring` skill for debugging issues

Versions

RepositoryScoreLicence
This page · motormetrics/motormetrics100MIT
motormetrics/motormetrics100MIT

Database snapshot: 13.11.2026 · package version a9c57a388b04 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90vercel-deployments-builds
    Vercel deployment lifecycle for builds, deployments, previews, release phases, and rollback. Use when configuring build output, deployment workflows, or release controls on Vercel.
  • 90deployment-orchestrator
    Automated deployment orchestration supporting multiple environments, infrastructure as code, CI/CD pipeline management, rollback procedures, and monitoring integration. Use when Claude needs to manage deployments, configure infrastructure, orchestrate release processes, or…
  • 95emergency-release-workflow
    Emergency release workflow for critical bug fixes and security patches. Use when production issues require fast-track deployment.
  • 96rollback
    Plan and, on explicit approval, roll the production deployment back to a previous image when the user invokes /rollback — checks schema compatibility first.
  • 96rollback
    Plan and, on explicit approval, roll the production deployment back to a previous image when the user invokes /rollback — checks schema compatibility first.
  • 100create-rollback-plan
    Create a deployment rollback plan when the user asks to prepare a rollback strategy, plan for deployment failure, create a revert plan, or document rollback procedures for a release

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.