I built a skill that reads 129,547 files Built for LYONSLEGACY.AI. WHAT I BUILT A skill called dupe-map. I say "build the dupe map" and it takes a file audit CSV and tells me which files genuinely exist in more than one place, which copy to keep, and how many real gigabytes come back if the rest go. I have two years of work spread across OneDrive, a redirected Desktop, Downloads and an old backup folder, and I could never get a straight answer about what was actually duplicated. First run of the skill: 129,547 files scanned, 5,847 real duplicates, 12,884 redundant copies, 9.6 GB of actual disk to recover. THE OPTIMIZATION THAT MATTERED The first version was going to be wrong in a way I would not have caught. On a OneDrive machine most files are placeholders — a few hundred bytes on disk pointing at the cloud — but Windows reports them at full size. My earlier audit said I had 146 GB of duplicates. One folder alone read as 76 GB when only 8.8 GB was really on the disk. Every one of those numbers was counting ghosts. Worse: reading a placeholder makes OneDrive download it. A normal dedupe scan would have quietly pulled tens of gigabytes back onto a machine I was trying to clear. So I put two rules in the skill file. Never touch a cloud stub — 107,154 of them were skipped and none were downloaded. And a file is only a duplicate if two SHA256 hashes match, never on filename and size. Two files with the same name and the same byte count can still be different files. That is the difference between a skill and a script. The rules live in the skill, so it cannot forget them on run 40. WHAT TRIPPED ME UP I nearly moved that 76 GB folder before checking whether the files were real. 18,719 of them were placeholders. Moving them would have turned every one into a dead 0-byte stub. One command answered it before anything got touched. WHAT I WOULD IMPROVE The skill picks a keeper by preferring paths outside OneDrive. On my machine the Desktop is redirected into OneDrive, so a Desktop path is not actually local. It needs to test that rather than assume it — which is exactly the kind of thing you only find by running it and watching.