rollback

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 CodeCodex

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.

agentmods
npx agentmods add skills/ryanzhao1011/workframe/rollback
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, Codex.

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,097 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.01097
Opus 5 $0.00016 $0.00549
Sonnet 5 $0.00006 $0.00219
Haiku 4.5 $0.00003 $0.00110

Measured 2d ago against content hash 31d7e75383f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 55 lines

How it starts

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

/core:rollback 回滚自动变更

用途

用户显式 /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 与 .claude/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>.yamlproposed_change.targets[](注意旧版可能多 candidate,需与 applied_option 字段交叉确认)

输入

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

执行步骤

  1. Read .claude/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,把其中条目合并回 .claude/workframe-state/memory-index.jsonentries 字典,覆盖同 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 · 55 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. 2d 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 (4 stars, last pushed 15d ago), licensed MIT. It adds 32 tokens to every session and 1,097 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

check-understanding

Phase quiz for AI Engineering from Scratch. Trigger with "quiz me", "test phase", "check my understanding", "do I know phase 3", or /check-understanding .

fancyboi999/ai-engineering-from-scratch-zh · 44 tokens

find-your-level

Interactive quiz that maps your AI/ML knowledge to a starting point in the 260-lesson, 20-phase AI Engineering from Scratch curriculum. Trigger phrases: "where should I start", "find my level", "what do I know", "which phase", "assess my knowledge", "placement test", "skip ahead".

fancyboi999/ai-engineering-from-scratch-zh · 71 tokens

agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

lingxling/awesome-skills-cn · 26 tokens

eval-agents

Audit Claude Code agents defined in .claude/agents/ for description specificity, model tier appropriateness, tools scoping, and system prompt quality. Detects dispatch ambiguity between agents, flags over-permissive tool grants, and checks for human-in-the-loop patterns that break programmatic orchestration. Use when…

FlorianBruniaux/claude-code-plugins · 93 tokens

check-cache-bugs

Audit Claude Code setup for cache bugs (CC#40524): sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.

FlorianBruniaux/claude-code-plugins · 38 tokens

git-ai-archaeology

Analyze AI config evolution in a git repo. Use when mapping AI adoption history, finding when configs were first introduced, charting commit velocity by month, or identifying maturity phases in a project's AI tooling.

FlorianBruniaux/claude-code-plugins · 47 tokens