email-cleanup
ABOUTME: Gmail bulk cleanup - archive old emails, delete promotions, free storage
ABOUTME: Parameterized batch operations with safety-first approach
Email Cleanup Skill
Gmail: See ../_GMAIL.md for account config and commands.
Safety Rules
- NEVER delete without confirmation - show counts first
- Archive over delete - prefer archiving (recoverable)
- Batch in chunks - max 50 at a time
Cleanup Targets
| Category | Query | Action |
|---|---|---|
| Promotions | category:promotions older_than:30d |
Archive |
| Social | category:social older_than:14d |
Archive |
| Read updates | category:updates is:read older_than:7d |
Archive |
| Large emails | larger:10M |
Review individually |
| Unsubscribe candidates | unsubscribe is:read older_than:30d |
Review |
Workflow
Step 1: Count each category
gog gmail search "<query>" --account=maroffo@gmail.com --json | jq '.resultSizeEstimate'
Step 2: Present summary table with counts and suggested actions
Step 3: Execute (with confirmation)
THREADS=$(gog gmail search "<query>" --account=maroffo@gmail.com --json --max=50 | jq -r '.threads[].id')
for tid in $THREADS; do
gog gmail thread modify $tid --account=maroffo@gmail.com --remove-labels=INBOX
done
Process in batches of 50. Report progress.
Quick Stats
gog gmail labels get INBOX --account=maroffo@gmail.com
gog gmail labels get CATEGORY_PROMOTIONS --account=maroffo@gmail.com
More from maroffo/claude-forge
newsletter-digest
Process newsletters into Second Brain digest. Use when user wants to process newsletters, create digest, or catch up on subscriptions. Not for web clippings (use process-clippings) or email bookmarks (use process-email-bookmarks).
22table-image
Render markdown tables as hand-drawn sketch images. Use when user wants a table rendered as an image, visual table, or diagram illustration.
21apple-swift
Apple platform development with Swift, SwiftUI, async/await, and performance. Use when working with .swift files, Package.swift, Xcode projects, or building for iOS/macOS/watchOS/visionOS.
20react-nextjs
React + Next.js App Router development. Use when working with .tsx/.jsx files, next.config, or user asks about Server Components, data fetching, state management, forms, or React testing.
20inbox-triage
Review and prioritize Gmail inbox. Use when user wants to check email, review inbox, or see what needs attention.
19project-analyzer
Analyze codebase and create CLAUDE.md documentation. Use when analyzing project, understanding codebase, or creating documentation.
17