← ClaudeAtlas

rollbacklisted

Roll back files to their pre-agent snapshots. List snapshots or restore a specific file.
palginpav/orchestray · ★ 0 · AI & Automation · score 71
Install: claude install-skill palginpav/orchestray
# Workspace Snapshot Rollback The user wants to list or restore pre-write file snapshots captured by the snapshot hook. Snapshots live in `.orchestray/snapshots/<orchestration_id>/<spawn_id>/`. Each snapshot file is named `<sanitized-path>.snapshot` where the original absolute path has its `/` characters replaced with `__` and leading separators stripped. ## Protocol ### Step 1 — Locate the snapshot root ```bash ls .orchestray/snapshots/ ``` If `.orchestray/snapshots/` does not exist or is empty, report: "No snapshots found. Snapshots are captured automatically when agents write files during an orchestration." Then stop. Determine the active orchestration ID: - Read `.orchestray/audit/current-orchestration.json` → `orchestration_id`. - If absent, use the most recently modified directory under `.orchestray/snapshots/`. Set `ORCH_DIR=.orchestray/snapshots/<orchestration_id>`. --- ### No-argument invocation — List all snapshots When the user runs `/orchestray:rollback` with no arguments: 1. Find all `.snapshot` files under `ORCH_DIR`: ```bash find .orchestray/snapshots/<orchestration_id> -name "*.snapshot" -printf "%T@ %p\n" | sort -n ``` 2. For each snapshot, derive the original path by reversing the sanitization: - Strip the `.snapshot` suffix from the filename - Replace `__` with `/` - Prepend `/` to restore the absolute path 3. Display a table: ``` ## Workspace Snapshots — <orchestration_id> | Spawn ID | Agent | Original Path | Snapshot Time | |----