cleanup-screenshots

cleanup-screenshots is a skill for Claude Code from MECoban/screenshot-janitor. It costs 88 tokens per session (851 once invoked), scanned B, original, MIT.

A cleanup procedure that finds screenshots created during the current Claude Code session and, after approval, moves them to the Trash.

In plain words
What is it for?
Use it at the end of a session or when asked to tidy session screenshots, including screenshots on the Desktop.
Why use it?
It prevents temporary screenshots from accumulating while keeping removed files recoverable rather than permanently deleting them.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the screenshot-janitor plugin — 1 skill, 2 hooks shipped together

Good fit Use it at the end of a session or when asked to tidy session screenshots, including screenshots on the Desktop.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MECoban/screenshot-janitor
Claude Code
/plugin install screenshot-janitor

Made for: Claude Code.

Or install screenshot-janitor, the plugin that ships this one along with the rest of its 1 skill, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cleanup-screenshots

README.md
[![agentmods](https://agentmods.dev/badge/skills/mecoban/screenshot-janitor/cleanup-screenshots/github.svg)](https://agentmods.dev/skills/mecoban/screenshot-janitor/cleanup-screenshots)
Your own site
<a href="https://agentmods.dev/skills/mecoban/screenshot-janitor/cleanup-screenshots"><img src="https://agentmods.dev/badge/skills/mecoban/screenshot-janitor/cleanup-screenshots/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cleanup-screenshots

Your own site · 80×15
<a href="https://agentmods.dev/skills/mecoban/screenshot-janitor/cleanup-screenshots"><img src="https://agentmods.dev/badge/skills/mecoban/screenshot-janitor/cleanup-screenshots.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 851 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.00851
Opus 5 $0.00044 $0.00426
Sonnet 5 $0.00018 $0.00170
Haiku 4.5 $0.00009 $0.00085

Measured 11d ago against content hash 5836af3302f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

cleanup-screenshots scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

SCRIPTS="$(cat "$HOME/.claude/screenshot-janitor/scripts-path" 2>/dev/null)"
skills/cleanup-screenshots/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Screenshot Janitor — Cleanup

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"

Flow

1. Find candidates

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.
  • Following TSV lines are candidates: <mtime_epoch>\t<size_bytes>\t<path>.
  • If there are no TSV lines: say "No screenshots to clean up for this session 👍" and stop.

2. Show a clear list

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.

3. Ask for approval

Offer clear options and wait for the answer:

  • All → move every candidate to the Trash.
  • Some → "tell me the numbers, e.g. 1,3" → only those.
  • Cancel → do nothing.

NEVER move files without approval.

4. Move to Trash

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.

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 89 lines · 88 tokens per session scan B 5836af3302f4

Subscribe to this mod's changes

cleanup-screenshots is a skill published in the GitHub repository MECoban/screenshot-janitor (1 stars, last pushed 2mo ago), licensed MIT. It adds 88 tokens to every session and 851 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

drive-screen

See and operate the user's real, physical Linux desktop through the mcp-screen MCP — screenshot any monitor and click/type/scroll/drag any visible app. Prefer screenwatch (1 fps) after graphs/maps/canvases/loaders so thrashing UIs are caught like a human watches, not one freeze-frame. Use whenever the user points at…

88plug/screen-mcp · 144 tokens

docs-drift

Documentation-drift audit for this plugin monorepo. Audit either each scoped plugin's unreleased changelog claims or its latest shipped release from the previous reachable plugin-name--v tag, then verify that plugin READMEs, docs, CLAUDE.md or AGENTS.md files, and root documentation tell the truth for the matching…

gtapps/claude-code-hermit · 170 tokens

cco-tools

Show what tools actually cost in tokens — learned per-tool averages from observed results, replacing the hardcoded MCP/Agent guesses.

egorfedorov/claude-context-optimizer · 27 tokens

test-run

Run plugin test suites in this monorepo and report a concise pass/fail summary. Optional plugin slug arg; without arg, runs all plugins under plugins/.

gtapps/claude-code-hermit · 35 tokens

github-pr-creation

Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing…

fvadicamo/dev-agent-skills · 75 tokens

design-system-reference

Style guides and implementation rules for frontend design. Works with design-discovery agent which handles context gathering and VS-based style recommendations. Contains detailed style guides, anti-patterns, and implementation checklists.

wigtn/wigtn-plugins · 43 tokens