agentleFS
MFaizR77MFaizR77/turnback/skills/undo/SKILL.md

undo

Skill1 starsChanged 29 days agoMITView on GitHub

Undo the file changes of an agent turn with Turnback, including shell commands and untracked files, when the user requests a restore or invokes Turnback undo.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Call restore with target and, if the user named files, paths.

    line 11
  2. Very specific:

    Ask the user to confirm. Only after a clear yes, call restore again with the same arguments plus token set to confirm_token.

    line 13

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Restore project files with the turnback MCP tools from this plugin. Always pass workspace set to the current project directory.

  1. Call list_turns with limit 5. If the user's request or invocation arguments name a turn ID, use it; otherwise use the newest turn. Tell the user which turn: its time, agent, prompt, and changed file count. If the user wants to keep part of the turn, call turn_steps and use the ref of the first step to undo as the target; that returns the files to just before that step. If the user only wants one file or folder back (for example one deleted several turns ago), call recover_file with its path and use the returned target and paths instead.
  2. Call restore with target and, if the user named files, paths. This call only returns a plan and a confirm_token; nothing is written yet.
  3. Show the plan: files to rewrite, delete, or recreate. Point out actions marked uncertain; those files may contain the user's own edits.
  4. Ask the user to confirm. Only after a clear yes, call restore again with the same arguments plus token set to confirm_token.
  5. Report restored, skipped, and failed files and the safety snapshot. Files you read earlier in this conversation may have changed: read them again before editing. The user can reverse this with the redo tool.

If MCP is unavailable, resolve the installed plugin root from PLUGIN_ROOT (Codex) or CLAUDE_PLUGIN_ROOT (Claude Code) and run node <plugin-root>/dist/cli.js in the project directory. Quote the resolved path for the current shell. Use undo --dry-run for the latest turn, restore <turn> --dry-run for a named turn, or recover <path> --dry-run for one file or folder. Preserve any requested --path or --before-step. Show the plan and, after confirmation, run the same command with --yes instead of --dry-run. If the plugin root cannot be resolved, report that the integration is unavailable.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.