ai-toolkit-rules
Mandatory engineering, security, testing, git, performance, quality, and response rules.…
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.
$ npx -y skills add softspark/ai-toolkit --skill rollback --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/rollbackContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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."
effort: medium
disable-model-invocation: true
argument-hint: "[target: git/db/deploy]"
allowed-tools: Bash, Read
hooks:
PostToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "echo 'Reminder: verify rollback was successful and services are healthy'"
scripts:
- scripts/rollback_info.py$ARGUMENTS
Safely revert changes with appropriate safety checks and confirmation.
# 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
| 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` |
| Platform | Command | |----------|---------| | Kubernetes | `kubectl rollout undo deployment/<name>` | | Docker Compose | `docker compose up -d --force-recreate` (with previous image tag) | | Heroku | `heroku rollback` |
Run the rollback info script to assess current state before rolling back:
python3 ${CLAUDE_SKILL_DIR}/scripts/rollback_info.pyReturns JSON with:
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
/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.**
AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.
Repo: softspark/ai-toolkit
Mandatory engineering, security, testing, git, performance, quality, and response rules.…
Searches past coding sessions for observations, decisions, context. Triggers: mem-search,…
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG,…
Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent,…
Analyzes code quality, complexity, patterns across codebase. Triggers: quality report,…
API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe…