safe-rm

Classify Git repository files into ALLOW, TRASH, or BLOCK for safe deletion.

Updated Aug 27, 2026
Search Tags:#git#rm#audit-log
One-click install
npx skills add https://github.com/kayaman/safe-rm --skill safe-rm-kayaman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-rm
Source: https://github.com/kayaman/safe-rm/tree/main/skills/safe-rm
Command: npx skills add https://github.com/kayaman/safe-rm --skill safe-rm-kayaman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely deleting files in Git repositories is error-prone and can lead to loss of untracked work or important artifacts. This Skill enforces safe deletion practices by classifying files into ALLOW, TRASH, or BLOCK, and by routing untracked content to a trash system while keeping a detailed audit log.

Core Features & Use Cases

  • Automatic classification of delete targets into ALLOW, TRASH, or BLOCK
  • Trash untracked source/docs to enable recovery
  • Preserve build artifacts and dependencies while cleaning
  • Maintain an auditable deletion log
  • IDE agent compatibility with Cursor, VSCode, and Claude Code

Quick Start

Install the required tools and configure the skill prerequisites, then perform a safe deletion:

  • Ensure git and trash-cli are installed
  • Run a dry-run to preview what would be deleted
  • Execute safe deletions with classification ensuring critical paths are BLOCKed

Frequently Asked Questions about safe-rm

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

FAQPage Schema
How do I prevent accidental deletion of untracked files in Git?

Preventing accidental deletion of untracked files in Git involves classifying delete targets into ALLOW, TRASH, or BLOCK categories. Untracked source and docs are routed to a trash system for recovery, while critical paths are blocked entirely.

Can I clean build artifacts in a Git repository without removing source files?

Cleaning build artifacts without removing source files requires classification rules that distinguish artifacts from untracked content. The system preserves dependencies while moving untracked source and docs to a trash system for safekeeping.

What do I need to safely delete files in Git with an audit trail?

Safely deleting files in Git with an audit trail requires git and trash-cli to be installed. Git provides repository tracking while trash-cli handles routing untracked content to a recoverable trash system, and the skill maintains a detailed deletion log.

How does the file classification system work for safe Git deletions?

The file classification system for safe Git deletions assigns targets to ALLOW, TRASH, or BLOCK categories. ALLOW permits deletion, TRASH routes untracked content to a recovery system, and BLOCK prevents risky rm operations on critical paths.

Is safe-rm compatible with IDE agents like Cursor and VSCode?

Safe-rm is compatible with IDE agents including Cursor, VSCode, and Claude Code. It integrates with these development environments to enforce classification rules and maintain auditable deletion logs during file removal.

What is the safest way to perform rm -rf operations in a Git project?

The safest way to perform rm -rf operations in a Git project is to run a dry-run preview first, then execute deletions with file classification. This approach blocks risky operations on critical paths and routes untracked content to a recoverable trash system.