ClaudeCodeMod

All shelves / Mods / Safety

safe-delete

By charlie947

safe-delete is a Claude Code safety mod by charlie947.

Moves the files Claude deletes to the Bin instead, toasts a receipt, and /undo-delete puts the last batch back.

DrawsHolds a command

Install

The marketplace name is charlie-free-mods.

In your shell
claude plugin marketplace add charlie947/mod-maker
claude plugin install safe-delete@charlie-free-mods
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.2
Repo stars
6
Last change
2026-10-03

What it can reach

  • Draws in the session
  • Holds a command

Claude Code 2.1.287 or newer. Restart Claude Code after installing. The author says it catches the delete commands Claude types, rm, rm -r, rm -rf, find -delete, and git clean, but not a delete inside a script Claude runs or one you run yourself. It works on macOS and Linux. On Windows it stops the delete and asks you to do it by hand.

The marketplace name is charlie-free-mods. Add charlie947/mod-maker. The author's install block also installs mod-maker, a separate plugin this mod does not need.

Demo

The safe-delete section on the author's GitHub page
Screenshot of the author's GitHub page.

What it hooks into

  • prompt.submitWhen you send a prompt
  • tool.callAround a tool call, where it can hold oneBash
  • session.startWhen a session starts
  • command.runWhen you run its slash command/undo-delete

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /undo-deletePut the last batch of files safe-delete moved to the Bin back where they were

Files

The author's source, 3 files. They load when you open them.

Facts

Author
charlie947
Category
Safety
Marketplace
charlie-free-mods
Repo
charlie947/mod-maker
Folder
plugins/safe-delete
Version
0.1.2
Repo stars
6
Last change
2026-10-03
Language
TypeScript
Files
7

Other mods in Safety

loop-detectiveYeonwooSungOpens a case when the same Bash command fails the same way again, ties it to the edits that followed, and shows the live cases in a pane and a status line.display-redactionmelodic-softwareMasks email addresses and secret-shaped text in what Claude Code draws, and leaves the transcript, the model's context, and the files unchanged.jev-permission-gatemadisonrickertHolds a commandHolds routine tool calls in auto mode for Jev to allow or deny, and sends the uncertain ones on to Claude Code's built-in classifier.subagent-wallerikdarlingdataHolds a commandHolds a subagent after a time limit to git, gh, and Markdown or text writes, and nudges a code-changing subagent that has edited nothing.public-repo-guardSzotaszHolds a commandAsks in a popup before a push to a public GitHub repo, or before one goes public, when outgoing commits hold keys, emails, local paths, or private repo names.agentic-qe-fleetproffesor-for-testingHolds a commandHolds a command that would delete or overwrite .agentic-qe learning data, and toasts when the guard is set to notify.secrets-guardBioInfoHolds a commandDenies writes of secret files and credential-shaped content, and Bash that would print those secrets.wp-credential-guardnathanonnHolds a commandMasks a WordPress username and application password, refuses a slash command that carries one, and denies Bash when a placeholder is unknown.cockpittsergeytovarovHolds a commandDraws context weather and the plan limits above the prompt, and can stop a dangerous command.taxi-speedcamdevbrother2024Holds a commandStops a risky shell command and asks before it runs, shown as a taxi speed camera.guardrails-mdberget-aiHolds a commandSends each Bash command to a Berget AI scoring model and blocks it when the score says it destroys data, leaks a secret, or breaks your GUARDRAILS.md.pdpa-thaiBoom-VittHolds a commandRefuses a tool call that repeats a placeholder for Thai or other personal data it redacted before sending, and masks that data on screen.
All 73 in Safety