Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

file-deleter

verified

REQUIRED for all file and directory deletions. This system replaces rm/rmdir commands. Always use this skill instead of bash rm commands when removing any files or directories. Moves items to recoverable .deleted/ trash folder with preserved structure.

View on GitHub

Marketplace

meckert-marketplace

nitromike502/meckert-claude-code-marketplace

Plugin

file-deleter

workflow

Repository

nitromike502/meckert-claude-code-marketplace

plugins/file-deleter/skills/file-deleter/SKILL.md

Last Verified

February 4, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/nitromike502/meckert-claude-code-marketplace/blob/main/plugins/file-deleter/skills/file-deleter/SKILL.md -a claude-code --skill file-deleter

Installation paths:

Claude
.claude/skills/file-deleter/
Powered by add-skill CLI

Instructions

# File Deleter Skill - MANDATORY DELETION METHOD

**CRITICAL**: This skill MUST be used for ALL file and directory deletion operations. The `rm` command is blocked on this system.

## System Policy

- **ALL deletions** must use this skill's `delete-file.js` script
- Direct `rm`, `rm -rf`, `rmdir` commands are BLOCKED
- This applies to cleanup, refactoring, removing old files, or any deletion operation
- No exceptions - even for temporary files or build artifacts

## When to Use

Use this skill ANY time you need to:
- Remove any file (code, config, markdown, etc.)
- Delete any directory (empty or with contents)
- Clean up temporary files
- Remove build artifacts
- Delete old/unused code
- Perform any operation that would normally use `rm` or `rmdir`

## How It Works

The skill uses a Node.js script that:
1. Finds the project root (where `.git` and `.claude` directories exist)
2. Moves specified files/directories to `.deleted/` while preserving their path structure
3. Creates a `.gitignore` in `.deleted/` that ignores all contents
4. Handles both absolute and relative paths
5. Recursively moves directories with all contents
6. Overwrites existing files/directories in `.deleted/`

## Script Location

The `delete-file.js` script is located in the scripts subdirectory of this skill.

When Claude Code loads this skill, the base directory path is provided, allowing the script to be located at `<skill-base-dir>/scripts/delete-file.js`.

## Usage

**Standard deletion syntax** - use this for all deletions:

```bash
node <skill-base-dir>/scripts/delete-file.js <path1> [path2] [path3] ...
```

**Examples:**
```bash
# Delete single file
node <skill-base-dir>/scripts/delete-file.js src/old-component.tsx

# Delete multiple files
node <skill-base-dir>/scripts/delete-file.js file1.txt file2.js dir/file3.md

# Delete entire directory
node <skill-base-dir>/scripts/delete-file.js old-features/

# Delete multiple directories and files
node <skill-base-dir>/scripts/delete-file.js temp/ b

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2655 chars