safe-rm

Delete files and directories with git-aware backups to .safe-rm.

15|2|Updated Aug 16, 2025
One-click install
npx skills add https://github.com/aspiers/ai-config --skill safe-rm-aspiers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-rm
Source: https://github.com/aspiers/ai-config/tree/main/.claude/skills/safe-rm
Command: npx skills add https://github.com/aspiers/ai-config --skill safe-rm-aspiers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely delete files or directories while preserving recoverability through git-aware backups, preventing accidental data loss.

Core Features & Use Cases

  • Safe deletion of files and directories inside a Git-tracked project, with automatic backups of modified/untracked items to a dedicated .safe-rm directory.
  • Recursive deletion support with the -r flag for directories.
  • Clear post-deletion recovery options from backups or Git history.

Quick Start

Call ai-safe-rm with one or more paths to safely delete them.

Frequently Asked Questions about safe-rm

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

FAQPage Schema
How do I safely delete files in a git repository without losing uncommitted changes?

To safely delete files in a git repository, this skill backs up modified or untracked items to a dedicated .safe-rm directory before deletion, preventing accidental data loss while preserving recoverability through git-aware backups.

What is the best way to back up untracked files before a large-scale codebase cleanup?

The best way to back up untracked files during codebase cleanup is using a git-aware deletion tool that automatically stores modified or untracked items in a .safe-rm directory before removal.

Can I recursively delete directories during a refactoring project and still recover the files?

Yes, you can recursively delete directories using the -r flag during refactoring, and the workflow ensures recoverability by backing up modified or untracked items to .safe-rm before deletion occurs.

Does safe-rm work outside of git repositories for general file cleanup?

No, safe-rm enforces an in-repo scope and is designed specifically for codebase cleanup and large-scale deletions within git repositories to ensure git-aware backups and recoverability.

How do I recover deleted files after performing a large-scale directory deletion?

To recover deleted files after large-scale directory deletion, use the clear post-deletion recovery options provided from the .safe-rm backups or restore the items directly from Git history.