A Claude Code plugin that keeps your Desktop clean.
You share a lot of screenshots with Claude during a session — and they pile up forever afterward. screenshot-janitor notices the screenshots created during each session and, before you leave, asks whether to move them to the Trash. Approve, and they're gone (recoverable from the Trash). Decline, and it won't nag you again.
Safe by design: it never runs
rm. Files go to the system Trash and can be restored.
🎥 Demo GIF coming soon. The end-of-session flow: Claude asks "move these N screenshots to the Trash?" → you approve → done.
/plugin marketplace add MECoban/screenshot-janitor
/plugin install screenshot-janitor
That's it. The skill and the hooks are wired up automatically — no manual
settings.json editing. Restart Claude Code (or open /hooks once) to activate.
| Piece | What it does |
|---|---|
SessionStart hook |
Opens a per-session folder and records the start time, so each session only deals with its own screenshots. |
Stop hook |
If this session created screenshots, reminds you once to clean them up before you go. |
cleanup-screenshots skill |
Finds the screenshots, shows a clear list (name, size, time), asks for approval, and moves the approved ones to the Trash. |
You can also run it any time:
/cleanup-screenshots
- macOS — scans
~/Desktop, recognizesScreenshot *,Ekran Resmi *,CleanShot *, etc. Trashes via thetrashCLI or Finder/AppleScript. - Linux — scans
~/Pictures/Screenshots,~/Pictures,~/Desktop, recognizes GNOME/KDE naming. Trashes viagio trashortrash-cli.
Zero runtime dependencies (no jq, no Python) — just bash, find, stat.
Don't edit the plugin files (they're overwritten on update). Instead create
~/.claude/screenshot-janitor/config.sh and override what you need:
# Extra folders to scan
SCAN_DIRS=( "$HOME/Desktop" "$HOME/Pictures/Screenshots" )
# Filename globs that count as screenshots
NAME_PATTERNS=( "Screenshot *" "CleanShot *" )
# Don't remind until the session is at least this old (seconds). 0 = remind ASAP.
MIN_AGE_SECONDS=300Per-session bookkeeping lives in ~/.claude/screenshot-janitor/. Nothing leaves
your machine. The plugin reads filenames/sizes/timestamps only — never the image
contents.
/plugin uninstall screenshot-janitor
Optionally remove leftover state: rm -rf ~/.claude/screenshot-janitor.
MIT © MECoban