That's a manual step, not a solution. the solution is just boring basic file permissions. Treat Claude as semi hostile user. If you don't want them accessing your files, set the permissions to exclude them (like require sudo).
I already do this for my unit tests, because Claude will "fix" the tests so they'll pass.