Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Bulk-cleans Gmail accounts using the Gmail API. Supports trashing or permanently deleting emails by sender or search query, creating labels, setting up auto-filters, and restoring emails from trash. Multiple accounts are handled via separate OAuth token files.
Processes up to 1000 messages per API call with dry-run support, so large inbox cleanups are faster and safer than working through Gmail's web interface.
When to use it
- Bulk deleting promotional emails older than 30 days
- Removing all emails from a specific newsletter or spam sender
- Setting up auto-filters to label incoming banking or work emails
- Scanning an inbox to identify top senders before cleaning
- Restoring accidentally trashed emails and applying a label
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: Clean my Gmail — trash all promotional emails older than 30 days and set up labels for banking and work
- 1Runs auth.py with --scopes settings to authenticate and obtain an OAuth token
- 2Runs scan.py to sample the inbox and identify top senders and category counts
- 3Runs clean.py with --query 'category:promotions older_than:30d' and --dry-run to preview matches
- 4Runs clean.py without --dry-run to move matching emails to trash
- 5Runs organize.py to create Banking and Work labels and set up inbox filters
Promotional emails moved to trash and Banking/Work labels created with active filters for future emails
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.