- Home
- Skills
- Workflow Automation
- safe file cleanup
safe file cleanup
by Nuclear0709
Systematic file cleanup that uses native recycling bins and preserves reusable scripts instead of permanent deletion.
Free
safe file cleanup
Example session with this skill installed
Clean up the temporary scripts and logs from the build folder, but keep anything that might be useful for future automation.
- Read your context and instructions
- Compiled the safe file cleanup
I have analyzed the build/ directory and identified several items for cleanup. I evaluated the generated scripts for reusable logic and moved them to the project hold area.
Cleanup Summary
| Item | Path | Action | Status |
|---|---|---|---|
build_log_01.txt | C:\Project\build\logs\build_log_01.txt | Recycle | Success (System Bin) |
temp_test_data.bin | C:\Project\build\data\temp_test_data.bin | Recycle | Success (System Bin) |
deploy_helper.ps1 | C:\Project\build\scripts\deploy_helper.ps1 | Hold | Moved to .scratch/scripts/ |
verify_checksum.py | C:\Project\build\scripts\verify_checksum.py | Hold | Moved to .scratch/scripts/ |
Script Evaluation Details:
deploy_helper.ps1: Contains logic for environment variable validation. Moved to.scratch/scripts/build-20231027/for potential reuse.verify_checksum.py: Generic hash verification logic identified. Suggest extracting this into a shared utility script later.
Next steps
- Review the scripts in
.scratch/scripts/build-20231027/to see if they should be moved to the mainutils/folder. - The
build/directory is now empty and can be safely removed if no longer needed for the current session. - If you need to recover the log files, they are available in your Windows Recycle Bin.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop losing local work or accidentally purging critical scripts during routine cleanup tasks. This skill replaces dangerous rm -rf and del commands with a systematic, platform-aware recovery process. It ensures that temporary files, test artifacts, and generated scripts are handled based on their actual value rather than just their file extension.
What it does
- Platform-aware recovery uses native system trash/recycle bins on Windows, macOS, and Linux instead of permanent deletion.
- Script preservation analyzes tool-generated scripts for reusable logic before removal.
- Protected hold zones moves items to
.scratch/scripts/or.cleanup-hold/when immediate deletion is risky. - Safety verification confirms absolute paths and mount points to prevent following symlinks to unintended locations.
- Granular reporting provides detailed status updates for every item, distinguishing between recycled, moved, or retained files.
How it works
- Target Identification involves listing absolute paths and verifying file counts before any action.
- Reuse Analysis evaluates generated scripts for potential value, offering options to extract or refine logic.
- Environment Selection detects the OS and filesystem to choose the correct recycling tool (e.g.,
IFileOperation,trashItem, orgio trash). - Execution and Validation performs the move and verifies the presence of the item in the system trash or hold area.
Frameworks & tools
This skill interfaces with Windows Shell APIs, .NET FileSystem methods, macOS Foundation's FileManager, and freedesktop.org Trash specifications for Linux. It works with PowerShell, Bash, and Python environments.
Why this beats prompting it yourself
Generic prompts often lead to irreversible rm commands or ignore the context of generated scripts. This skill enforces a multi-step safety protocol that prevents data loss in containers and remote environments where standard trash bins are missing.
Use cases
- Post-test cleanup of binary artifacts and log files after a build pipeline.
- Script refinement by saving and de-hardcoding temporary automation scripts.
- Directory decluttering by moving ambiguous files to a hold zone for later review.
- Container maintenance providing manual cleanup paths when native trash is unavailable.
Known limitations
Does not support text-only deletion inside files. Permanent deletion requires explicit manual authorization if system recycling fails or is unsupported by the filesystem.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 17 days ago
- Free with an Agensi account
Permissions
No special permissions declared or detected
What's inside
Creator
Nuclear0709
Frequently Asked Questions
New in Workflow Automation
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.