marketplace:local-cleanup

marketplace:local-cleanup is a command for Claude Code from Marcel-Bich/marcel-bich-claude-marketplace. It costs 16 tokens per session (409 once invoked), scanned C, original, MIT.

A command that restores the original installed plugin after local testing. It uses a backup created by the local-copy command.

In plain words
What is it for?
Use it after testing a local plugin version when you want to restore the published installation.
Why use it?
It removes the temporary test version and returns the plugin installation to its previous state.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Good fit Use it after testing a local plugin version when you want to restore the published installation.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Marcel-Bich/marcel-bich-claude-marketplace

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for marketplace:local-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup/github.svg)](https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup)
Your own site
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for marketplace:local-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/local-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 409 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00409
Opus 5 $0.00008 $0.00204
Sonnet 5 $0.00003 $0.00082
Haiku 4.5 $0.00002 $0.00041

Measured 8d ago against content hash b3cf19a95a04, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

marketplace:local-cleanup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "${INSTALL_PATH}"/*
plugins/marketplace/commands/local-cleanup.md · 92 lines

What it actually says

Local Cleanup - Restore original version

Restore the original plugin version from backup.

Steps

1. Find existing backups

List all backups:

ls -d /tmp/marketplace-backup-* 2>/dev/null

If no backups:

  • Inform user that no backups exist
  • End the process

If one backup:

  • Use it automatically

If multiple backups:

  • Ask user with AskUserQuestion which one to restore

2. Find plugin installation path

Extract plugin name from backup path:

BACKUP_PATH="/tmp/marketplace-backup-<plugin-name>"
PLUGIN_NAME="<from-backup-path>"

Read the installed plugin info:

cat "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/installed_plugins.json"

Find the installPath for the plugin.

3. Restore

Restore the original version:

INSTALL_PATH="<from-installed_plugins.json>"

# Remove current (local test) version
rm -rf "${INSTALL_PATH}"/*

# Restore backup
cp -r "${BACKUP_PATH}"/* "${INSTALL_PATH}/"

4. Remove backup

Ask user if backup should be deleted:

Restore completed.
Should the backup in /tmp/marketplace-backup-{plugin}/ be deleted?

If yes:

rm -rf "${BACKUP_PATH}"

5. Confirmation

Inform user:

  • Original version was restored
  • IMPORTANT: Restart Claude Code for changes to take effect

Error handling

  • If no backup: Inform user
  • If plugin no longer installed: Inform user, keep backup
  • If restore fails: Do not delete backup, inform user
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 92 lines · 16 tokens per session scan C b3cf19a95a04

Subscribe to this mod's changes

marketplace:local-cleanup is a command published in the GitHub repository Marcel-Bich/marcel-bich-claude-marketplace (13 stars, last pushed 2d ago), licensed MIT. It adds 16 tokens to every session and 409 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.