rollback

rollback is a skill for Claude Code from ryanzhao1011/workframe. It costs 32 tokens per session (1,246 once invoked), scanned A, original, MIT.

A tool for undoing recent automatic changes or the changes associated with a named proposal, using recorded backups.

In plain words
What is it for?
Use the rollback command to list recent reversible changes, undo the latest one, or restore a specified proposal.
Why use it?
It provides a defined way to restore earlier files and related rollback records when an automatic change must be reversed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the core plugin — 36 skills, 4 agents, 12 hooks shipped together

Good fit Use the rollback command to list recent reversible changes, undo the latest one, or restore a specified proposal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ryanzhao1011/workframe/rollback
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.

Any agent
npx skills add ryanzhao1011/workframe --skill rollback
Clone the repo
git clone --depth 1 https://github.com/ryanzhao1011/workframe

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 36 skills, 4 agents, 12 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/ryanzhao1011/workframe/rollback/github.svg)](https://agentmods.dev/skills/ryanzhao1011/workframe/rollback)
Your own site
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/rollback"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/rollback/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rollback

Your own site · 80×15
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/rollback"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/rollback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00032 $0.01246
Opus 5.5 $0.00013 $0.00498
Sonnet 5.5 $0.00006 $0.00249
Haiku 4.5 $0.00003 $0.00125

Measured 15d ago against content hash 94945d33631e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 15d ago.

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.

plugins/core/skills/rollback/SKILL.md · 57 lines

How it starts

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

/core:rollback 回滚自动变更

后台自迭代作业按 job journal 恢复,不套用下文旧 L1/L2 的整文件备份恢复。先执行 workframe-selfiter rollback --project <项目根> --job-id <id> 给用户看改前改后与冲突,remove_file=true 表示会移除该作业新建的文件;用户明确确认该版后才加 --review-hash。禁止覆盖其后的用户编辑;涉及条目消失或旧口径恢复也须明确确认。未完成写入用 recover 补齐原作业进度,不新建作业重做。inconclusive 保留恢复材料,不自动按验证通过清理。

用途

用户显式 /core:rollback 时执行。Claude 不会自动调用。

回滚目标:

  • L1 Librarian 变更:从 logs/librarian-snapshots/{YYYY-MM-DD}/{HH-mm-ss}-<role>-MEMORY.md 还原 MEMORY.md,同时从同目录的 {HH-mm-ss}-<role>-memory-index-entries.json 还原对应 sidecar entries(避免 MEMORY.md 与 .workframe/state/memory-index.json 不一致)
  • L2 self-iteration 变更:从 {target-dir}/versions/{YYYYMMDD-HHmmss}-{target-basename}.bak 还原;若 rollback-index entry 的 targets 是数组(多文件 L2 变更),逐一回滚每个 target 的备份文件
  • 指定 proposal:按 rollback-index entry 中的 targets[] 还原(这是当时实际执行的候选的 targets,不含未执行候选的 target——见 self-iteration/SKILL.md 阶段 5 step 7 约束);若 entry 缺失,降级到读 projects/proposals/applied/PROP-<id>.yaml 的 proposed_change.targets[](注意旧版可能多 candidate,需与 applied_option 字段交叉确认)

输入

  • 无参数 → 列出最近可回滚的 10 项,AskUserQuestion 让用户选
  • PROP-20260424-001 → 直接回滚该提案
  • last → 回滚最近一次

执行步骤

  1. Read .workframe/state/rollback-index.json(由 self-iteration 阶段 5 写入 entry),列出候选
    • v2 格式(多文件 L2 变更):{"id":"RB-<YYYYMMDD-NNN>","proposal_id":"<id>","targets":["<path1>","<path2>"],"backups":["<path1>","<path2>"],"applied_at":"<ISO-8601>","applied_option":"<A|B|C>"}
    • legacy 格式(v1 单 target,仍需兼容历史 entry):{"id":...,"proposal_id":...,"target":"<path>","backup":"<path>","applied_at":...,"applied_option":...}
    • 解析规则:优先读 targets/backups 数组;若不存在则回退到 target/backup 单字符串字段并视为单元素列表
  2. 若候选为空,降级扫描:
    • logs/librarian-snapshots/**/*-MEMORY.md 最近 10 个
    • projects/proposals/applied/*.yaml 最近 10 个(反查其 applied_option 对应的 target + {target-dir}/versions/{YYYYMMDD-HHmmss}-{target-basename}.bak 备份)
  3. 用 AskUserQuestion 让用户选一项
  4. 执行回滚:
    • 读备份文件 → Write 到目标文件(多 target 时逐一执行)
    • L1 MEMORY 类回滚:同步还原 sidecar entries(读取与快照同目录的 {HH-mm-ss}-<role>-memory-index-entries.json,把其中条目合并回 .workframe/state/memory-index.json 的 entries 字典,覆盖同 key)
    • 若是 proposal,将其从 applied/ 移回 rejected/ 并记录回滚原因
  5. 追加 events.jsonl(多 target 时逐一 append):{"ts":"<now ISO-8601>","type":"rollback_applied","target":"<path>","source":"<backup>"}
  6. 追加 projects/changelog.md 一条 ## <date> Rollback 记录
  7. 提示用户已回滚 + 让其手动 verify 目标文件

Read the full file on GitHub · 57 lines

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. 15d ago Changed · +2 lines 94945d33631e
  2. 1mo ago Changed 771ce255ef45
  3. 3mo ago First seen · 55 lines · 32 tokens per session scan A 31d7e75383f0

Subscribe to this mod's changes

rollback is a skill published in the GitHub repository ryanzhao1011/workframe (9 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 1,246 once invoked, about $0.0001 per session on Opus 5.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-08-31.

Related

rollback compared with skills from other repositories

rollback next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rollbackryanzhao1011/workframeSkill95d agoMITA32Claude Code
OCR Review-to-Approval Loopspencermarx/open-code-reviewSkill39519d agoApache-2.0A213Claude Code
land-and-deployFlorianBruniaux/claude-code-pluginsSkill475d agoMITA43Claude Code
pr-triageFlorianBruniaux/claude-code-pluginsSkill475d agoMITA73Claude Code
release-notes-generatorFlorianBruniaux/claude-code-pluginsSkill475d agoMITA59Claude Code
git-ai-archaeologyFlorianBruniaux/claude-code-pluginsSkill475d agoMITA82Claude Code
git-worktree-cleanFlorianBruniaux/claude-code-pluginsSkill475d agoMITA19Claude Code