screenshot-janitor — плагин для Claude Code: как установить
Плагин screenshot-janitor отслеживает новые снимки экрана во время сессии Claude Code и предлагает отправить их в корзину перед выходом, чтобы рабочий стол не захламлялся.
MIT ★ 1 013 обновлён 2026-08-12
/plugin marketplace add ccplugins/awesome-claude-code-plugins
/plugin install screenshot-janitor@awesome-claude-code-pluginsЧто делает screenshot-janitor
Плагин следит за файлами, появившимися на рабочем столе или в каталоге со скриншотами после старта сессии Claude Code. Хук SessionStart фиксирует время запуска, поэтому плагин видит только свежие снимки. Перед завершением работы срабатывает хук Stop: он один раз спрашивает, стоит ли убрать созданные файлы. Удаление остаётся безопасным, так как инструмент не применяет команду rm, а перемещает объекты в системную корзину через Finder, trash, gio trash или trash-cli.
Для запуска не требуются интерпретатор Python или утилита jq — логика написана на bash с вызовом find и stat. Пользовательские папки для поиска или маски имён можно переопределить в файле ~/.claude/screenshot-janitor/config.sh.
В Windows плагин не запустится: в коде заложена работа исключительно с macOS и Linux.
Какие задачи решает
- убирать временные снимки экрана после диалога с моделью
- безопасно перемещать ненужные файлы с рабочего стола в корзину
- находить скриншоты, созданные строго за текущую сессию
Примеры запросов агенту
- /cleanup-screenshots
- Проверь скриншоты за текущую сессию и помоги очистить рабочий стол
- Покажи новые снимки экрана, созданные с момента запуска
Как установить screenshot-janitor
Через маркетплейс плагинов
/plugin marketplace add ccplugins/awesome-claude-code-plugins/plugin install screenshot-janitor@awesome-claude-code-pluginsПо шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой
Вопросы о screenshot-janitor
Как установить screenshot-janitor в Claude Code?
Выполните в терминале Claude Code команду /plugin marketplace add ccplugins/awesome-claude-code-plugins, а затем /plugin install screenshot-janitor@awesome-claude-code-plugins. После этого перезапустите агент или откройте /hooks.
Что делает screenshot-janitor?
Он фиксирует скриншоты, сделанные в процессе текущей сессии Claude Code, выводит их список с размерами и предлагает перенести их в корзину перед закрытием.
Можно ли восстановить отправленные в корзину файлы?
Да. Плагин принципиально не использует rm, а переносит файлы в стандартную системную корзину ОС, откуда их легко восстановить.
Исходный текст
screenshot-janitor · MIT
# 🧹 screenshot-janitor [](LICENSE)   [](https://github.com/MECoban/screenshot-janitor/stargazers) A [Claude Code](https://claude.com/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 <!-- Record a short clip of the end-of-session "clean up?" prompt, save it as docs/demo.gif, then uncomment the line below: --> <!--  --> > 🎥 _Demo GIF coming soon._ The end-of-session flow: Claude asks **"move these N screenshots to the Trash?"** → you approve → done. --- ## Install ```text /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: ```text /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: ```bash # 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 ```text /plugin uninstall screenshot-janitor ``` Optionally remove leftover state: `rm -rf ~/.claude/screenshot-janitor`. ## License MIT © MECoban
© MECoban · MIT · ccplugins/awesome-claude-code-plugins