Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

🧹 screenshot-janitor

License: MIT Platform Claude Code GitHub stars

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

🎥 Demo GIF coming soon. The end-of-session flow: Claude asks "move these N screenshots to the Trash?" → you approve → done.


Install

/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.

How it works

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

Platforms

  • macOS — scans ~/Desktop, recognizes Screenshot *, Ekran Resmi *, CleanShot *, etc. Trashes via the trash CLI or Finder/AppleScript.
  • Linux — scans ~/Pictures/Screenshots, ~/Pictures, ~/Desktop, recognizes GNOME/KDE naming. Trashes via gio trash or trash-cli.

Zero runtime dependencies (no jq, no Python) — just bash, find, stat.

Configuration

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=300

State & privacy

Per-session bookkeeping lives in ~/.claude/screenshot-janitor/. Nothing leaves your machine. The plugin reads filenames/sizes/timestamps only — never the image contents.

Uninstall

/plugin uninstall screenshot-janitor

Optionally remove leftover state: rm -rf ~/.claude/screenshot-janitor.

License

MIT © MECoban