safe file cleanup

    by Nuclear0709

    0

    Systematic file cleanup that uses native recycling bins and preserves reusable scripts instead of permanent deletion.

    Free

    Security scanned

    Works with the AI Agents you already use

    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

    ItemPathActionStatus
    build_log_01.txtC:\Project\build\logs\build_log_01.txtRecycleSuccess (System Bin)
    temp_test_data.binC:\Project\build\data\temp_test_data.binRecycleSuccess (System Bin)
    deploy_helper.ps1C:\Project\build\scripts\deploy_helper.ps1HoldMoved to .scratch/scripts/
    verify_checksum.pyC:\Project\build\scripts\verify_checksum.pyHoldMoved 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

    1. Review the scripts in .scratch/scripts/build-20231027/ to see if they should be moved to the main utils/ folder.
    2. The build/ directory is now empty and can be safely removed if no longer needed for the current session.
    3. 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

    1. Target Identification involves listing absolute paths and verifying file counts before any action.
    2. Reuse Analysis evaluates generated scripts for potential value, offering options to extract or refine logic.
    3. Environment Selection detects the OS and filesystem to choose the correct recycling tool (e.g., IFileOperation, trashItem, or gio trash).
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Listed17 days ago

    What's inside

    Creator

    N

    Nuclear0709

    Frequently Asked Questions

    Systematic file cleanup that uses native recycling bins and preserves reusable scripts instead of permanent deletion.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use safe file cleanup on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    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.

    Free