AgentStack
SKILL verified MIT Self-run

Undo

skill-codeshux-tokenwise-undo · by CodeShuX

Restore TokenWise config backups. Lists all .tokenwise-backup-* files found, lets the user pick one to restore in place. Use when the user wants to roll back TokenWise's changes to CLAUDE.md or settings.json, or runs /tokenwise:undo.

No reviews yet
0 installs
7 views
0.0% view→install

Install

$ agentstack add skill-codeshux-tokenwise-undo

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Undo? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

/tokenwise:undo — Restore from backup

Find TokenWise backups and restore one.

Steps

  1. Find backups with Bash:

``bash find ~/.claude -maxdepth 3 -name "*.tokenwise-backup-*" 2>/dev/null find . -maxdepth 3 -name "*.tokenwise-backup-*" 2>/dev/null ``

  1. If none found:

``` No TokenWise backups found.

Backups are created automatically by /tokenwise:install before any file modification. If you've never run /tokenwise:install, there's nothing to undo.

If you removed the backups manually, you'll need to restore from version control or recreate config by hand. ```

  1. If found, print a numbered list:

``` TokenWise backups found:

  1. ~/.claude/CLAUDE.md.tokenwise-backup-20260511-143218

(target: ~/.claude/CLAUDE.md, created )

  1. ~/.claude/settings.json.tokenwise-backup-20260511-143219

(target: ~/.claude/settings.json, created )

Restore which? (1-N, or 'all', or 'cancel'): ```

  1. Parse user response:
  • Single number → restore that one
  • all → restore all backups
  • cancel (or empty) → exit with No changes made.
  1. For each backup to restore:
  • Derive target path: strip the .tokenwise-backup- suffix
  • Confirm: Restore from ? This will overwrite . [Y/n]
  • If Y:
  • Read current target file (if exists), back it up to .tokenwise-pre-undo- (so undo is reversible)
  • Copy backup over target: cp
  • Verify by reading target — confirm content matches backup
  • If n: skip
  1. Optionally delete the consumed backup:

Delete the backup file now that it has been restored? [Y/n]

  1. Print summary:

``` Undo complete.

Restored:

Pre-undo backups (in case you want to redo):

```

  1. Remind user: "Restart Claude Code so the original CLAUDE.md / settings.json take effect."

Edge cases

  • Multiple backups for the same target file: the user should pick which one. Print them sorted by timestamp descending (newest first).
  • Backup file is empty: warn before restoring (Backup is empty. Restoring will leave empty. Continue?).
  • Target file no longer exists: that's fine — restore creates it.

Tools

Read, Write, Bash.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.