skills/rollback-strategy/SKILL.md
Guide rollback decisions after failed deployments — when to rollback vs retry, verification after rollback, and state preservation. Use when a deployment fails repeatedly, the app is unreachable after deploy, or the user requests a rollback.
npx skillsauth add nixopus/agent rollback-strategyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Situation | Action | Reason | |---|---|---| | Build failed, fix is obvious (typo, missing dep) | Retry with fix | Faster than rollback + fix + redeploy | | Build failed 3+ times | Rollback | Deeper issue needs investigation without production down | | Container crash loop after deploy | Rollback | Previous version was stable; fix in development | | App unreachable after deploy (port/proxy issue) | Investigate first | May be config issue fixable without rollback | | Database migration failed | Rollback with caution | See migration rollback section | | User explicitly requests rollback | Rollback | User decision takes priority |
Before executing rollback, capture:
get_deployment_logs for the failed deployment — save the deployment ID and errorget_container_logs if the container existed — last 100 linesget_application to note current env vars and configrollback_deployment with the application IDAfter rollback completes, run the post-deploy-verification checks:
If verification fails after rollback: the previous version may also be broken (database schema change, expired credentials, infrastructure issue). Escalate to user.
Include in the rollback report:
Migrations make rollbacks risky because the database schema may have changed:
| Migration type | Rollback safe? | Action | |---|---|---| | Additive only (new columns, new tables) | Yes | Old code ignores new columns | | Column rename or removal | No | Old code references old column name | | Data transformation | No | Transformed data may not work with old code | | Index changes only | Yes | Old code unaffected |
If the migration is not rollback-safe:
post-deploy-verification — Run after rollback to confirm the previous version is healthyfailure-diagnosis — Diagnose the root cause before deciding to rollbackdatabase-migration — Safe migration strategies that reduce rollback risktools
Compressed catalog of all Nixopus API operations for the nixopus_api() tool
development
Deploy static file sites — Caddy/nginx serving, Staticfile config, and Dockerfile patterns. Use when deploying a static HTML site with no server-side runtime, or when index.html or a Staticfile is detected at the project root.
devops
Deploy shell script applications — interpreter detection, setup scripts, and Dockerfile patterns. Use when deploying a shell script project, or when start.sh is detected.
development
Self-healing loop for failed deployments — diagnose, fix, redeploy up to 3 attempts, then escalate or rollback. Load when a deployment fails or build errors occur.