协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
cleanup-screenshots【开发与工程】Find screenshots shared/accumulated during this Claude Code session and, with the user's approval, move them to the Trash (no permanent delete — recoverable). Use before ending a session, when asked to tidy the Desktop/screenshots folder, or when the screenshot-janitor Stop hook suggests cleanup. Triggers include "clean up screenshots", "delete scree…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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).