Agent skill

Rollback

by softspark in softspark/ai-toolkit

Rolls back git commit, DB migration, or deploy to known-good with safety + health checks.

Apache-2.0Auto-check: notesDevOps & Cloud

Install Rollback

skills CLI
$ npx skills add softspark/ai-toolkit --skill rollback -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install softspark/ai-toolkit rollback --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/rollback .claude/skills/rollback && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rollback
GitHub stars
179
Token cost
~1.3k tokens
SKILL.md length
557 words
Files
2 (incl. scripts)
Skills in repo
112
Repo updated
First seen
Licence
Apache-2.0

At a glance

Rolls back git commit, DB migration, or deploy to known-good with safety + health checks.

  • Works in 3 steps: Git Rollback → Database Migration Rollback → Deployment Rollback
  • Tasks that involve Database migrations
  • SKILL.md covers What This Command Does, Rollback Types, Gather Rollback Context and Safety Checks (MANDATORY), plus 4 more sections
  • Runs Python scripts from its folder; calls git, kubectl and python3

What it does

Rollback is an agent skill from softspark/ai-toolkit. Rolls back git commit, DB migration, or deploy to known-good with safety + health checks. Triggers: rollback, revert deploy, revert migration, rollback commit, git revert.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/rollback_info.py`).

It sits in DevOps & Cloud, covering Database migrations, Commit messages and Git workflow. It works with Git, Docker, Laravel and Prisma. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Database migrations
  • Tasks that involve Commit messages
  • Tasks that involve Git workflow

Example prompts

  • “Use the rollback skill to roll back git commit, DB migration, or deploy to known-good with safety + health checks”
  • “/rollback”

Requirements

  • Python 3
  • Node.js
  • Docker
  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Git Rollback
  2. Database Migration Rollback
  3. Deployment Rollback

What it can do on your machine

Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • kubectl
    • python3
    • npx
    • php
    • python
    • docker
    • heroku

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, kubectl, npx and docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rollback loads about 1.3k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 557 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 557 words, ~1,284 tokens.

Download SKILL.mdSave it as .claude/skills/rollback/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
rollback
description
Rolls back git commit, DB migration, or deploy to known-good with safety + health checks. Triggers: rollback, revert deploy, revert migration, rollback commit, git revert.
allowed-tools
Bash, Read
effort
medium
disable-model-invocation
true
argument-hint
[target: git/db/deploy]
scripts
scripts/rollback_info.py

/rollback - Safe Rollback

$ARGUMENTS

What This Command Does

Safely revert changes with appropriate safety checks and confirmation.

Rollback Types

1. Git Rollback
bash
# 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
ToolCommand
Alembicalembic downgrade -1
Prismanpx prisma migrate resolve --rolled-back <name>
Laravelphp artisan migrate:rollback --step=1
Djangopython manage.py migrate <app> <previous>
Flywayflyway undo
3. Deployment Rollback
PlatformCommand
Kuberneteskubectl rollout undo deployment/<name>
Docker Composedocker compose up -d --force-recreate (with previous image tag)
Herokuheroku rollback

Gather Rollback Context

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

bash
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
Show full SKILL.md (276 more words)Show less

Gotchas

  • git revert creates a new commit that undoes the target commit. The reverted commit is still in history — if the target commit was sensitive (secret, PII), revert alone does not remove it. Use history rewriting tools for that.
  • Database migration rollbacks sometimes lose data. A forward migration that added a NOT NULL column with a default, then populated it with user data, cannot restore the column contents on rollback — the data is gone.
  • Kubernetes kubectl rollout undo rolls back to the previous ReplicaSet, not to a specific version. If you need "rollback to v1.2.3 specifically", track deployments by image tag and use kubectl set image, not rollout undo.
  • Heroku and similar PaaS platforms rollback restores the slug but not environment config that changed after the rollback target was built — new env vars or add-ons may break the rolled-back version.
  • git reset --soft preserves staged changes, --mixed (default) preserves working tree, --hard discards both. Wrong flag = lost work; always state the flag explicitly in the confirmation prompt.
  • Restoring a DB backup on top of an active database can cause data loss between the backup time and the restore time. Take a fresh snapshot before the restore, even when rolling back — the current (broken) state might contain post-backup user writes.

When NOT to Use

  • For emergency halt of all agent activity — use /panic
  • For undoing local uncommitted edits — use git checkout directly, not this skill
  • For an incident with user-facing impact — use /workflow incident-response for coordinated response
  • For planned schema changes — use /migrate with a forward rollback migration, not this skill after-the-fact
  • For a feature flag off-switch — toggle the flag; rollback is a heavier tool than needed

© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in app/skills/rollback of softspark/ai-toolkit.

  • SKILL.md
  • scripts/rollback_info.py

Open the folder on GitHubat commit d64db2b

Compare with similar skills

Rollback next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rollback compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rollback this skillsoftspark/ai-toolkit179—~1.3kAutomated safety check: NotesApache-2.0
Git Conventionswerf/werf4.7k—~1.3kAutomated safety check: PassApache-2.0
Ssh Skillbadseal/ssh-skill536—~2.4kAutomated safety check: NotesNone
Rtk Skillsopaco/deepwiki-rs3.1k—~1.4kAutomated safety check: PassMIT
Pluggedin Stack OpsVeriTeknik/pluggedin-app103—~1.3kAutomated safety check: NotesMIT
Deploy Playgroundobjeck/objeck-lang165—~2.1kAutomated safety check: WarnCustom licence

Similar skills

  • werf conventions for branch names and commit messages. An agent skill from werf/werf.

    4.7k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Ssh Skill

    badseal/ssh-skill

    A skill your agent uses when a task requires SSH or SCP/SFTP behavior, a remote server, server alias/IP/hostname/user@host, bastion or jump-host access, remote command execution, upload/download…

    536 GitHub stars~2.4k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Rtk Skill

    sopaco/deepwiki-rs

    A skill your agent uses when running shell commands that produce verbose output (git, test, build, lint, package managers, docker).

    3.1k GitHub stars~1.4k tokensUpdated 23 days ago
    DevOps & CloudAuto-check passed
  • Pluggedin Stack Ops

    VeriTeknik/pluggedin-app

    A skill your agent uses when deploying, restarting, verifying or rolling back the containerised plugged.in production stack, when the site returns 404 or 5xx after a deploy or git operation, or when…

    103 GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Deploy Playground

    objeck/objeck-lang

    Deploy/refresh the Objeck web playground (playground.objeck.org) on its VPS over SSH — git pull, rebuild the sandbox Docker image, restart the service, health-check.

    165 GitHub stars~2.1k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • Golem Deployment Version

    golemcloud/golem

    Configuring the deployment logical version in the Golem Application Manifest (golem.yaml): the version: source (git tag, git commit hash, static string, or env var), tuning…

    1.5k GitHub stars~1.8k tokensUpdated today
    DevOps & CloudAuto-check passed

More from softspark/ai-toolkit

All 112 skills in this repo
  • Prepare Test Env

    softspark/ai-toolkit

    Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.

    179 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • A11y Validate

    softspark/ai-toolkit

    Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check: notes
  • Analyze

    softspark/ai-toolkit

    Analyzes code quality, complexity, patterns across codebase.

    179 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Autonomous Dev

    softspark/ai-toolkit

    Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.

    179 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Brand Voice

    softspark/ai-toolkit

    Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • CI

    softspark/ai-toolkit

    Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).

    179 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Questions about Rollback

What does Rollback do?

Rolls back git commit, DB migration, or deploy to known-good with safety + health checks. Rollback is an agent skill from softspark/ai-toolkit. Rolls back git commit, DB migration, or deploy to known-good with safety + health checks.

When should I use Rollback?

Rollback fits situations like: tasks that involve Database migrations; tasks that involve Commit messages; tasks that involve Git workflow.

How do I install Rollback in Claude Code?

Run `npx skills add softspark/ai-toolkit --skill rollback -a claude-code`. Or copy the skill folder (app/skills/rollback in softspark/ai-toolkit) into .claude/skills/rollback in your project. Claude Code loads it when a task matches its description.

How do I install Rollback in Codex?

Run `npx skills add softspark/ai-toolkit --skill rollback -a codex`. Or copy the skill folder (app/skills/rollback in softspark/ai-toolkit) into .agents/skills/rollback in your project. Codex loads it when a task matches its description.

Can I use Rollback in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill rollback -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rollback, .gemini/skills/rollback, .github/skills/rollback and .opencode/skills/rollback in your project.

What does Rollback need to run?

Going by SKILL.md and its folder, Rollback needs Python for the scripts in its folder and the command-line tools its instructions call (git, kubectl, python3, npx, php and python). Our summary lists: Python 3; Node.js; Docker. Its frontmatter pre-approves these tools: Bash, Read.

Does Rollback access the network?

SKILL.md contains no URLs. Its commands use git, npx and docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Rollback safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Rollback use?

Rollback is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rollback use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rollback?

Skills that share tags, products or a category with Rollback: Git Conventions (werf/werf, 4.7k stars), Ssh Skill (badseal/ssh-skill, 536 stars), Rtk Skill (sopaco/deepwiki-rs, 3.1k stars) and Pluggedin Stack Ops (VeriTeknik/pluggedin-app, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rollback?

softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.

Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.