agentleFS
kaiohenricunhakaiohenricunha/dotbabel/skills/rollback-prod/SKILL.md

rollback-prod

Skill0 starsChanged 2 months agoMITView on GitHub

Roll back the most recent production release across configured deploy targets after an explicit typed confirmation. Use only when the user directly invokes /rollback-prod during incident response or release recovery.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the rollback planner/executor from the consuming project root:

    line 45
  2. Distinctive:

    Never run rollback actions without typed confirmation.

    line 96
  3. Very specific:

    If any target cannot produce both current and previous releases, run no rollback actions and exit 2.

    line 97
  4. Distinctive:

    If one target fails during rollback, report the partial state clearly and do not auto-revert targets that already succeeded.

    line 99
  5. Distinctive:

    After attempted rollback actions, run deploy status automatically and print the new state.

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rollback Prod

Roll back production deploy targets to their previous releases using each provider's native rollback primitive.

Workflow

  1. Resolve the shared deploy helper:

    if [ -f "$HOME/.claude/skills/deploy-status/scripts/deploy-ops.mjs" ]; then
      DEPLOY_OPS="$HOME/.claude/skills/deploy-status/scripts/deploy-ops.mjs"
    elif [ -f "skills/deploy-status/scripts/deploy-ops.mjs" ]; then
      DEPLOY_OPS="skills/deploy-status/scripts/deploy-ops.mjs"
    else
      echo "rollback-prod helper not found; re-run dotbabel bootstrap or dotbabel init" >&2
      exit 2
    fi
  2. Run the rollback planner/executor from the consuming project root:

    node "$DEPLOY_OPS" rollback $ARGUMENTS
  3. Preserve the helper's exit code:
    • 0 - rollback ran and post-rollback status is in sync
    • 1 - confirmation declined or post-rollback deploy status reports drift
    • 2 - discovery, auth, release lookup, or rollback execution failed

Confirmation Contract

The helper always prints the rollback plan first. Unless --dry-run is present, it must require the operator to type exactly:

ROLLBACK PROD

No --yes, environment variable, autonomous mode, or model routing decision may bypass this confirmation. Provider CLIs may receive their own non-interactive flags only after this confirmation succeeds.

Target Ordering

The helper uses the same target discovery as /deploy-status. If .claude/deploy-targets.json contains rollback_order, targets matching each entry are serialized in that order and targets in the same group run in parallel. Example:

{
  "rollback_order": ["fly", "vercel"]
}

This rolls backend targets back before frontend targets.

Provider References

Load only the provider notes that match discovered targets:

ProviderReference
Vercelreferences/vercel.md
Fly.ioreferences/fly.md
AWS Amplifyreferences/aws-amplify.md

Rules

  • Never run rollback actions without typed confirmation.
  • If any target cannot produce both current and previous releases, run no rollback actions and exit 2.
  • If one target fails during rollback, report the partial state clearly and do not auto-revert targets that already succeeded.
  • After attempted rollback actions, run deploy status automatically and print the new state.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.