Auto Cleaning Disk
Safely clean disk space on any operating system (Windows, Linux, macOS).
Never deletes important files — only junk, cache, temp, and log files.
What This Skill Cleans
| Category | Examples |
|---|
| Temp Files | INLINECODE0 , /tmp, system temp folders |
| Browser Cache |
Chrome, Firefox, Edge, Safari cache |
| Recycle Bin / Trash | Windows Recycle Bin, macOS Trash, Linux Trash |
| Log Files | Old
.log files in system/app folders |
⚠️ NEVER delete: Documents, Downloads, Desktop files, user data, system files,
installed apps, or anything outside designated junk folders.
Mode Selection
Always ask the user FIRST (if not already specified):
- - Auto Mode — Clean everything silently, show summary at end
- Confirm Mode — Ask user before each category is cleaned
Step-by-Step Instructions
Step 1: Detect Operating System
Detect the OS using Python:
CODEBLOCK0
Step 2: Run the Appropriate Script
Based on OS, refer to the matching reference file:
- - Windows → See INLINECODE3
- Linux → See INLINECODE4
- macOS → See INLINECODE5
Step 3: Show Results
After cleaning, always show:
- - ✅ How much space was freed (MB/GB)
- 📁 Which categories were cleaned
- ⚠️ Anything skipped and why
Safety Rules (MUST FOLLOW)
- 1. ❌ Never touch System32 or Windows folder
- ❌ Never touch Documents, Pictures, Videos, Downloads
- ❌ Never touch installed software folders
- ✅ Only clean folders explicitly listed in scripts
- ✅ Only delete files older than 1 day
- ✅ If unsure about a file — SKIP it
Usage Examples
User says: "My disk is full"
→ Ask mode preference → Run full clean → Show space freed
User says: "Clear browser cache only"
→ Only clean browser cache → Show result
User says: "Auto clean everything"
→ Run all categories silently → Show summary
自动磁盘清理
在任何操作系统(Windows、Linux、macOS)上安全清理磁盘空间。
绝不删除重要文件——仅清理垃圾、缓存、临时文件和日志文件。
该技能清理的内容
| 类别 | 示例 |
|---|
| 临时文件 | %TEMP%、/tmp、系统临时文件夹 |
| 浏览器缓存 |
Chrome、Firefox、Edge、Safari 缓存 |
| 回收站/废纸篓 | Windows 回收站、macOS 废纸篓、Linux 回收站 |
| 日志文件 | 系统/应用文件夹中的旧 .log 文件 |
⚠️ 绝不删除: 文档、下载、桌面文件、用户数据、系统文件、
已安装应用或指定垃圾文件夹之外的任何内容。
模式选择
始终先询问用户(如果尚未指定):
- - 自动模式 — 静默清理所有内容,最后显示摘要
- 确认模式 — 清理每个类别前询问用户
分步说明
步骤 1:检测操作系统
使用 Python 检测操作系统:
python
import platform
os_type = platform.system() # Windows、Linux、Darwin(Mac)
步骤 2:运行相应脚本
根据操作系统,参考对应的参考文件:
- - Windows → 参见 windows-cleaner.md
- Linux → 参见 linux-cleaner.md
- macOS → 参见 mac-cleaner.md
步骤 3:显示结果
清理后,始终显示:
- - ✅ 释放了多少空间(MB/GB)
- 📁 清理了哪些类别
- ⚠️ 跳过了哪些内容及原因
安全规则(必须遵守)
- 1. ❌ 绝不触碰 System32 或 Windows 文件夹
- ❌ 绝不触碰文档、图片、视频、下载文件夹
- ❌ 绝不触碰已安装的软件文件夹
- ✅ 仅清理脚本中明确列出的文件夹
- ✅ 仅删除超过 1 天的文件
- ✅ 如果不确定某个文件——跳过它
使用示例
用户说: 我的磁盘满了
→ 询问模式偏好 → 运行完整清理 → 显示释放的空间
用户说: 仅清除浏览器缓存
→ 仅清理浏览器缓存 → 显示结果
用户说: 自动清理所有内容
→ 静默运行所有类别 → 显示摘要