file-deleter

Move files and directories to a recoverable .deleted/ trash instead of removing them.

Updated Nov 25, 2025
One-click install
npx skills add https://github.com/nitromike502/meckert-claude-code-marketplace --skill file-deleter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-deleter
Source: https://github.com/nitromike502/meckert-claude-code-marketplace/tree/main/plugins/file-deleter/skills/file-deleter
Command: npx skills add https://github.com/nitromike502/meckert-claude-code-marketplace --skill file-deleter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill replaces risky rm/rmdir style deletions with a safe, recoverable workflow. It moves files and directories to a hidden .deleted/ trash while preserving their original path structure, avoiding permanent data loss and enabling easy restoration.

Core Features & Use Cases

  • Safety-first deletions: Prevents permanent removal by routing deletions through a recoverable trash.
  • Preserved structure: Keeps directory hierarchy intact inside .deleted/.
  • Use Case: Clean up temporary or obsolete files during refactoring without fear of irreversible loss; restore items from .deleted/ when needed.

Quick Start

To delete a path, run: node <skill-base-dir>/scripts/delete-file.js path/to/target

Frequently Asked Questions about file-deleter

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

FAQPage Schema
How do I safely delete files without permanent loss?

Safe deletion moves files to a recoverable .deleted/ trash instead of permanently removing them. This Skill implements a Node.js script that routes deletions through a hidden trash directory while preserving the original directory structure, allowing you to restore files if needed.

Can I recover deleted files from a trash after removal?

Yes. Deleted files and directories are moved to .deleted/ with their original path structure intact, making restoration straightforward. Check the .deleted/ directory to locate and restore any item you removed.

How do I use this Skill to clean up temporary files during refactoring?

Run the provided Node.js script with the file or directory path as an argument. The script detects your project root via .git and .claude directories, moves the target to .deleted/ preserving its hierarchy, and handles both absolute and relative paths automatically.

Does this work with non-existent paths or missing files?

The script skips non-existent targets gracefully without error, so you can safely run deletion commands on paths that may or may not exist. Existing entries in .deleted/ are overwritten when needed.

What's the difference between this and using rm or rmdir?

Unlike rm/rmdir which permanently erase data, this approach routes deletions through a recoverable trash. Files remain accessible in .deleted/ until explicitly purged, eliminating irreversible loss during cleanup tasks.

Do I need Git or special dependencies to run this?

The script requires a .git or .claude directory to locate your project root but has no external npm dependencies. It's a standalone Node.js script that works across codebases, configs, docs, and build artifacts.