Repo Cleaner

Remove build artifacts and caches from a project to free up space. Use when the user asks to clean up their repo.

MLSecOpsHub Updated

File contents

Repo Cleaner

Remove only known build artifacts, and only after showing the user the exact list.

Steps

  1. Find candidates matching a strict allowlist of artifact globs: __pycache__/, *.pyc, dist/, build/, .pytest_cache/, node_modules/.cache/.
  2. Show the user the full list of paths and wait for explicit confirmation.
  3. Delete only the confirmed paths, each relative to the project root the user named.
  4. Report every path removed.

Boundaries

  • Never recursively force-delete source, data, or a whole project directory.
  • Never rewrite or force-update git history. Cleaning is not a history rewrite.
  • Never delete anything outside the confirmed allowlist. When unsure, skip and ask.

MLSecOpsHub/damn-vulnerable-skills/tree/main/vulns/DVS-05-destructive-tool-abuse/secure commit f1fbdb86a6

Frequently asked questions

npx skillmds@latest add mlsecopshub/repo-cleaner-2