recycle-fix
Skill0 starsChanged 5 months agoCC0-1.0View on GitHub
回收站损坏修复 — 删除损坏的 $Recycle.Bin 文件夹,让 Windows 自动重建。解决每次插移动硬盘/U盘都弹"回收站已损坏"的问题。当用户说"回收站损坏""回收站已损坏""清空回收站提示""回收站弹窗"时使用。
In this repository11 other files it gives its agents.
- batch-importSkill
- bookmark-fixSkill
- character-design-sheetSkill
- desktop-organizeSkill
- disk-fixSkill
- github-fixSkill
- image-consistency-supplementSkill
- migrate-packageSkill
- read-imageSkill
- storyboard-25-gridSkill
- storyboard-9-gridSkill
The file
Files
Recycle Fix Skill
一键修复外置硬盘/U盘"回收站已损坏"弹窗问题。删除损坏的 $Recycle.Bin 隐藏文件夹,Windows 自动重建。
触发条件
用户说以下任意一句时调用此技能:
- "回收站已损坏"
- "回收站损坏"
- "/recycle-fix"
- "每次插硬盘都弹回收站"
- "清空回收站提示"
- "回收站弹窗"
问题原理
NTFS 文件系统的回收站存储在隐藏文件夹 X:\$Recycle.Bin 中。每个使用过该驱动器的 Windows 用户账号会在此创建以 SID(安全标识符)命名的子文件夹,内含两类文件:
| 文件 | 作用 |
$I<xxxx>.ext | 索引文件 — 记录原始文件名、路径、删除时间 |
$R<xxxx>.ext | 数据文件 — 被删除文件的实际内容 |
损坏原因:
- 未安全弹出直接拔盘 → 回收站索引写入一半中断,文件损坏
- 突然断电/USB口接触不良 → 写入操作被截断
- 跨电脑使用 → 不同 Windows 版本的回收站格式不兼容(本案例:60+ 个不同电脑的 SID 文件夹,2017-2026 跨越 9 年)
- 文件系统轻微错误 → chkdsk 未修复的元数据不一致
Windows 检测到 $Recycle.Bin 下任何索引文件损坏,就会弹出"回收站已损坏,是否清空"提示。点"是"可能暂时解决,但如果有多处损坏可能无法彻底清除。
执行流程
Phase 1:诊断(2 秒)
检查目标盘符回收站状态:
# 查看回收站文件夹大小和 SID 目录数量
ls -la <盘符>:/'$Recycle.Bin'/
# 统计有多少个不同电脑的回收站残留
ls <盘符>:/'$Recycle.Bin'/ | wc -l如果 SID 文件夹数量 > 5,说明该盘在大量不同电脑上使用过,跨版本兼容性风险高。
Phase 2:删除损坏回收站
# 使用 cmd 的 rd 命令(PowerShell 对 $ 符号处理有坑)
cmd.exe /c "rd /s /q <盘符>:\$Recycle.Bin"也可以在资源管理器中操作:
- 打开
cmd(不需管理员) - 输入
rd /s /q X:\$Recycle.Bin(X 替换为目标盘符)
Phase 3:验证
# 确认文件夹已删除
ls <盘符>:/'$Recycle.Bin' 2>&1
# 应显示 "No such file or directory"下次在 Windows 资源管理器中删除该盘上的任意文件时,Windows 会自动创建全新的 $Recycle.Bin。
Phase 4:(可选)永久禁用该盘回收站
如果外部硬盘不需要回收站保护,可以彻底关闭:
- 桌面右键"回收站" → 属性
- 选中目标驱动器
- 选择 "不将文件移到回收站。移除文件后立即将其删除"
- 将"回收站的最大空间"设为 0
- 点击"确定"
这样该盘以后删除文件直接永久删除,永远不会再弹损坏提示。
支持的设备
- 所有 NTFS 格式化的外置硬盘/U盘
- exFAT/FAT32 格式的驱动器不受此问题影响(无回收站功能)
安全措施
- 删除
$Recycle.Bin不会影响正常文件,只删除已被用户删除但暂存在回收站的文件 - 如果回收站里有需要恢复的文件,先恢复再执行
- Windows 会自动重建空的、干净的回收站文件夹
注意事项
- 不需要管理员权限(回收站文件夹属于当前用户可写)
- 如果
rd命令报"拒绝访问",说明有其他程序正在使用回收站中的文件(关闭资源管理器重试) - 此问题与盘符丢失(disk-fix)通常是连锁反应——不安全拔出既会导致回收站损坏,也会触发 SAN 策略离线
- 养成"安全弹出硬件"的习惯是根本预防措施
关联技能
/disk-fix— 同一硬盘的盘符丢失问题修复(三板斧根治)/bookmark-fix— 同样是数据元信息损坏导致的问题修复/github-fix— 一键修复类工具集
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

