rollback

rollback is a skill for Claude Code from softspark/ai-toolkit. It costs 39 tokens per session (1,193 once invoked), scanned A, original, Apache-2.0.

A rollback workflow for undoing a Git change, database migration, or deployment and returning to a known-good state. It includes checks before and after the rollback.

In plain words
What is it for?
Use it to revert commits, undo migrations, or roll back deployments on platforms such as Kubernetes, Docker Compose, or Heroku.
Why use it?
It reduces the risk of reversing the wrong change or leaving the system unhealthy after an incident.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 113 skills, 44 agents, 14 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/softspark/ai-toolkit/rollback
Any agent
npx skills add softspark/ai-toolkit --skill rollback
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 113 skills, 44 agents, 14 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rollback

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/rollback.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/rollback)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/rollback"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/rollback.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,193 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01193
Opus 5 $0.00019 $0.00596
Sonnet 5 $0.00008 $0.00239
Haiku 4.5 $0.00004 $0.00119

Measured 2d ago against content hash f65750fa7a7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rollback scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/rollback_info.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

app/skills/rollback/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/rollback - Safe Rollback

$ARGUMENTS

What This Command Does

Safely revert changes with appropriate safety checks and confirmation.

Rollback Types

1. Git Rollback

# Revert last commit (creates new commit)
git revert HEAD --no-edit

# Revert specific commit
git revert <commit-sha> --no-edit

# Revert to specific state (CAUTION)
git reset --soft <commit-sha>  # Keep changes staged

2. Database Migration Rollback

Tool Command
Alembic alembic downgrade -1
Prisma npx prisma migrate resolve --rolled-back <name>
Laravel php artisan migrate:rollback --step=1
Django python manage.py migrate <app> <previous>
Flyway flyway undo

3. Deployment Rollback

Platform Command
Kubernetes kubectl rollout undo deployment/<name>
Docker Compose docker compose up -d --force-recreate (with previous image tag)
Heroku heroku rollback

Gather Rollback Context

Run the rollback info script to assess current state before rolling back:

python3 ${CLAUDE_SKILL_DIR}/scripts/rollback_info.py

Returns JSON with:

  • git{} - current/previous commit, branch, commits ahead, uncommitted changes
  • migrations{} - detected tool (alembic/prisma/laravel/django/drizzle), rollback command
  • docker{} - running services and image tags

Safety Checks (MANDATORY)

Before any rollback:

  1. Confirm what will be reverted (show diff/plan)
  2. Check for dependent changes that may break
  3. Verify backup exists (for database rollbacks)
  4. Get explicit user confirmation

Usage Examples

/rollback                    # Interactive - asks what to rollback
/rollback git last           # Revert last git commit
/rollback migration          # Rollback last database migration
/rollback deploy             # Rollback to previous deployment

CRITICAL: Always confirm with the user before executing destructive rollback operations.

Rules

  • MUST confirm the current state AND the target state before rolling back — surface the diff in plain English
  • MUST verify a recent backup exists (for DB rollbacks) or explicitly warn the user that none was found
  • NEVER roll back without an explicit "yes" from the user — rollbacks are irreversible in the user-experience sense even when technically reversible
  • NEVER git reset --hard on a branch others have pulled from — it rewrites shared history
  • CRITICAL: after any rollback, run a health check (/health or the project's equivalent) to confirm the target state is stable — a "successful" rollback to a broken baseline is worse than the original state
  • MANDATORY: log the rollback with timestamp, scope, and reason — post-mortems need this trail

Read the full file on GitHub · 114 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 114 lines · 39 tokens per session scan A f65750fa7a7b

Subscribe to this mod's changes

rollback is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 1,193 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

roo-bedrock-custom-arn

Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.

OnlyTerp/prompt-cache-skills · 29 tokens

publish-site

Versioned site deploys to GitHub/Cloudflare/Netlify Pages.

NousResearch/hermes-agent · 19 tokens

argocd-expert

Expert-level ArgoCD GitOps deployment, application management, sync strategies, and production operations. Use when the user mentions GitOps, Kubernetes, continuous deployment, declarative, or automation, or when the task involves ArgoCD Architecture, Application CRD, AppProject, or ApplicationSet.

personamanagmentlayer/pcl · 65 tokens

monitoring-alerting

Monitoring and alerting design reviewer for production backend services. ALWAYS use when writing Prometheus alerting rules, designing Grafana dashboards, defining SLI/SLO, configuring alert routing (PagerDuty/OpsGenie/Slack), or reviewing existing monitoring setups. Covers SLI/SLO definition, alert rule quality…

johnqtcg/awesome-skills · 137 tokens

create-pr

Create evidence-backed pull requests to the GitHub main branch with strict preflight, quality, and security gates. Use when users ask to create/submit/open/update a PR to main (including private repos), decide draft vs ready state, and provide reviewer-ready context for team review.

johnqtcg/awesome-skills · 59 tokens

git-commit

Safely create a git commit by validating repository state, staging intended changes, scanning for secrets/conflicts, generating a Conventional Commits message (repository convention first, else an English Angular default) from the staged diff, and committing without amend.

johnqtcg/awesome-skills · 52 tokens