windows-safe-cleanup
name: Windows-safe-cleanup description: Windows安全清理工具:审计并安全清理磁盘压力、临时文件、浏览器缓存、开发缓存、回收站和显卡着色器缓存,同时验证目标路径并避免误删。用于Windows空间清理和存储维护。 veRSIon: 1.0.0
Windows Safe Cleanup
Bottom-Layer Reasoning
APPly the think-one-step-further mechanism as a Lightweight check:
Confirm this Skill is solving the user's real intent, not only the surface request.
Make the ouTPUt immediately usable and name any unavoidable next ACTion.
Extract the reusable structure and, when aligned, propagate it to adjacent Prompts, skills, checklists, or workflows.
Add one guardrAIl for the most likely next failure while preserving this skill's primary workflow.
Operating Rules
Default to read-only audit. Do not delete anything until the user explicitly approves a cleanup scope.
Use plain user-facing language: "checking disk space", "Cleaning safe caches", "Wallpaper subscriptions", not raw command details unless helpful.
Treat these as protected unless the user names an exact path and clearly approves deletion:
Personal projects, footage, photos, videos, documents, downloads, desktop files
creative app drafts such as Jianying/CapCut, Adobe, Topaz, and editor cache locations
Steam game installs, app installs, model folders, and chat app data
credentials, config folders, databases, and hidden app state
Never bulk-delete a drive root, profile root, AppData, Program Files, Windows, or a whole Steam library. For explicitly approved deletes, verify the resolved path first and prefer leaf files or clearly named folders.
Workflow
Run an audit first.
Summarize current free space per drive and top cleanup candidates.
Split recommendations into:
safe cleanup: recycle bins, temp files, browser caches, NVIDIA shader cache, npm/pip/pnpm cache pruning
needs confirmation: model caches, old workspaces, app-specific caches
manual review: user files, creative drafts, Steam/Wallpaper subscriptions, installed apps
Ask for explicit approval before any deletion or cleanup.
After cleanup, rerun the audit and report before/after free space.
Script
Use scripts/windows_cleanup.ps1 for repeatable checks:
# Audit only; default safe starting point. powershell -ExecutionPolicy Bypass -File C:\Users\liu1\.Codex\skills\windows-safe-cleanup\scripts\windows_cleanup.ps1 -AuditOnly # Safe cleanup after explicit approval. powershell -ExecutionPolicy Bypass -File C:\Users\liu1\.codex\skills\windows-safe-cleanup\scripts\windows_cleanup.ps1 -CleanSafe # Include redownloadable model caches only when explicitly approved. powershell -ExecutionPolicy Bypass -File C:\Users\liu1\.codex\skills\windows-safe-cleanup\scripts\windows_cleanup.ps1 -CleanSafe -IncludEMOdelCaches # Scan Wallpaper Engine / Steam Workshop large items and exact duplicate files. powershell -ExecutionPolicy Bypass -File C:\Users\liu1\.codex\skills\windows-safe-cleanup\scripts\windows_cleanup.ps1 -ScanWallpaper -WallpaperRoot E:\SteamLibrary\steamapps\workshop\content\431960
The script prints labeled CSV blocks so the result is easy to summarize.
Wallpaper Engine
Wallpaper Engine app id is commonly 431960; workshop content usually lives under:
<SteamLibrary>\steamapps\workshop\content\431960
Do not directly delete workshop folders as the first move. Prefer reporting:
total workshop size
top largest workshop IDs and largest file names
exact duplicate files confirmed by hash
Same-name candidates that are not proven duplicates
Recommend unsubscribing or deleting through Steam/Wallpaper Engine for large subscribed items. Direct filesystem deletion is acceptable only after explicit user approval and with the understanding Steam may redownload subscribed content.
Deletion Checklist
Before deleting an explicitly approved file or folder:
Resolve the path and confirm it is not a protected root.
Show or internally verify size and type.
Use
Remove-Item -LiteralPathwith the exact resolved path.Do not compose deletion commands by piping paths into another shell.
Rerun drive-space checks afterward.
Comments & Questions (0)
No comments yet
Be the first to comment!