scratch-trash-guard

Require a mode choice and confirmation code before deleting files or directories.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/KwongFuk/codex-skills --skill scratch-trash-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scratch-trash-guard
Source: https://github.com/KwongFuk/codex-skills/tree/main/global/scratch-trash-guard
Command: npx skills add https://github.com/KwongFuk/codex-skills --skill scratch-trash-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guard deletions by enforcing a mandatory mode choice and a typed confirmation code before any destructive file operation.

Core Features & Use Cases

  • Enforces explicit consent for destructive actions on files or directories.
  • Offers two safety options: permanent deletion or moving to a dated trash directory with preserved paths.
  • Generates a unique, exact confirmation code required to execute the action.
  • Handles ambiguity by asking for a clear mode and code before proceeding.
  • Provides final outcome reporting with the trash location or confirmation of permanent deletion.

Quick Start

Identify candidate files, present the target set, choose a mode (permanent delete or move to trash), then enter the exact confirmation code to execute.

Frequently Asked Questions about scratch-trash-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental file deletion when running automated cleanup workflows?

Prevent accidental file deletion by enforcing a mandatory mode choice and a typed confirmation code before executing any destructive file operations. This two-step safety workflow ensures explicit user consent for requests to delete, remove, or purge files across projects.

Can I move files to a trash directory instead of permanently deleting them?

Yes, you can move files to a dated trash directory instead of permanently deleting them. This safety mode preserves the original relative paths within the trash location, allowing you to safely archive or discard files while keeping a recoverable backup.

How does the confirmation code mechanism work for destructive file operations?

The confirmation code mechanism requires you to select a deletion mode and then type a generated, exact confirmation code before execution. This explicit consent step prevents unintended destructive actions by verifying clear user intent before proceeding.

What file operations are guarded by the deletion confirmation workflow?

The deletion confirmation workflow guards requests to delete, remove, clean up, purge, discard, or archive files and directories across projects. It intercepts these destructive file operations to enforce a mandatory mode choice and explicit user confirmation.

Do I need any external dependencies to use the file deletion safety guard?

No external dependencies are required to use the file deletion safety guard. It operates independently to enforce explicit consent for destructive actions, generating unique confirmation codes and handling trash routing without additional modules.