Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By roli-lpciv0.1.4Apache-2.0In 1 marketplace
Recoverable deletion for coding agents: move files to trash, list them, and restore them with agent-trash.
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A safety net for coding-agent sessions: block permanent deletes and keep recovery within reach.
Agent Trash Guard is developed by Hermes Labs.
Hermes Labs is an agentic infrastructure company building the reliability layer for autonomous systems.
Install · What gets blocked · Recovery workflow · How it works · Tests
Native guards for Claude Code, Codex, Cursor, Gemini CLI, OpenClaw, and Pi, backed by one detector and an inspectable agent-trash workflow.
Agents are good at cleaning up. Sometimes they clean up the wrong thing, and
rm has no undo. This project provides native pre-tool adapters for Claude
Code, Codex, Cursor, Gemini CLI, OpenClaw, and Pi, backed by one detector and the agent-trash CLI.
Recognized guarded delete commands are blocked before execution; use
agent-trash put to make the recoverable move you can inspect and reverse.
agent-trash gc reclaims the space those moves accumulate without ever
reclaiming work that git cannot prove is safe to lose.
The project was originally published as claude-trash-guard. GitHub redirects
that historical repository URL, and claude-trash remains as a compatibility
command. New integrations and documentation use the platform-neutral
agent-trash-guard name.
No dependencies beyond Python 3 (stdlib only) and bash.
No plugin, no host setup. This runs the real hook and the real CLI against a throwaway directory and proves the whole loop — block, trash, list, restore — byte-for-byte:
git clone https://github.com/hermes-labs-ai/agent-trash-guard.git
cd agent-trash-guard
./tests/recoverability-demo.sh
You'll see a rm -rf get blocked cold (hook exit 2, file untouched), then
agent-trash put / list / restore move the file out and back with a
matching SHA-256. Under a second on most machines, and it never touches your
files or your real trash directory.
git clone https://github.com/hermes-labs-ai/agent-trash-guard.git
cd agent-trash-guard
./install.sh
install.sh symlinks agent-trash (plus the legacy claude-trash alias)
into ~/.local/bin and registers the Claude adapter in
~/.claude/settings.json. A timestamped backup of settings.json is written
before any change, existing settings and other hooks are preserved, and the
edit is idempotent. If ~/.local/bin is not on your PATH, install.sh prints
the exact export PATH=... line to run for the current shell. Restart any
running Claude Code session afterwards.
It comes off just as cleanly: ./uninstall.sh restores settings.json from
the backup and removes the symlinks, leaving your trash directory intact.
The repository root is one portable Agent Plugin (plugin.json, Agent Plugins
1.0.0) with one canonical skill, skills/agent-trash-guard/SKILL.md. Choose a
host route that loads the executable guard. A skill-only install teaches the
workflow but cannot intercept shell commands.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub roli-lpci/agent-trash-guard --plugin agent-trash-guardPlugins from other owners that cover similar ground