garbage-collect

Move files to a garbage folder while preserving git history.

26|2|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/sburl/CrossCheck --skill garbage-collect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: garbage-collect
Source: https://github.com/sburl/CrossCheck/tree/main/codex/skills/garbage-collect
Command: npx skills add https://github.com/sburl/CrossCheck --skill garbage-collect

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cleaning up files without losing history can be risky and error-prone. This skill provides a safe workflow to move unwanted files into a /garbage folder while preserving git history, enabling auditability and reversible cleanup.

Core Features & Use Cases

  • Move to garbage with history preserved: Archive files or directories by relocating them to a dedicated garbage folder while retaining their git history.
  • Validation & auditing steps: Verify whether items exist in history with git log and ensure references are clean before deletion.
  • Project hygiene automation: Update .gitignore for the garbage folder, and support batch cleanup workflows for multiple files.

Quick Start

Create the garbage folder if it doesn't exist, then move the target file or directory into garbage.

Frequently Asked Questions about garbage-collect

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

FAQPage Schema
How do I delete files from a git project without losing git history?

To delete files without losing git history, move them into a dedicated garbage folder. This preserves the commit history of the archived files while keeping your active project directory clean and allowing for reversible cleanup.

What is the best way to archive unwanted project files before removal?

The best way to archive unwanted project files before removal is relocating them to a garbage folder. This approach retains git history for auditability and provides validation steps to verify item references are clean before final deletion.

How do I update .gitignore when moving files to a garbage folder?

When moving files to a garbage folder, update .gitignore to exclude the garbage directory. This project hygiene automation prevents archived files from being tracked in future commits while maintaining their historical records.

Can I bulk clean up multiple files while preserving their git history?

Yes, you can bulk clean up multiple files while preserving git history. The workflow supports batch operations for moving single or multiple files into the garbage folder, followed by optional bulk operations to purge the folder.

How does the garbage folder workflow verify files before final deletion?

The garbage folder workflow verifies files before deletion by running git log checks. This ensures items still exist in history and references are clean, satisfying archival workflow requirements and enabling safe, auditable cleanup.