---
title: "我做了一个 Claude Code 模组，能显示每一轮改了什么，并让你从中还原单个文件"
url: "https://claudemods.dev/zh-cn/builds/i-made-a-claude-code-mod-that-shows-what-each-turn-changed-a-5ed667"
source: "https://github.com/candygoogy/notary"
source_type: "github"
repo: "https://github.com/candygoogy/notary"
author: "WaretaGarasu"
author_handle: "WaretaGarasu"
stars: 1
category: "工作流与 CI"
categories: ["workflow"]
tags: ["diff", "hooks", "plugin", "revert", "session-timeline"]
permission_level: null
scan_complete: false
added: "2026-10-16T16:52:43.328Z"
updated: "2026-10-16T16:52:43.329Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# 我做了一个 Claude Code 模组，能显示每一轮改了什么，并让你从中还原单个文件

Reddit 上展示了 Changes，这是一个 Claude Code 模组，它添加了一个 /changes 面板，按轮次显示文件编辑时间线，包含每个文件的差异以及一个需按两次的 Revert，可将单个文件恢复到该轮之前的状态；还有一个配套的 Receipts，用于在最后一次编辑后验证声称的测试运行。两者都是本地运行、MIT 许可，并可通过 /plugin 从 candygoogy/notary 市场安装。

## Description

Changes 在对话记录旁添加了一个面板，按最新轮次优先列出会话时间线，包括触及文件的工具调用和子代理，并显示每个文件的差异（包括新文件）以及 Keep/Revert 控件。Revert 将单个文件恢复到该轮之前的状态，需要按两次，并且只有在文件与 Claude 留下的内容匹配时才会写入；然后 Claude 会收到一条隐藏提示，使其重新读取该文件。还原是按文件而非按代码块，历史记录覆盖一次对话，shell 命令的更改仅在 git 仓库内被跟踪。配套的 Receipts 会在 Claude 最后一次编辑后检查实际运行了什么，当它声称测试通过时，如果失败会将其送回一次。在 Claude Code 2.1.287+ 上使用 /plugin install changes --marketplace candygoogy/notary 和 /plugin install receipts --marketplace candygoogy/notary 安装。仓库：https://github.com/candygoogy/notary

## Original README

When Claude works through a long task, I often want to answer "what did turn 12 change, and can I undo just that one file?" /diff shows the whole working tree, and /rewind goes back to an earlier point for every file at once. So I built Changes, a Claude Code mod. Not staged: ordinary prompts, one file reverted, and Claude notices. /changes opens a pane next to the transcript: - a timeline of the session, newest turn first, with the tool calls and subagents that changed files; - each file's diff, including new files' contents; - Keep and Revert per file. Revert puts the file back the way it was before that turn. It takes two presses, and it only writes if the file is exactly what Claude left, so it won't silently overwrite your own edits. Afterwards Claude gets a hidden note, so it re-reads the file instead of editing from memory. In the GIF, it notices the revert and points out that its test no longer matches. Nothing in that run is staged. Limits, up front: reverts are per file, not per hunk. The history covers one conversation (/clear starts it fresh). Changes made by shell commands are tracked only inside a git repo. It ships with a companion, Receipts. When Claude says "all tests pass", Receipts checks what it actually ran after its last edit, and sends it back once if the tests failed. It's quiet by default. On my 105 real sessions, it would have shown 5 warnings, no ❌, and never sent Claude back. Both are local only: no network, no telemetry, no model calls (Receipts has an opt-in "smart check" that asks a model; it's off by default). Built and used on Windows, with CI on Windows, macOS and Linux. MIT. Install (Claude Code 2.1.287+): /plugin install changes --marketplace candygoogy/notary /plugin install receipts --marketplace candygoogy/notary It's v0.1. The most useful bug report is a revert that wrote the wrong bytes, or a refusal whose reason didn't make sense. Repo: https://github.com/candygoogy/notary   submitted by   /u/WaretaGarasu   to   r/ClaudeAI [link]   [comments]
