Skip to main content
ClaudeWave
ES, Spanish
Skill262 estrellas del repoactualizado 7mo ago

rollback-changes

This Claude Code skill automatically reverses failed workflow phases by reading a changes log file and restoring the previous system state through file restoration, artifact deletion, and command reversal. Use it when workflow phases fail and require error recovery, such as after unsuccessful bug fixes, security patches, or refactoring operations that need state restoration before retrying or abandoning the task.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/maslennikov-ig/claude-code-orchestrator-kit /tmp/rollback-changes && cp -r /tmp/rollback-changes/.claude/skills/rollback-changes ~/.claude/skills/rollback-changes
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Rollback Changes

Rollback failed workflow phases by reading changes log and reversing tracked modifications.

## When to Use

- Workflow phase fails and needs state restoration
- Error recovery in worker agents
- Quality gate failures requiring revert

## Input

```json
{
  "changes_log_path": ".bug-changes.json",
  "phase": "bug-fixing",
  "confirmation_required": true
}
```

## Changes Log Format

```json
{
  "phase": "bug-fixing",
  "timestamp": "2025-10-18T14:30:00Z",
  "files_modified": [{"path": "src/app.ts", "backup": ".rollback/src-app.ts.backup"}],
  "files_created": ["src/new-file.ts"],
  "commands_executed": ["pnpm install", "pnpm build"],
  "git_commits": ["abc123"],
  "artifacts": [".bug-fixing-plan.json"]
}
```

## Process

### 1. Read & Parse Changes Log
Use Read tool to load JSON. Validate required fields: phase, timestamp, files_modified, files_created, commands_executed, git_commits.

### 2. Request Confirmation (if required)
Show summary of changes to revert. If user declines, return dry run result.

### 3. Restore Modified Files
```bash
cp "{backup}" "{path}"  # For each {path, backup} in files_modified
```

### 4. Delete Created Files
```bash
rm -f "{file}"  # For each file in files_created
```

### 5. Revert Commands
- `pnpm install` → re-run to restore lockfile
- `git add *` → `git restore --staged .`
- `pnpm build` → `rm -rf dist/`
- Other → log warning (cannot auto-revert)

### 6. Revert Git Commits
```bash
git revert --no-edit {sha}  # In reverse order
```

### 7. Cleanup Artifacts
Remove plan files and temporary artifacts.

## Output

```json
{
  "success": true,
  "phase": "bug-fixing",
  "actions_taken": ["Restored src/app.ts", "Deleted src/new-file.ts", "Reverted abc123"],
  "files_restored": 1,
  "files_deleted": 1,
  "git_commits_reverted": 1,
  "errors": [],
  "warnings": ["Backup not found: .rollback/file.backup (skipped)"]
}
```

## Error Handling

- **Missing log**: Return error "Changes log not found"
- **Invalid JSON**: Return parsing error
- **Backup not found**: Log warning, continue (partial rollback OK)
- **Git conflicts**: Log error with manual instructions, continue

## Safety Features

- Confirmation by default before any changes
- Partial rollback acceptable (documented in warnings)
- Never delete without verifying backup exists
- All actions logged for audit trail

## Worker Integration

Workers should track changes during operations:
1. Create `.{domain}-changes.json` before modifications
2. Create backups in `.rollback/` for modified files
3. Log all file creates, commands, and commits
4. On failure: invoke rollback-changes with confirmation_required=false
algorithmic-artSkill

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

artifacts-builderSkill

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

beadsSkill
beads-initSlash Command

Initialize Beads issue tracking in your project with interactive configuration setup.

calculate-priority-scoreSkill

Calculate priority score for bugs, issues, or tasks based on severity, impact, and likelihood. Use for bug prioritization, task ordering, or risk assessment.

canvas-designSkill

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

changelog-generatorSkill

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

cleanup-health-inlineSkill

Inline orchestration workflow for dead code detection and removal with Beads integration. Provides step-by-step phases for dead-code-hunter detection, priority-based cleanup with dead-code-remover, and verification cycles.