safe-file-ops

Delete git-tracked files with git rm and move untracked files to .trash.

19|3|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/changoo89/claude-pilot --skill safe-file-ops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-file-ops
Source: https://github.com/changoo89/claude-pilot/tree/main/.claude/skills/safe-file-ops
Command: npx skills add https://github.com/changoo89/claude-pilot --skill safe-file-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely remove files and folders without risking loss of non-tracked data by handling git-tracked items with git rm and moving non-tracked items to a recoverable .trash folder.

Core Features & Use Cases

  • Git-tracked files are deleted with git rm to preserve version history.
  • Non-tracked files are moved to .trash for possible recovery.
  • Works on mixed batches of files and folders, with reports of what was removed or moved.

Quick Start

Provide the paths of files or folders you want to delete and I will process them safely, deleting git-tracked items with git rm and moving non-tracked items to .trash.

Frequently Asked Questions about safe-file-ops

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 untracked data?

Safe file deletion in a git repository uses git rm for tracked files to preserve version history, while untracked files are moved to a recoverable .trash directory instead of being permanently deleted.

Can I batch delete a mixed folder of git-tracked and untracked files?

Batch deleting mixed folders of tracked and untracked items is supported. The process detects Git tracking via git ls-files, automatically routes items correctly, and reports what was removed or moved.

Does safe deletion work on both single files and entire project directories?

Safe deletion operates on both single files and entire folders. Whether processing a code repository or a project directory, it safely removes tracked items and relocates non-tracked data to .trash.

What is the best way to clean up a code repository while keeping files recoverable?

Cleaning up a code repository while keeping files recoverable involves removing git-tracked items with git rm and moving non-tracked files to a .trash directory, ensuring no data is permanently lost.

How does the system know whether to use git rm or move a file to trash?

The system checks Git tracking via git ls-files. Files detected as tracked are removed with git rm to preserve version history, while all non-tracked files and directories are moved to .trash.

Are there limitations when using this safe deletion method for filesystem cleanup?

A limitation of safe deletion for filesystem cleanup is that it does not permanently delete data. Tracked files rely on git history for recovery, and untracked files depend on the .trash directory remaining intact.