/screenshot-janitor:cleanup-screenshotsfrom screenshot-janitor
Finds screenshots accumulated during the current Claude Code session and moves them to the Trash with user approval. Safe cleanup that never permanently deletes files.
Ships in screenshot-janitor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Cleans up screenshots that piled up during this session safely: never rm;
files are moved to the Trash and can be restored. Session scope comes from the
started_at timestamp recorded by the SessionStart hook (only screenshots created
during this session).
Helper scripts live next to this plugin. Resolve their location like this (works
whether or not CLAUDE_PLUGIN_ROOT is set in skill context):
SCRIPTS="$(cat "$HOME/.claude/screenshot-janitor/scripts-path" 2>/dev/null)"
[ -z "$SCRIPTS" ] && SCRIPTS="${CLAUDE_PLUGIN_ROOT}/scripts"
bash "$SCRIPTS/find.sh"
Interpret the output:
NO_SESSION → no session record. Ask the user whether to scan all screenshots;
if yes, run bash "$SCRIPTS/scan.sh" 0.SESSION_META:<path> → remember this path; you will write the handled
marker into its directory in step 5.<mtime_epoch>\t<size_bytes>\t<path>.Present the candidates as a numbered, human-readable table. Convert bytes to MB/KB and the mtime epoch to a readable time. Example:
Found 3 screenshots from this session:
1. Screenshot 2026-06-07 at 04.44.07.png 3.6 MB 04:44
2. Screenshot 2026-06-07 at 04.44.17.png 3.4 MB 04:44
3. Screenshot 2026-06-07 at 15.49.25.png 5 KB 15:49
Total ~7.0 MB.
Offer clear options and wait for the answer:
NEVER move files without approval.
For the approved files (not permanent deletion!):
bash "$SCRIPTS/trash.sh" "/full/path/Screenshot ....png" "/another/file.png"
trash.sh is cross-platform (macOS Trash / Linux gio trash / trash-cli).
Always double-quote paths (they contain spaces). Never use rm.
After a successful cleanup, mark the session so it won't remind again (use the
SESSION_META path from step 1):
touch "$(dirname '<SESSION_META path>')/handled"
Then give a short summary: how many files, how much space freed, and that they went to the Trash ("you can restore from Trash if needed"). Mention any skipped files.
~/.claude/screenshot-janitor/config.sh to override
SCAN_DIRS, NAME_PATTERNS, or MIN_AGE_SECONDS (don't edit plugin files).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ccplugins/awesome-claude-code-plugins --plugin screenshot-janitorOther plugins' skills for the same job