mcpField
E
email-cleanup

email-cleanup

github.com/maroffoProductivity1788 installsUpdated 4w ago
Repository

About email-cleanup

A Gmail cleanup skill for batch handling older promotional, social, and update emails, as well as reviewing large messages and unsubscribe candidates. It emphasizes counts before action, confirmation before deletion, and archiving in batches of up to 50.

Key features

  1. 01Finds emails by category and age
  2. 02Counts messages before cleanup
  3. 03Prefers archiving over deletion
  4. 04Processes batches of up to 50
  5. 05Flags large and unsubscribe-candidate emails for review

Use cases

  1. 01Archiving older promotional or social email
  2. 02Reviewing large messages to free storage
  3. 03Checking read updates and unsubscribe candidates

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/maroffo/claude-forge --skill email-cleanup

After installing, type/email-cleanupin Claude Code to confirm it loaded.

Details

From the project README

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

  1. NEVER delete without confirmation - show counts first
  2. Archive over delete - prefer archiving (recoverable)
  3. Batch in chunks - max 50 at a time

Cleanup Targets

CategoryQueryAction
Promotionscategory:promotions older_than:30dArchive
Socialcategory:social older_than:14dArchive
Read updatescategory:updates is:read older_than:7dArchive
Large emailslarger:10MReview individually
Unsubscribe candidatesunsubscribe is:read older_than:30dReview

Workflow

Step 1: Count each category
gog gmail search "<query>" [email protected] --json | jq '.resultSizeEstimate'
Step 2: Present summary table with counts and suggested actions
Step 3: Execute (with confirmation)
THREADS=$(gog gmail search "<query>" [email protected] --json --max=50 | jq -r '.threads[].id')
for tid in $THREADS; do
  gog gmail thread modify $tid [email protected] --remove-labels=INBOX
done

Process in batches of 50. Report progress.

Quick Stats

gog gmail labels get INBOX [email protected]
gog gmail labels get CATEGORY_PROMOTIONS [email protected]

Comments

Markdown supported